From: Mike Snitzer <snitzer@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Mike Christie <michaelc@cs.wisc.edu>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
James Bottomley <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org
Subject: Re: scsi_dh_alua: add missing transitioning state support
Date: Wed, 22 Sep 2010 08:29:01 -0400 [thread overview]
Message-ID: <20100922122901.GA10218@redhat.com> (raw)
In-Reply-To: <4C99D6B3.3090003@suse.de>
On Wed, Sep 22 2010 at 6:13am -0400,
Hannes Reinecke <hare@suse.de> wrote:
> Mike Christie wrote:
> > On 09/21/2010 02:33 PM, Mike Snitzer wrote:
> >> 2) the patch also modified alua_rtpg() so implicit ALUA would retry
> >> (just like explicit ALUA currently does) if TPGS_STATE_TRANSITIONING
> >> - so why should we avoid retry for implicit but do it for explicit?
> >
> > Leaving that for Hannes. I cannot think of a reason. Probably just did
> > not do it.
>
> Finally I got around to answering this.
>
> I've attached a patch which I made the other day which seems to work
> reasonably well.
> Looks better from my side, so if you agree I'll be sending it
> upstream properly.
Looks good for covering this "2)" change above.
But "1)" change you had concern with (in my previous patch) was that
alua_prep_fn would return BLKPREP_DEFER if TPGS_STATE_TRANSITIONING.
This was bad in that FS requests (like the directio path checker) would
always call ->prep_fn and that if TPGS_STATE_TRANSITIONING the RTPG
state would never be reevaluated.. leaving us stuck in BLKPREP_DEFER.
Seems I'm missing a new flow that proves this is no longer a concern.
Please advise, thanks.
Mike
> From d3f02c90db3e3177309b78726d082e17dd772ee2 Mon Sep 17 00:00:00 2001
> From: Hannes Reinecke <hare@suse.de>
> Date: Wed, 22 Sep 2010 12:09:07 +0200
> Subject: [PATCH] scsi_dh_alua: Handle all states correctly
>
> For ALUA we should be handling all states, independent of whether
> is explicit or implicit. For 'Transitioning' we should be retry
> for a certain amount of time; after that an error should be
> returned.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 1a970a7..c6f57e3 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
...
> @@ -698,8 +704,11 @@ static int alua_prep_fn(struct scsi_device *sdev, struct request *req)
> struct alua_dh_data *h = get_alua_data(sdev);
> int ret = BLKPREP_OK;
>
> - if (h->state != TPGS_STATE_OPTIMIZED &&
> - h->state != TPGS_STATE_NONOPTIMIZED) {
> + if (h->state == TPGS_STATE_TRANSITIONING)
> + ret = BLKPREP_DEFER;
> + else if (h->state != TPGS_STATE_OPTIMIZED &&
> + h->state != TPGS_STATE_NONOPTIMIZED &&
> + h->state != TPGS_STATE_LBA_DEPENDENT) {
> ret = BLKPREP_KILL;
> req->cmd_flags |= REQ_QUIET;
> }
next prev parent reply other threads:[~2010-09-22 12:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 19:05 [PATCH] scsi_dh_alua: add missing transitioning state support Mike Snitzer
2010-08-17 19:23 ` Nicholas A. Bellinger
2010-08-30 9:36 ` Hannes Reinecke
2010-08-31 15:11 ` Mike Snitzer
2010-09-20 15:35 ` Mike Snitzer
2010-09-21 2:27 ` Mike Christie
2010-09-21 2:28 ` Mike Christie
2010-09-21 19:33 ` Mike Snitzer
2010-09-21 21:14 ` Mike Christie
2010-09-22 10:13 ` Hannes Reinecke
2010-09-22 12:29 ` Mike Snitzer [this message]
2010-09-23 7:15 ` Hannes Reinecke
2010-09-23 13:44 ` Mike Snitzer
2010-09-23 18:53 ` Mike Snitzer
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=20100922122901.GA10218@redhat.com \
--to=snitzer@redhat.com \
--cc=James.Bottomley@suse.de \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=nab@linux-iscsi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).