All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <kbusch@kernel.org>,
	James Smart <james.smart@broadcom.com>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH 3/3] nvme: allocate the keep alive request using BLK_MQ_REQ_NOWAIT
Date: Thu, 4 Mar 2021 08:03:04 +0100	[thread overview]
Message-ID: <3fa418ac-e727-710a-bb0f-274038f90579@suse.de> (raw)
In-Reply-To: <20210303125304.1200789-4-hch@lst.de>

On 3/3/21 1:53 PM, Christoph Hellwig wrote:
> To avoid an error recovery deadlock where the keep alive work is waiting
> for a request and thus can't be flushed to make progress for tearing down
> the controller.  Also print the error code returned from
> blk_mq_alloc_request to help debugging any future issues in this code.
> 
> Based on an earlier patch from Hannes Reinecke <hare@suse.de>.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvme/host/core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index bdeb3feae61899..8a4a9fe96cdf83 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1241,10 +1241,10 @@ static void nvme_keep_alive_work(struct work_struct *work)
>   	}
>   
>   	rq = nvme_alloc_request(ctrl->admin_q, &ctrl->ka_cmd,
> -				BLK_MQ_REQ_RESERVED);
> +				BLK_MQ_REQ_RESERVED | BLK_MQ_REQ_NOWAIT);
>   	if (IS_ERR(rq)) {
>   		/* allocation failure, reset the controller */
> -		dev_err(ctrl->device, "keep-alive failed\n");
> +		dev_err(ctrl->device, "keep-alive failed: %ld\n", PTR_ERR(rq));
>   		nvme_reset_ctrl(ctrl);
>   		return;
>   	}
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

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

  parent reply	other threads:[~2021-03-04  8:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 12:53 reserved tag allocation fixups Christoph Hellwig
2021-03-03 12:53 ` [PATCH 1/3] nvme-fabrics: only reserve a single tag Christoph Hellwig
2021-03-03 21:03   ` Daniel Wagner
2021-03-03 21:26   ` Chaitanya Kulkarni
2021-03-04  7:02   ` Hannes Reinecke
2021-03-05 20:51   ` Sagi Grimberg
2021-03-06  7:09     ` Christoph Hellwig
2021-03-15 17:12       ` Sagi Grimberg
2021-03-03 12:53 ` [PATCH 2/3] nvme: merge nvme_keep_alive into nvme_keep_alive_work Christoph Hellwig
2021-03-03 21:01   ` Daniel Wagner
2021-03-03 21:24   ` Chaitanya Kulkarni
2021-03-03 21:53   ` Chaitanya Kulkarni
2021-03-04  7:02   ` Hannes Reinecke
2021-03-15 17:13   ` Sagi Grimberg
2021-03-03 12:53 ` [PATCH 3/3] nvme: allocate the keep alive request using BLK_MQ_REQ_NOWAIT Christoph Hellwig
2021-03-03 21:00   ` Daniel Wagner
2021-03-03 21:22   ` Chaitanya Kulkarni
2021-03-04  7:03   ` Hannes Reinecke [this message]
2021-03-15 17:13   ` Sagi Grimberg

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=3fa418ac-e727-710a-bb0f-274038f90579@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.