[PATCH 1/2] nvme: keep transport module referenced while head node is open

Nilay Shroff nilay at linux.ibm.com
Sat Sep 26 03:54:38 PDT 2026


On 9/25/26 1:08 PM, Christoph Hellwig wrote:
> On Tue, Sep 22, 2026 at 09:03:38PM +0530, Nilay Shroff wrote:
>> Hi Christoph, Keith
>>
>> A gent ping on this one...
>> Do you have any further comment/feedback on this one?
> 
> I still don't think this is a good idea.  Removing the transport is
> valid, and allows to create a valid condition (multipath gendisk without
> paths).

Yes, I agree that a zero-path multipath gendisk is a valid state, and
I think the proposed change does not alter that semantics. With the proposed
change, we only take a reference on the underlying transport module while
the multipath head has active openers. Once the last opener/user goes away, the
transport module reference is dropped, so the transport can still be unloaded
when there are no users of the multipath gendisk. Does that address your
concern, or do you think we should also allow unloading the underlying
transport module while the multipath gendisk has active openers?

The case I'm trying to protect is specifically when the multipath head
is backing the root filesystem. If the intention is that the transport
should be unloadable even with active openers on the multipath gendisk,
perhaps we could make transport module pinning an opt-in nvme-core policy,
enabled through a module parameter (e.g. nvme_core.pin_transport), and
take the transport module reference only when that parameter is enabled.
The parameter would be disabled by default, so this would preserve the
valid zero-path/open-head case and would not generally pin transport
modules merely because the multipath head has active openers.

Any thoughts/suggestions?

Thanks,
--Nilay



More information about the Linux-nvme mailing list