From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: Hannes Reinecke <hare@suse.de>,
James Bottomley <james.bottomley@hansenpartnership.com>
Cc: Bart van Assche <bart.vanassche@sandisk.com>,
Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state
Date: Wed, 8 Jul 2015 11:41:23 +0300 [thread overview]
Message-ID: <559CE233.3080809@dev.mellanox.co.il> (raw)
In-Reply-To: <1436341268-91432-4-git-send-email-hare@suse.de>
On 7/8/2015 10:41 AM, Hannes Reinecke wrote:
> If a disk reports an ALUA 'transitioning' state we should not
> try to spin up the device.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/sd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 7c0bdaa..180a6e8 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -1801,6 +1801,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
> if (sense_valid && sshdr.sense_key == NOT_READY) {
> if (sshdr.asc == 4 && sshdr.ascq == 3)
> break; /* manual intervention required */
> + if (sshdr.asc == 4 && sshdr.ascq == 0xa)
> + break; /* transitioning */
> if (sshdr.asc == 4 && sshdr.ascq == 0xb)
> break; /* standby */
> if (sshdr.asc == 4 && sshdr.ascq == 0xc)
>
Hi Hannes,
Just nit-picking, but do you think that these four if statements can be
re-organized to condition (asc == 4) once and OR on the rest?
next prev parent reply other threads:[~2015-07-08 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 7:41 [PATCH 0/3] REAC CAPACITY fixes Hannes Reinecke
2015-07-08 7:41 ` [PATCH 1/3] sd: Fixup capacity for ALUA standby or transitioning ports Hannes Reinecke
2015-07-08 7:41 ` [PATCH 2/3] scsi: rescan device if an invalid capacity had been reported Hannes Reinecke
2015-07-27 19:55 ` Lee Duncan
2015-07-08 7:41 ` [PATCH 3/3] sd: do not try to spin-up disks for ALUA 'transitioning' state Hannes Reinecke
2015-07-08 8:41 ` Sagi Grimberg [this message]
2015-07-08 8:46 ` 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=559CE233.3080809@dev.mellanox.co.il \
--to=sagig@dev.mellanox.co.il \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.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.