Thread (4 messages) 4 messages, 3 authors, 2021-02-19

RE: [PATCH v2] scsi: target: core: check SR field in REPORT LUNS

From: Dmitriy Bogdanov <hidden>
Date: 2021-01-27 14:46:55
Also in: target-devel

Hi Martin,
quoted
+	switch (sr) {
+	case SCSI_SELECT_WELLKNOWN:
+	case SCSI_SELECT_ADMINISTRATIVE:
+	case SCSI_SELECT_SUBSIDIARY:
+		/* report empty lun list */
+		goto out;
I'm a bit concerned about things inadvertently breaking if we return an empty list for the well known LUNs.
According to SPC we shall report an empty list if there is no well-known LUNS. 
FreeBSD has the same logic in REPORT LUNS handling. SCST does not support SELECT_WELLKNOWN case at all.

I don't know the history of the existing behaviour to send always LUN0 instead of empty list. Probably it was 
for the SCSI_SELECT_ALL_ACCESSIBLE(0x02) case, where SPC allows LUN0. My patch keeps it for the 0x00, 0x02, 0x11 cases.
Thus, I believe it does not break the backward compatibility.

BR,
 Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help