]> git.baikalelectronics.ru Git - kernel.git/commit
scsi_scan: Restrict sequential scan to 256 LUNs
authorHannes Reinecke <hare@suse.de>
Tue, 3 Jun 2014 08:58:53 +0000 (10:58 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jul 2014 20:07:35 +0000 (22:07 +0200)
commit35bd92594207fe4d78ff0de989d5f8705145df29
tree3c5d6e68592cc599210fef2582cf09182412fd62
parenta79b6ebea9a60fddab23e6e1475b34c73c6705c2
scsi_scan: Restrict sequential scan to 256 LUNs

Sequential scan for more than 256 LUNs is very fragile as
LUNs might not be numbered sequentially after that point.

SAM revisions later than SCSI-3 impose a structure on
LUNs larger than 256, making LUN numbers between 256
and 16384 illegal.
SCSI-3, however allows for plain 64-bit numbers with
no internal structure.

So restrict sequential LUN scan to 256 LUNs and add a
new blacklist flag 'BLIST_SCSI3LUN' to scan up to
max_lun devices.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_scan.c
include/scsi/scsi_devinfo.h