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@xxxxxxxxxx> --- 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