[PATCH V2] nvme: Add module reference counting for multipath devices

Keith Busch kbusch at kernel.org
Wed Aug 26 07:23:42 PDT 2026


On Wed, Aug 26, 2026 at 06:10:09PM +0530, Nilay Shroff wrote:
> when none of those namespaces are actually in use. So for instance,
> with this change now, I can't rmmod nvme.ko until I delete
> all namespaces/paths created under PCIe nvme subsystem, even though
> no one is using the namespace/path under that subsystem.

I'd call that a feature. :)

> Instead, I think the module reference should track the lifetime of an
> active user of the multipath namespace. When the namespace is in use,
> the corresponding transport module(s) need to remain loaded and once
> the namespace is no longer in use, those references should be released.

That's what v1 was trying to do, but it doesn't work. The transports
used to reach a namespace may not be the same across the open and close.



More information about the Linux-nvme mailing list