scsi_dh_alua: Recheck state on unit attention
authorHannes Reinecke <hare@suse.de>
Fri, 19 Feb 2016 08:17:13 +0000 (09:17 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit2b35865e7a290d313c3d156c0c2074b4c4ffaf52
tree9d344925d2a9206f20b5c9d6850418242fa9105f
parent851cde9909dd8b6fb90fab7f4e815c8f86c85a0d
scsi_dh_alua: Recheck state on unit attention

When we receive a unit attention code of 'ALUA state changed'
we should recheck the state, as it might be due to an implicit
ALUA state transition. This allows us to return NEEDS_RETRY
instead of ADD_TO_MLQUEUE, allowing to terminate the retries
after a certain time.
At the same time a workqueue item might already be queued, which
should be started immediately to avoid any delays.

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/device_handler/scsi_dh_alua.c