[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211225232911.1117843-1-haowenchao@huawei.com>
Date: Sat, 25 Dec 2021 18:29:12 -0500
From: Wenchao Hao <haowenchao@...wei.com>
To: "James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Zhiqiang Liu <liuzhiqiang26@...wei.com>,
Feilong Lin <linfeilong@...wei.com>, Wu Bo <wubo40@...wei.com>,
Wenchao Hao <haowenchao@...wei.com>
Subject: [PATCH] scsi: Do not break scan luns loop if add single lun failed
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@...wei.com>
---
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;
}
}
}
--
2.32.0
Powered by blists - more mailing lists