All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi_dh_alua: Requeue another not ready check condition at ML
@ 2014-02-28  0:14 Stewart, Sean
  2014-02-28  1:58 ` Mike Christie
  0 siblings, 1 reply; 4+ messages in thread
From: Stewart, Sean @ 2014-02-28  0:14 UTC (permalink / raw)
  To: linux-scsi, dm-devel

This allows the sd driver to retry commands like read capacity until a
LUN is ready, rather than giving up after three retries.

In NetApp E-Series, a controller can return not ready like this when it
quiesces I/O on the controller that just came on the network, during a
firmware upgrade procedure, and retrying the command at the midlayer
will allow the discovery to complete, successfully.

Signed-off-by: Sean Stewart <sean.stewart@netapp.com>
---
 drivers/scsi/device_handler/scsi_dh_alua.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5248c88..95d87fe 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -454,6 +454,11 @@ static int alua_check_sense(struct scsi_device *sdev,
 {
 	switch (sense_hdr->sense_key) {
 	case NOT_READY:
+		if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x01)
+			/*
+			 * LUN Not Ready -- In process of becoming ready
+			 */
+			return ADD_TO_MLQUEUE;
 		if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0a)
 			/*
 			 * LUN Not Accessible - ALUA state transition
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-28 20:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28  0:14 [PATCH] scsi_dh_alua: Requeue another not ready check condition at ML Stewart, Sean
2014-02-28  1:58 ` Mike Christie
2014-02-28 15:14   ` Hannes Reinecke
2014-02-28 20:20     ` Stewart, Sean

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.