From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Keith Busch <kbusch@kernel.org>,
linux-nvme@lists.infradead.org, Yi Zhang <yi.zhang@redhat.com>,
Chunguang Xu <brookxu.cn@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH V2] nvme: mark ctrl as DEAD if removing from error recovery
Date: Thu, 29 Jun 2023 09:33:05 +0200 [thread overview]
Message-ID: <20230629073305.GA19464@lst.de> (raw)
In-Reply-To: <20230629064818.2070586-1-ming.lei@redhat.com>
On Thu, Jun 29, 2023 at 02:48:18PM +0800, Ming Lei wrote:
> @@ -4054,8 +4055,14 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
> * disconnected. In that case, we won't be able to flush any data while
> * removing the namespaces' disks; fail all the queues now to avoid
> * potentially having to clean up the failed sync later.
> + *
> + * If this removal happens during error recovering, resetting part
> + * may not be started, or controller isn't be recovered completely,
> + * so we have to treat controller as DEAD for avoiding IO hang since
> + * queues can be left as frozen and quiesced.
> */
> - if (ctrl->state == NVME_CTRL_DEAD) {
> + if (ctrl->state == NVME_CTRL_DEAD ||
> + ctrl->old_state != NVME_CTRL_LIVE) {
> nvme_mark_namespaces_dead(ctrl);
> nvme_unquiesce_io_queues(ctrl);
Thanks for the comment and style, but I really still think doing
the state check was wrong to start with, and adding a check on the
old state makes things significantly worse. Can we try to brainstorm
on how do this properly?
I think we need to first figure out how to balance the quiesce/unquiesce
calls, the placement of the nvme_mark_namespaces_dead call should
be the simple part.
next prev parent reply other threads:[~2023-06-29 7:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 6:48 [PATCH V2] nvme: mark ctrl as DEAD if removing from error recovery Ming Lei
2023-06-29 7:33 ` Christoph Hellwig [this message]
2023-06-29 8:01 ` Ming Lei
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=20230629073305.GA19464@lst.de \
--to=hch@lst.de \
--cc=brookxu.cn@gmail.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
--cc=stable@vger.kernel.org \
--cc=yi.zhang@redhat.com \
/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