]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
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)
commit19c8ead7252bb66147011a361bb0c74dcb18e213
tree0b82d9cfa615e9c73e0733ca5d2f3fad3db21e33
parent08024885a2a3ed432716e9d50046a620a5b2df05
scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention

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