public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19] nvme: switch to libmultipath
@ 2026-02-25 15:39 John Garry
  2026-02-25 15:39 ` [PATCH 01/19] nvme-multipath: pass NS head to nvme_mpath_revalidate_paths() John Garry
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: John Garry @ 2026-02-25 15:39 UTC (permalink / raw)
  To: hch, kbusch, sagi, axboe, martin.petersen, james.bottomley, hare
  Cc: jmeneghi, linux-nvme, linux-scsi, michael.christie, snitzer,
	bmarzins, dm-devel, linux-block, linux-kernel, John Garry

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.

The multipath functionality in nvme_ns_head and nvme_ns structures are
replaced with the mpath_head, mpath_disk, and mpath_device structures.

In the driver we have places which test is the nvme_ns_head structure has
member nvme_ns' - for this the nvme_ns_head list was used. Since that
member will disappear, a count of nvme_ns' is added.

It's hard to switch to libmulipath in a step-by-step fashion without
breaking builds or functionality. To make the series reviewable, I took
the approach of adding libmultipath-based code, which would initially be
unused, and then finally making the full switch.

I think that more testing is required here and any help on that would be
appreciated.

The series is based on baa47c4f89eb (nvme/nvme-7.0) nvme-pci: do not
try to add queue maps at runtime and [0]

[0] https://lore.kernel.org/linux-block/20260225153225.1031169-1-john.g.garry@oracle.com/T/#m928333859c0320e57ece0dfcf4ecf58baae3220f

John Garry (19):
  nvme-multipath: pass NS head to nvme_mpath_revalidate_paths()
  nvme: introduce a namespace count in the ns head structure
  nvme-multipath: add nvme_is_mpath_request()
  nvme-multipath: add initial support for using libmultipath
  nvme-multipath: add nvme_mpath_available_path()
  nvme-multipath: add nvme_mpath_{add, remove}_cdev()
  nvme-multipath: add nvme_mpath_is_{disabled, optimised}
  nvme-multipath: add nvme_mpath_get_access_state()
  nvme-multipath: add nvme_mpath_{bdev, cdev}_ioctl()
  nvme-multipath: add uring_cmd support
  nvme-multipath: add nvme_mpath_get_iopolicy()
  nvme-multipath: add PR support for libmultipath
  nvme-multipath: add nvme_mpath_report_zones()
  nvme-multipath: add nvme_mpath_get_unique_id()
  nvme-multipath: add nvme_mpath_synchronize()
  nvme-multipath: add nvme_mpath_{add,delete}_ns()
  nvme-multipath: add nvme_mpath_head_queue_if_no_path()
  nvme-multipath: set mpath_head_template.device_groups
  nvme-multipath: switch to use libmultipath

 drivers/nvme/host/Kconfig     |   1 +
 drivers/nvme/host/core.c      |  81 ++-
 drivers/nvme/host/ioctl.c     |  96 ++--
 drivers/nvme/host/multipath.c | 962 +++++++++++-----------------------
 drivers/nvme/host/nvme.h      | 117 +++--
 drivers/nvme/host/pr.c        | 205 ++++++--
 drivers/nvme/host/sysfs.c     |  84 +--
 7 files changed, 632 insertions(+), 914 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2026-03-02 16:14 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 15:39 [PATCH 00/19] nvme: switch to libmultipath John Garry
2026-02-25 15:39 ` [PATCH 01/19] nvme-multipath: pass NS head to nvme_mpath_revalidate_paths() John Garry
2026-02-25 15:39 ` [PATCH 02/19] nvme: introduce a namespace count in the ns head structure John Garry
2026-03-02 12:46   ` Nilay Shroff
2026-03-02 15:57     ` John Garry
2026-02-25 15:39 ` [PATCH 03/19] nvme-multipath: add nvme_is_mpath_request() John Garry
2026-02-25 15:39 ` [PATCH 04/19] nvme-multipath: add initial support for using libmultipath John Garry
2026-02-25 15:39 ` [PATCH 05/19] nvme-multipath: add nvme_mpath_available_path() John Garry
2026-02-25 15:39 ` [PATCH 06/19] nvme-multipath: add nvme_mpath_{add, remove}_cdev() John Garry
2026-02-25 15:39 ` [PATCH 07/19] nvme-multipath: add nvme_mpath_is_{disabled, optimised} John Garry
2026-02-25 15:39 ` [PATCH 08/19] nvme-multipath: add nvme_mpath_get_access_state() John Garry
2026-02-25 15:39 ` [PATCH 09/19] nvme-multipath: add nvme_mpath_{bdev, cdev}_ioctl() John Garry
2026-02-25 15:39 ` [PATCH 10/19] nvme-multipath: add uring_cmd support John Garry
2026-02-25 15:39 ` [PATCH 11/19] nvme-multipath: add nvme_mpath_get_iopolicy() John Garry
2026-02-25 15:40 ` [PATCH 12/19] nvme-multipath: add PR support for libmultipath John Garry
2026-02-25 15:40 ` [PATCH 13/19] nvme-multipath: add nvme_mpath_report_zones() John Garry
2026-02-25 15:40 ` [PATCH 14/19] nvme-multipath: add nvme_mpath_get_unique_id() John Garry
2026-02-25 15:40 ` [PATCH 15/19] nvme-multipath: add nvme_mpath_synchronize() John Garry
2026-02-25 15:40 ` [PATCH 16/19] nvme-multipath: add nvme_mpath_{add,delete}_ns() John Garry
2026-03-02 12:48   ` Nilay Shroff
2026-03-02 15:59     ` John Garry
2026-02-25 15:40 ` [PATCH 17/19] nvme-multipath: add nvme_mpath_head_queue_if_no_path() John Garry
2026-02-25 15:40 ` [PATCH 18/19] nvme-multipath: set mpath_head_template.device_groups John Garry
2026-02-25 15:40 ` [PATCH 19/19] nvme-multipath: switch to use libmultipath John Garry
2026-03-02 12:57   ` Nilay Shroff
2026-03-02 16:13     ` John Garry
2026-03-02 14:12 ` [PATCH 00/19] nvme: switch to libmultipath Christoph Hellwig
2026-03-02 14:58   ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox