From: Nilay Shroff <nilay@linux.ibm.com>
To: John Garry <john.garry@linux.dev>, linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, sagi@grimberg.me, hch@lst.de, axboe@fb.com,
john.g.garry@oracle.com, wenxiong@linux.ibm.com,
gjoyce@linux.ibm.com
Subject: Re: [PATCH 0/2] nvme: add reference counting for transport modules
Date: Tue, 1 Sep 2026 15:17:56 +0530 [thread overview]
Message-ID: <e45bf216-3853-4c52-8bf9-2835e0c65509@linux.ibm.com> (raw)
In-Reply-To: <eb76f8b4-3730-410c-bdcd-3a36c46686ab@linux.dev>
On 9/1/26 1:44 PM, John Garry wrote:
> On 8/31/26 16:19, Nilay Shroff wrote:
>> Hi,
>>
>> This patchset adds reference counting for NVMe transport modules while
>> the corresponding multipath head node is open. This prevents the
>> underlying transport module from being unloaded while it is still in
>> use by the multipath head node. Unloading a transport module while it
>> is still in use can result in undefined behavior.
>>
>
> What is the undefined behaviour specifically?
>
Yes, so far we have observed I/O errors when the transport module is
unloaded while a filesystem is mounted on the multipath NVMe disk. This
becomes particularly problematic if the root filesystem is on that
device: once the transport module is unloaded, I/O fails and we can no
longer run commands to reload the NVMe transport module. In our testing,
the only recovery option in that situation has been to power-cycle the
system.
> When the ctrl ops module ref counting was originally introduced, the commit message mentioned a crash which it solves.
>
> So far for this problem we have seen a report that if we remove the module, the mounted FS will have IOs fail. The same can be experienced if the admin unbinds the device from the driver. However, I have not seen a mention of a crash, kernel data corruption, a hang, etc.
>
Yes I have also not observed a kernel crash or data corruption.
Regarding unbinding, this is triggered through the PCI/device-model
unbind path. The driver unbind callback returns void so the NVMe driver
has no way to reject or otherwise prevent the unbind operation from the
driver side. The purpose of this patch is therefore to protect the transport
module from being unloaded while the multipath head is still open.
Thanks,
--Nilay
next prev parent reply other threads:[~2026-09-01 9:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 15:19 [PATCH 0/2] nvme: add reference counting for transport modules Nilay Shroff
2026-08-31 15:19 ` [PATCH 1/2] nvme: keep transport module referenced while head node is open Nilay Shroff
2026-09-01 16:39 ` Keith Busch
2026-09-02 4:55 ` Nilay Shroff
2026-09-02 0:20 ` Wen Xiong
2026-09-02 13:31 ` Christoph Hellwig
2026-09-02 14:09 ` Nilay Shroff
2026-09-02 14:13 ` Christoph Hellwig
2026-09-02 14:25 ` Keith Busch
2026-09-02 14:27 ` Nilay Shroff
2026-09-13 14:03 ` Nilay Shroff
2026-08-31 15:19 ` [PATCH 2/2] nvme: add context annotation for nvme_ns_head::nr_openers Nilay Shroff
2026-09-01 8:14 ` [PATCH 0/2] nvme: add reference counting for transport modules John Garry
2026-09-01 9:47 ` Nilay Shroff [this message]
2026-09-01 10:14 ` John Garry
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=e45bf216-3853-4c52-8bf9-2835e0c65509@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@fb.com \
--cc=gjoyce@linux.ibm.com \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=john.garry@linux.dev \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=wenxiong@linux.ibm.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 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.