All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: Add numbers of lun for scan debug log
@ 2021-03-17 12:37 Wu Bo
  0 siblings, 0 replies; only message in thread
From: Wu Bo @ 2021-03-17 12:37 UTC (permalink / raw)
  To: linux-scsi, martin.petersen, jejb; +Cc: linfeilong, wubo40

Sometimes, want to know the number of LUN in the REPORT LUN or
sequential scan LUN. Adding the numbers of LUN is
convenient for debugging.

Signed-off-by: Wu Bo <wubo40@huawei.com>
---
 drivers/scsi/scsi_scan.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 9af50e6..ea679d7 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1201,9 +1201,6 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget,
 	u64 sparse_lun, lun;
 	struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
 
-	SCSI_LOG_SCAN_BUS(3, starget_printk(KERN_INFO, starget,
-		"scsi scan: Sequential scan\n"));
-
 	max_dev_lun = min(max_scsi_luns, shost->max_lun);
 	/*
 	 * If this device is known to support sparse multiple units,
@@ -1253,6 +1250,8 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget,
 	else
 		max_dev_lun = min(256U, max_dev_lun);
 
+	SCSI_LOG_SCAN_BUS(3, starget_printk(KERN_INFO, starget,
+		"scsi scan: Sequential scan, max LUNs:%u\n", max_dev_lun));
 	/*
 	 * We have already scanned LUN 0, so start at LUN 1. Keep scanning
 	 * until we reach the max, or no LUN is found and we are not
@@ -1413,7 +1412,7 @@ static int scsi_report_lun_scan(struct scsi_target *starget, blist_flags_t bflag
 	num_luns = (length / sizeof(struct scsi_lun));
 
 	SCSI_LOG_SCAN_BUS(3, sdev_printk (KERN_INFO, sdev,
-		"scsi scan: REPORT LUN scan\n"));
+		"scsi scan: REPORT LUN scan, total LUNs%u\n", num_luns));
 
 	/*
 	 * Scan the luns in lun_data. The entry at offset 0 is really
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-17 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 12:37 [PATCH] scsi: Add numbers of lun for scan debug log Wu Bo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.