[PATCHv3 0/3] nvmet: unique discovery subsystem

Hannes Reinecke hare at suse.de
Wed Apr 6 07:22:07 PDT 2022


Hi all,

here's my third attempt to support unique discovery subsystems, heavily
modified from the previous two attempts.

The main idea is to not create the discovery subsystem per default, but
rather require the admin to create one.
As this is an incompatible change I've added a module parameter
'expose_discovery_subsys' to switch to the new behaviour.
The admin then need to configure the subsystem as normal by linking
it into the ports where the discovery subsystem should be visible.
And the discovery log then includes all configured ports to all
configured subsystems, as usual modified by whether the host may
access this subsystem or not.

Currently, there is no restriction on the number of discovery subsystems;
technically one can create any number of them. But this is primarily
because I'm too lazy to check (and we don't have a global enumeration for
subsystems) and not due to a design decision.

As usual, comments and reviews are welcome.

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: expose discovery subsystems
  nvmet: include all configured port in the discovery log page

 drivers/nvme/target/configfs.c  |  80 ++++++++++++++++++-
 drivers/nvme/target/core.c      |  19 ++++-
 drivers/nvme/target/discovery.c | 133 ++++++++++++++++++++++++++------
 drivers/nvme/target/nvmet.h     |   2 +
 4 files changed, 205 insertions(+), 29 deletions(-)

-- 
2.29.2




More information about the Linux-nvme mailing list