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

Wen Xiong wenxiong at linux.ibm.com
Tue Sep 1 17:20:14 PDT 2026


On 2026-08-31 10:19, Nilay Shroff wrote:
> When a user opens an NVMe multipath head node, we take a reference to
> the head node, but this does not prevent the transport module backing
> its paths from being unloaded. This can result in the multipath head
> remaining open while its underlying transport module is unloaded.
> 
> Fix this by taking a reference to the transport module for each active
> path when the multipath head node is opened. Keep track of the number
> of active head node openers so that dynamically added paths acquire the
> same number of transport module references.
> 
> Similarly, when a path is removed while the head node is open, release
> the transport module reference once for each active head node opener.
> When the head node is closed, release the transport module reference
> held for each remaining active path.
> 
> This ensures that a transport module cannot be unloaded while it is
> still referenced by an open multipath head node.
> 
> Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>

Hi Nilay,

Thank you for your time and effort in working on this issue. I really 
appreciate your help!

Reviewed-by: Wen Xiong <wenxiong at linux.ibm.com>

Thanks,
Wendy



More information about the Linux-nvme mailing list