[PATCHv5 0/3] nvmet: unique discovery subsystems

Hannes Reinecke hare at suse.de
Thu Apr 7 23:59:27 PDT 2022


Hi all,

here's my next attempt to support unique discovery subsystems.

As per suggestion from Christoph this patchset allows to have a per-port
discovery subsystem. For that a normal NVMe subsystem needs to be created
via configfs, the type needs to be changed to 'discovery', and then linked
into the port where this discovery subsystem should be visible.

Once that is done the discovery log page output will include all ports
into which the same discovery controller is linked.

If the discovery subsystem is unlinked the default behaviour is reinstated.

As usual, comments and reviews are welcome.

Changes to v4:
- Unset disc_subsys pointer when unique discovery subsystem
  gets unlinked
- Improve documentation
- Use port count to determine if a subsystem is linked to ports

Changes to v3:
- Rework to use per-port discovery subsystems as suggested by hch

Changes to v2:
- Heavily rework after discussion on the mailing list

Changes to the original submission:
- Include all subsystems in the discovery log output

Hannes Reinecke (3):
  nvmet: make the subsystem type configurable
  nvmet: per-port discovery subsystem
  nvmet: include all configured ports in the discovery log page

 drivers/nvme/target/configfs.c  | 70 +++++++++++++++++++++++++
 drivers/nvme/target/core.c      | 15 ++++--
 drivers/nvme/target/discovery.c | 92 +++++++++++++++++++++++++--------
 drivers/nvme/target/nvmet.h     |  2 +
 4 files changed, 154 insertions(+), 25 deletions(-)

-- 
2.29.2




More information about the Linux-nvme mailing list