From b1a6ab1a00c34fcb701d8bd30fbec9bb7f80f5d4 Mon Sep 17 00:00:00 2001
From: Mike Christie <mchristi@redhat.com>
Date: Tue, 19 Dec 2017 04:03:56 -0600
Subject: [PATCH] target_core_user: add cmd id to broken ring message
Git-commit: 88cf107325fc7e37925de1960bd34ab917924362
Patch-mainline: v4.16-rc1
References: bsc#1118978
Log cmd id that was not found in the tcmu_handle_completions
lookup failure path.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: David Disseldorp <ddiss@suse.de>
---
drivers/target/target_core_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index d0a16cd5de14..46b2f2e435e9 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1126,7 +1126,8 @@ static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
cmd = idr_remove(&udev->commands, entry->hdr.cmd_id);
if (!cmd) {
- pr_err("cmd_id not found, ring is broken\n");
+ pr_err("cmd_id %u not found, ring is broken\n",
+ entry->hdr.cmd_id);
set_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
break;
}
--
2.13.7