All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>, linux-nvme@lists.infradead.org
Cc: Keith Busch <kbusch@kernel.org>, Chao Leng <lengchao@huawei.com>
Subject: Re: [PATCH 3/3] nvme: redirect commands on dying queue
Date: Fri, 14 Aug 2020 11:44:12 -0700	[thread overview]
Message-ID: <02f6276a-bbb5-5185-6a4a-1ac7aa938399@grimberg.me> (raw)
In-Reply-To: <20200814151528.277465-4-hch@lst.de>


> If a command send through nvme-multupath failed on a dying queue, resend it
> on another path.

So this is a race where we got a retry-able status from the controller
(not from the host teardwon sequence) and we just happen to see
a dying queue?

I guess that can happen..
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>


> 
> Signed-off-by: Chao Leng <lengchao@huawei.com>
> [hch: rebased on top of the completion refactoring]
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvme/host/core.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 8d474adad721fb..271cb9bf29dcd0 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -275,13 +275,13 @@ static inline enum nvme_disposition nvme_decide_disposition(struct request *req)
>   		return COMPLETE;
>   
>   	if (req->cmd_flags & REQ_NVME_MPATH) {
> -		if (nvme_is_path_error(status))
> +		if (nvme_is_path_error(status) || blk_queue_dying(req->q))
>   			return FAILOVER;
> +	} else {
> +		if (blk_queue_dying(req->q))
> +			return COMPLETE;
>   	}
>   
> -	if (blk_queue_dying(req->q))
> -		return COMPLETE;
> -
>   	return RETRY;
>   }
>   
> 

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-08-14 18:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 15:15 nvme completion handling refactor and fix Christoph Hellwig
2020-08-14 15:15 ` [PATCH 1/3] nvme: rename and document nvme_end_request Christoph Hellwig
2020-08-14 18:31   ` Sagi Grimberg
2020-08-14 15:15 ` [PATCH 2/3] nvme: refactor command completion Christoph Hellwig
2020-08-14 18:37   ` Sagi Grimberg
2020-08-15  6:54     ` Christoph Hellwig
2020-08-17  7:45       ` Sagi Grimberg
2020-08-17  7:54         ` Christoph Hellwig
2020-08-17  3:30   ` Chao Leng
2020-08-14 15:15 ` [PATCH 3/3] nvme: redirect commands on dying queue Christoph Hellwig
2020-08-14 18:44   ` Sagi Grimberg [this message]
2020-08-15  6:55     ` Christoph Hellwig
2020-08-17  3:54       ` Chao Leng
2020-08-17  7:46         ` Sagi Grimberg
2020-08-17  3:41   ` Chao Leng
2020-08-17  5:49     ` Chao Leng
2020-08-17  8:13       ` Christoph Hellwig
2020-08-19  1:42         ` Chao Leng

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=02f6276a-bbb5-5185-6a4a-1ac7aa938399@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=lengchao@huawei.com \
    --cc=linux-nvme@lists.infradead.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.