[PATCH 0/3] nvmet: use right MNAN value for controllers

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Sun Jun 13 13:02:49 PDT 2021


Hi,

In current implementation we report MNAN value as NVMET_MAX_NAMESPACES.

For Spec regarding MNAN value:-

If the controller supports Asymmetric Namespace Access Reporting, then
this field shall be set to a _non-zero_ value that is less than or equal
to the NN value.

The first patch sets identify controller MNAN value to subsys->max_nsid
that is always less than or equal to the NN.

The second patch prevents creating the controller from subsys if subsys
has 0 namespaces since it will report 0 (invalid) MNAN value.

The third patch prevents reporting such subsys in the dicovery log page.

-ck

Chaitanya Kulkarni (3):
  nvmet: use subsys->max_nsid to report MNAN
  nvmet: prevent creating ctrl with no namespace
  nvmet: don't report subsys with 0 namespaces

 drivers/nvme/target/admin-cmd.c |  2 +-
 drivers/nvme/target/core.c      |  9 +++++++++
 drivers/nvme/target/discovery.c | 13 +++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

-- 
2.22.1




More information about the Linux-nvme mailing list