linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error
@ 2020-05-18  1:02 Lance Digby
  2020-05-18 19:40 ` Mike Christie
  2020-05-20  2:30 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Lance Digby @ 2020-05-18  1:02 UTC (permalink / raw)
  To: mchristi, martin.petersen; +Cc: linux-scsi, target-devel, linux-kernel

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.

Signed-off-by: Lance Digby <lance.digby@gmail.com>
---
 drivers/target/target_core_device.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 4cee113..15064a5 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -100,9 +100,10 @@
 		 */
 		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 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun)
 
 	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);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error
  2020-05-18  1:02 [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error Lance Digby
@ 2020-05-18 19:40 ` Mike Christie
  2020-05-20  2:30 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Christie @ 2020-05-18 19:40 UTC (permalink / raw)
  To: Lance Digby, martin.petersen; +Cc: linux-scsi, target-devel, linux-kernel

On 5/17/20 8:02 PM, Lance Digby wrote:
> 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.
> 

Reviewed-by: Mike Christie <mchristi@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error
  2020-05-18  1:02 [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error Lance Digby
  2020-05-18 19:40 ` Mike Christie
@ 2020-05-20  2:30 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-05-20  2:30 UTC (permalink / raw)
  To: mchristi, Lance Digby
  Cc: Martin K . Petersen, target-devel, linux-scsi, linux-kernel

On Mon, 18 May 2020 11:02:16 +1000, Lance Digby wrote:

> 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.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: target: core: Add initiatorname to NON_EXISTENT_LUN error
      https://git.kernel.org/mkp/scsi/c/5482d56bfedf

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-20  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18  1:02 [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error Lance Digby
2020-05-18 19:40 ` Mike Christie
2020-05-20  2:30 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).