All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stewart, Sean" <Sean.Stewart@netapp.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: [PATCH] scsi_dh_alua: Requeue another not ready check condition at ML
Date: Fri, 28 Feb 2014 00:14:20 +0000	[thread overview]
Message-ID: <8255ED565A0EAA4A960625E27D49DBF24AC8B21D@SACEXCMBX04-PRD.hq.netapp.com> (raw)

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

             reply	other threads:[~2014-02-28  0:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  0:14 Stewart, Sean [this message]
2014-02-28  1:58 ` [PATCH] scsi_dh_alua: Requeue another not ready check condition at ML Mike Christie
2014-02-28 15:14   ` Hannes Reinecke
2014-02-28 20:20     ` Stewart, Sean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8255ED565A0EAA4A960625E27D49DBF24AC8B21D@SACEXCMBX04-PRD.hq.netapp.com \
    --to=sean.stewart@netapp.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.