On 02/03/2026 14:12, Christoph Hellwig wrote:
On Wed, Feb 25, 2026 at 03:39:48PM +0000, John Garry wrote:
This switches the NVMe host driver to use libmultipath. That library
is very heavily based on the NVMe multipath code, so the change over
should hopefully be straightforward. There is often a direct replacement
for functions.
Given how little code this removes while adding the new libmultipath
dependency and abstractions I can't say I like this at all.
Yeah, so we're losing about 300 lines here in the conversion. However
nvme mulitpath.c goes from 1410 -> 1250 lines with this series - that's
not good enough to justify the change.
In a quick review of the code, there is more stuff which I push down
(into the lib). And a lot of the abstraction code can be condensed - if
you check something like numa_node_show(), there are 6 variables needed
just to get to the point where the common helper could be called - that
is just silly.
Another issue is just that the remaining code is NVMe specific, like ANA
support, or just doesn't fit the SCSI model, e.g. NVMe iopolicy is per
subsystem, while for SCSI we don't have a subsystem concept and I so
made iopolicy per multipathed SCSI disk.