scsi: use 64-bit LUNs

The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.

So update the linux SCSI stack to use 64-bit LUN numbers.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Hannes Reinecke
2014-06-25 15:27:36 +02:00
committed by Christoph Hellwig
parent 755f516bbb
commit 9cb78c16f5
86 changed files with 438 additions and 429 deletions

View File

@@ -347,14 +347,16 @@ static int usb_stor_control_thread(void * __us)
*/
else if (us->srb->device->id &&
!(us->fflags & US_FL_SCM_MULT_TARG)) {
usb_stor_dbg(us, "Bad target number (%d:%d)\n",
us->srb->device->id, us->srb->device->lun);
usb_stor_dbg(us, "Bad target number (%d:%llu)\n",
us->srb->device->id,
us->srb->device->lun);
us->srb->result = DID_BAD_TARGET << 16;
}
else if (us->srb->device->lun > us->max_lun) {
usb_stor_dbg(us, "Bad LUN (%d:%d)\n",
us->srb->device->id, us->srb->device->lun);
usb_stor_dbg(us, "Bad LUN (%d:%llu)\n",
us->srb->device->id,
us->srb->device->lun);
us->srb->result = DID_BAD_TARGET << 16;
}