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

Keith Busch kbusch at kernel.org
Wed Aug 26 09:36:23 PDT 2026


On Wed, Aug 26, 2026 at 11:18:16AM -0500, Wen Xiong wrote:
> On 2026-08-26 07:40, Nilay Shroff wrote:
> 
> > Also, since a multipath head can have paths through different transports
> > , we should not take a reference only to the transport of one
> > namespace/path
> > found through nvme_find_path(), as was done in v1. Instead, when opening
> > the
> > head, take a module reference iterating through each controller
> > reachable
> > from the corresponding NVMe subsystem. This ensures that every transport
> > that can service I/O for the active multipath namespace remains loaded
> > for
> > the duration of its use.
> > 
> I will look into iterating though each controller/each namespace from nvme
> subsystem.

This is not viable. You can add and remove paths to a namespace at any
time such that the transports counted on open are not the namespace's
transports on close.



More information about the Linux-nvme mailing list