From: Sagi Grimberg <sagi@grimberg.me>
To: Chao Leng <lengchao@huawei.com>, linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de
Subject: Re: [PATCH] nvme-fabrics: fix crash for no IO queues
Date: Fri, 5 Mar 2021 12:58:37 -0800 [thread overview]
Message-ID: <020b9f27-459a-2b98-2e76-ebcc874c9c32@grimberg.me> (raw)
In-Reply-To: <20210304005543.8005-1-lengchao@huawei.com>
> A crash happens when set feature(NVME_FEAT_NUM_QUEUES) timeout in nvme
> over rdma(roce) reconnection, the reason is use the queue which is not
> alloced.
>
> If queue is not live, should not allow queue request.
Can you describe exactly the scenario here? What is the state
here? LIVE? or DELETING?
>
> Signed-off-by: Chao Leng <lengchao@huawei.com>
> ---
> drivers/nvme/host/fabrics.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
> index 733010d2eafd..2479744fc349 100644
> --- a/drivers/nvme/host/fabrics.h
> +++ b/drivers/nvme/host/fabrics.h
> @@ -189,7 +189,7 @@ static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
> {
> if (likely(ctrl->state == NVME_CTRL_LIVE ||
> ctrl->state == NVME_CTRL_DELETING))
> - return true;
> + return queue_live;
> return __nvmf_check_ready(ctrl, rq, queue_live);
> }
There were some issues in the past that made us allow submitting
requests in DELETING state and introducing DELETING_NOIO. See
patch ecca390e8056 ("nvme: fix deadlock in disconnect during scan_work
and/or ana_work")
The driver should be able to accept I/O in DELETING because the core
changes the state to DELETING_NOIO _before_ it calls ->delete_ctrl so I
don't understand how you get to this if the queue is not allocated...
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-03-05 20:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 0:55 [PATCH] nvme-fabrics: fix crash for no IO queues Chao Leng
2021-03-05 20:58 ` Sagi Grimberg [this message]
2021-03-08 1:30 ` Chao Leng
2021-03-15 17:08 ` Sagi Grimberg
2021-03-16 1:23 ` Chao Leng
2021-03-16 2:02 ` Keith Busch
2021-03-16 5:08 ` Sagi Grimberg
2021-03-16 20:57 ` James Smart
2021-03-16 21:25 ` Keith Busch
2021-03-16 23:52 ` Sagi Grimberg
2021-03-17 0:19 ` James Smart
-- strict thread matches above, loose matches on Subject: below --
2021-03-03 2:53 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=020b9f27-459a-2b98-2e76-ebcc874c9c32@grimberg.me \
--to=sagi@grimberg.me \
--cc=axboe@fb.com \
--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 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).