From: Hannes Reinecke <hare@suse.de>
To: Mohamed Khalfella <mkhalfella@purestorage.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: Justin Tee <justin.tee@broadcom.com>,
Naresh Gottumukkala <nareshgottumukkala83@gmail.com>,
Paul Ely <paul.ely@broadcom.com>,
Hannes Reinecke <hare@kernel.org>,
Chaitanya Kulkarni <kch@nvidia.com>,
James Smart <jsmart833426@gmail.com>,
Randy Jennings <randyj@purestorage.com>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 18/18] nvme: let controller deletion wait out a fencing window
Date: Mon, 21 Sep 2026 10:12:54 +0200 [thread overview]
Message-ID: <ad652a54-a1b4-4a47-91da-d1e6922904d2@suse.de> (raw)
In-Reply-To: <20260918181614.3947933-19-mkhalfella@purestorage.com>
On 9/18/26 8:14 PM, Mohamed Khalfella wrote:
> DELETING is not reachable from FENCING or FENCED, so during a fencing
> window nvme_delete_ctrl() fails with -EBUSY. Its callers assume
> deleting a live controller cannot fail: a sysfs disconnect is silently
> dropped after the delete_controller node is already gone, rdma device
> removal returns with the controller still holding resources on the
> outgoing device, and module unload leaks live controllers.
>
> Fencing is time-bounded and always ends in a state that allows
> deletion. Add nvme_delete_ctrl_wait(), which waits on ctrl->state_wq
> for the fencing window to end and retries, and use it in the tcp/rdma
> module exit paths and rdma device removal. Make nvme_delete_ctrl_sync()
> wait the same way so a sysfs disconnect during fencing is delayed
> instead of dropped.
>
> nvme-fc's remoteport unregister with dev_loss_tmo == 0 keeps the
> non-waiting call since it runs under rport->lock; it does not need to
> wait, as dev_loss_end has already expired and the reconnect path
> deletes the controller once fencing completes.
>
> Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
> ---
> drivers/nvme/host/core.c | 41 ++++++++++++++++++++++++++++++++++++++--
> drivers/nvme/host/nvme.h | 1 +
> drivers/nvme/host/rdma.c | 4 ++--
> drivers/nvme/host/tcp.c | 2 +-
> 4 files changed, 43 insertions(+), 5 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2026-09-21 8:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 18:14 [PATCH 00/18] TP8028 Rapid Path Failure Recovery Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 01/18] nvmet: Rapid Path Failure Recovery set controller identify fields Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 02/18] nvmet/debugfs: Export controller CIU and CIRN via debugfs Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 03/18] nvmet: Implement CCR nvme command Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 04/18] nvmet: Implement CCR logpage Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 05/18] nvmet: Send an AEN on CCR completion Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 06/18] nvme: Rapid Path Failure Recovery read controller identify fields Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 07/18] nvme: Introduce FENCING and FENCED controller states Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 08/18] nvme: Implement cross-controller reset recovery Mohamed Khalfella
2026-09-21 7:04 ` Hannes Reinecke
2026-09-18 18:14 ` [PATCH 09/18] nvme: Implement cross-controller reset completion Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 10/18] nvme-tcp: Use CCR to recover controller that hits an error Mohamed Khalfella
2026-09-21 7:07 ` Hannes Reinecke
2026-09-18 18:14 ` [PATCH 11/18] nvme-rdma: " Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 12/18] nvme-fc: start error recovery instead of aborting timed out IOs Mohamed Khalfella
2026-09-21 7:33 ` Hannes Reinecke
2026-09-18 18:14 ` [PATCH 13/18] nvme-fc: perform error recovery directly from ioerr_work Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 14/18] nvme-fc: Use CCR to recover controller that hits an error Mohamed Khalfella
2026-09-21 8:07 ` Hannes Reinecke
2026-09-21 8:11 ` Hannes Reinecke
2026-09-18 18:14 ` [PATCH 15/18] nvme-fc: Hold inflight requests while in FENCING state Mohamed Khalfella
2026-09-21 8:10 ` Hannes Reinecke
2026-09-18 18:14 ` [PATCH 16/18] nvmet: Add support for CQT to nvme target Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 17/18] nvme: Add support for CQT to nvme host Mohamed Khalfella
2026-09-18 18:14 ` [PATCH 18/18] nvme: let controller deletion wait out a fencing window Mohamed Khalfella
2026-09-21 8:12 ` Hannes Reinecke [this message]
2026-09-20 18:34 ` [PATCH 00/18] TP8028 Rapid Path Failure Recovery Mohamed Khalfella
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=ad652a54-a1b4-4a47-91da-d1e6922904d2@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=jsmart833426@gmail.com \
--cc=justin.tee@broadcom.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mkhalfella@purestorage.com \
--cc=nareshgottumukkala83@gmail.com \
--cc=paul.ely@broadcom.com \
--cc=randyj@purestorage.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®