Re: [PATCH] scsi: Do not break scan luns loop if add single lun failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021/12/26 7:29, Wenchao Hao wrote:
Failed to add a single lun does not mean all luns are unaccessible,
if we break the scan luns loop, the other luns reported by REPORT LUNS
command would not be probed any more.

In this case, we might loss some luns which are accessible.

Signed-off-by: Wenchao Hao <haowenchao@xxxxxxxxxx>
---
  drivers/scsi/scsi_scan.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 23e1c0acdeae..fee7ce082103 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1476,13 +1476,13 @@ static int scsi_report_lun_scan(struct scsi_target *starget, blist_flags_t bflag
  				lun, NULL, NULL, rescan, NULL);
  			if (res == SCSI_SCAN_NO_RESPONSE) {
  				/*
-				 * Got some results, but now none, abort.
+				 * Got some results, but now none, abort this lun
  				 */
  				sdev_printk(KERN_ERR, sdev,
  					"Unexpected response"
  					" from lun %llu while scanning, scan"
  					" aborted\n", (unsigned long long)lun);
-				break;
+				continue;
  			}
  		}
  	}


ping ...



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux