On 13-03-15 05:46 AM, Hannes Reinecke wrote:
SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for scanning, too. If the W_LUN is not supported we'll fall back to use LUN 0. For broken W_LUN implementations a new blacklist flag 'BLIST_NO_WLUN' is added.
There are proposals at T10 for feature sets to be added to SCSI (similar to what ATA devices have). Perhaps we could have something similar at the OS level: an opaque call that makes some general decisions based on what we know about the transport, HBA and possibly target/LU. So if we are looking at a USB transport not doing UASP, then prefer to probe LUN 0 rather than the to probe via REPORT LUNS W_LUN. Many other (somewhat) advanced SCSI techniques could be filtered in a similar way (e.g. if it's a USB device assume badly implemented SCSI-2 compliance). We could still keep the blacklist and, if we don't already have it, add whitelist logic (e.g. for 0.001% of well-behaved USB devices). Doug Gilbert -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html