From: Martin George <marting@netapp.com>
To: Hannes Reinecke <hare@suse.de>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Christoph Hellwig <hch@lst.de>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] sd: always retry READ CAPACITY for ALUA state transition
Date: Fri, 1 May 2015 18:09:35 +0530 [thread overview]
Message-ID: <55437407.7060702@netapp.com> (raw)
In-Reply-To: <55421F70.80102@suse.de>
On 4/30/2015 5:56 PM, Hannes Reinecke wrote:
> On 04/28/2015 11:18 PM, James Bottomley wrote:
>> On Mon, 2015-04-27 at 11:35 +0200, Hannes Reinecke wrote:
>>> During ALUA state transitions the device might return
>>> a sense code 02/04/0a (Logical unit not accessible, asymmetric
>>> access state transition). As this is a transient error
>>> we should just retry the READ CAPACITY call until
>>> the state transition finishes and the correct
>>> capacity can be returned.
>>>
>>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>>> ---
>>> drivers/scsi/sd.c | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
>>> index 79beebf..7178b05 100644
>>> --- a/drivers/scsi/sd.c
>>> +++ b/drivers/scsi/sd.c
>>> @@ -1987,6 +1987,11 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,
>>> * give it one more chance */
>>> if (--reset_retries > 0)
>>> continue;
>>> + if (sense_valid &&
>>> + sshdr.sense_key == NOT_READY &&
>>> + sshdr.asc == 0x04 && sshdr.ascq == 0x0A)
>>> + /* ALUA state transition; always retry */
>>> + continue;
>>> }
>>> retries--;
>>>
>>> @@ -2069,6 +2074,11 @@ static int read_capacity_10(struct scsi_disk *sdkp, struct scsi_device *sdp,
>>> * give it one more chance */
>>> if (--reset_retries > 0)
>>> continue;
>>> + if (sense_valid &&
>>> + sshdr.sense_key == NOT_READY &&
>>> + sshdr.asc == 0x04 && sshdr.ascq == 0x0A)
>>> + /* ALUA state transition; always retry */
>>> + continue;
>>> }
>>> retries--;
>>>
>>
>> Got to say I really don't like this infinite retry possibility. How
>> long does the ALUA transition take? Would increasing retries work (or
>> even hijacking reset_retries)?
>>
> Well ... transitioning could be quite long (NetApp FAS has a
> transition timeout of 30 _minutes_ ...).
Well, actually NetApp FAS has a transition timeout of 2 minutes, and not
30 minutes - as reported in the IMPLICIT TRANSITION TIMEOUT value in the
extended RTPG data.
-Martin
next prev parent reply other threads:[~2015-05-01 12:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 9:35 [PATCH] sd: always retry READ CAPACITY for ALUA state transition Hannes Reinecke
2015-04-28 21:18 ` James Bottomley
2015-04-30 12:26 ` Hannes Reinecke
2015-05-01 12:39 ` Martin George [this message]
2015-05-01 13:22 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2017-10-17 7:11 Hannes Reinecke
2017-10-17 13:57 ` James Bottomley
2017-10-18 5:54 ` Hannes Reinecke
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=55437407.7060702@netapp.com \
--to=marting@netapp.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--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.