summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorLance Digby <lance.digby@gmail.com>2020-05-18 11:02:16 +1000
committerMartin K. Petersen <martin.petersen@oracle.com>2020-05-19 21:27:10 -0400
commit5482d56bfedf1a2ce6450076e844676e20ab4e0a (patch)
tree89dc8fbe3ca3376339d265f42db9026e6dde3e57 /drivers/target
parent1cdee004426164d1b00b66d3f6e7308c3714def6 (diff)
downloadlinux-stable-5482d56bfedf1a2ce6450076e844676e20ab4e0a.tar.gz
linux-stable-5482d56bfedf1a2ce6450076e844676e20ab4e0a.tar.bz2
linux-stable-5482d56bfedf1a2ce6450076e844676e20ab4e0a.zip
scsi: target: core: Add initiatorname to NON_EXISTENT_LUN error
The NON_EXISTENT_LUN error can be written without an error condition on the initiator responsible. Adding the initiatorname to this message will reduce the effort required to fix this when many initiators are supported by a target. This version ensures the initiator name is also printed on the same message in transport_lookup_tmr_lun for consistency. Link: https://lore.kernel.org/r/9b13bb2e1f52f1792cd81850ee95bf3781bb5363.1589759816.git.lance.digby@gmail.com Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Lance Digby <lance.digby@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_device.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index d5800cf22df7..46b0e1ceb77f 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -100,9 +100,10 @@ out_unlock:
*/
if (unpacked_lun != 0) {
pr_err("TARGET_CORE[%s]: Detected NON_EXISTENT_LUN"
- " Access for 0x%08llx\n",
+ " Access for 0x%08llx from %s\n",
se_cmd->se_tfo->fabric_name,
- unpacked_lun);
+ unpacked_lun,
+ nacl->initiatorname);
return TCM_NON_EXISTENT_LUN;
}
@@ -174,9 +175,10 @@ out_unlock:
if (!se_lun) {
pr_debug("TARGET_CORE[%s]: Detected NON_EXISTENT_LUN"
- " Access for 0x%08llx\n",
+ " Access for 0x%08llx for %s\n",
se_cmd->se_tfo->fabric_name,
- unpacked_lun);
+ unpacked_lun,
+ nacl->initiatorname);
return -ENODEV;
}
se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev);