scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention
authorEwan D. Milne <emilne@redhat.com>
Thu, 4 Dec 2014 16:49:27 +0000 (11:49 -0500)
committerChristoph Hellwig <hch@lst.de>
Fri, 9 Jan 2015 14:44:20 +0000 (15:44 +0100)
Generate a REPORTED LUNS DATA HAS CHANGED Unit Attention if
sysfs "max_luns" is used to change the number of scsi_debug LUNs.
This is only done if scsi_debug_scsi_level is SPC-3 or above.
Additionally, implement SPC-4 behavior which only generates
this Unit Attention on the first LUN on the target to receive
a command after the change.  This condition is cleared when
a REPORT LUNS command is received.

Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_debug.c

Simple merge