Re: [PATCH] nvme: Add module reference counting for multipath nvme device
Wen Xiong <[email protected]>
| Newsgroups | org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <[email protected]> |
On 2026-08-11 15:49, Keith Busch wrote: > Let's say one path is rdma and the other is tcp. At the time you open, > the RDMA is the current optimal path, so you take a reference on the > nvme-rdma module. But while using this multipath device, the RDMA > connection is lost, so we failover to the TCP path. When you close the > multipath device, you find the TCP path, and then drop a reference on > the nvme-tcp module, leaking the RDMA reference, and underflowing TCP. Thanks for explaining this! > Just a note, unlike I initially thought, nvme_mpath_remove_disk() is > not > the mirror teardown function to nvme_mpath_add_disk(), so the path's > module reference put will have to be somewhere else, like > nvme_mpath_remove_sysfs_link(). Thanks! I can regenerate the patch as v2 and test it soon. Can I add module reference get in nvme_mpath_add_sysfs_link() instead of nvme_mpath_add_disk()? Thanks, Wendy