[RFC PATCHv3 0/2] nvme: queue_if_no_path functionality
Hannes Reinecke
hare at suse.de
Mon Oct 5 08:44:58 EDT 2020
Hi all,
this is a patchset based on Keiths original patch for restoring pre-fabrics
behaviour when the last path to a multipath device is removed.
Originally, the nvme device had been removed once the underlying hardware
had been removed. With the introduction of multipath support things changed;
it's now the 'CMIC' bit in the controller identification which controls the
behaviour. If it's set to non-zero, the device is retained even if the hardware
is removed. While this is okay for fabrics (as we can manually connect and
disconnect the devices), for nvme-pci this means that PCI hotplug ceases
to work as the device is never removed, and when reinserting the hardware
a new nvme device is created.
This patchset introduces a 'queue_if_no_path' flag to control the handling of
the last path; it's set for fabrics to retain the current functionality,
but unset for PCI to revert to the original, pre-fabrics behaviour.
Changes to v2:
- Merge two patches
- Fix to make it compile without CONFIG_NVME_MULTIPATH
- Move sysfs attributes to be compiled in only for CONFIG_NVME_MULTIPATH
Hannes Reinecke (1):
nvme: add 'queue_if_no_path' semantics
Keith Busch (1):
nvme-mpath: delete disk after last connection
drivers/nvme/host/core.c | 13 ++++++++++++-
drivers/nvme/host/multipath.c | 39 ++++++++++++++++++++++++++++++++++++++-
drivers/nvme/host/nvme.h | 4 +++-
3 files changed, 53 insertions(+), 3 deletions(-)
--
2.16.4
More information about the Linux-nvme
mailing list