linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: dm-devel@redhat.com, linux-scsi@vger.kernel.org
Cc: hare@suse.com
Subject: Re: [dm-devel] [PATCH] dm-mpath: always return reservation conflict
Date: Thu, 11 Aug 2016 20:38:32 +0200	[thread overview]
Message-ID: <20160811183832.GA27144@lst.de> (raw)
In-Reply-To: <1470141392-25479-2-git-send-email-hch@lst.de>

ping?

On Tue, Aug 02, 2016 at 02:36:32PM +0200, Christoph Hellwig wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> If dm-mpath encounters an reservation conflict it should not fail the
> path (as communication with the target is not affected) but should
> rather retry on another path. However, in doing so we might be inducing
> a ping-pong between paths, with no guarantee of any forward progress.
> 
> And arguably a reservation conflict is an unexpected error, so we should
> be passing it upwards to allow the application to take appropriate steps.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Acked-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/md/dm-mpath.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 7eac080..8d2f916 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -1555,16 +1555,22 @@ static int do_end_io(struct multipath *m, struct request *clone,
>  	if (noretry_error(error))
>  		return error;
>  
> -	if (mpio->pgpath)
> +	/*
> +	 * EBADE signals an reservation conflict.
> +	 * We shouldn't fail the path here as we can communicate with
> +	 * the target. We should failover to the next path, but in
> +	 * doing so we might be causing a ping-pong between paths.
> +	 * So just return the reservation conflict error.
> +	 */
> +	if (error == -EBADE)
> +		r = error;
> +	else if (mpio->pgpath)
>  		fail_path(mpio->pgpath);
>  
>  	if (!atomic_read(&m->nr_valid_paths)) {
>  		if (!test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) {
>  			if (!must_push_back_rq(m))
>  				r = -EIO;
> -		} else {
> -			if (error == -EBADE)
> -				r = error;
>  		}
>  	}
>  
> -- 
> 2.1.4
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
---end quoted text---

  reply	other threads:[~2016-08-11 18:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 12:36 [PING / RESEND] handling reservation conflicts in dm-mpath Christoph Hellwig
2016-08-02 12:36 ` [PATCH] dm-mpath: always return reservation conflict Christoph Hellwig
2016-08-11 18:38   ` Christoph Hellwig [this message]
2016-08-15 13:08     ` Mike Snitzer
2016-08-15 13:40       ` Mike Snitzer
2016-09-26 16:52         ` [dm-devel] " Christoph Hellwig
2016-09-26 19:06           ` James Bottomley
2016-09-27  6:34             ` Hannes Reinecke
2016-09-27 18:50               ` James Bottomley
2016-09-29 15:01                 ` Mike Snitzer
2016-09-29 15:35                   ` Christoph Hellwig
2016-09-30  0:55                   ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2015-07-15 11:23 [PATCH] " Hannes Reinecke
2015-07-15 11:35 ` James Bottomley
2015-07-16  5:07   ` Christophe Varoqui
2015-07-16  7:54     ` [dm-devel] " Christoph Hellwig
2015-07-16 14:40       ` 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=20160811183832.GA27144@lst.de \
    --to=hch@lst.de \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.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 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).