[PATCH v1 0/8] Enforce uniform metadata settings for ns head

Max Gurtovoy mgurtovoy at nvidia.com
Mon Jan 22 06:56:51 PST 2024


Hi Christoph/Sagi/Keith,
This patch series uniforms the namespace and it's head metadata
capabilities and definitions. It fixes a situation where a namespace
with metadata caps is exosed to a host controller without metadata
offload support via one port and to a host controller with metadata
offload support via second port. In this case, we will create separate
ns_head and won't use nvme-multipath unbrella for these namespaces.

We've also developed patches that allows the user to have a more
flexible control on the metadata offload enablement for a specific
controller (this control is using new nvmecli flag that is introduced in
a separate series).
For example:
"nvme connect --disallow_pi --transport=rdma --traddr=10.0.1.1 --trsvcid=4420 --nqn=test-nvme"

We also handle the case where the metadata capabilities of the target
were changed for a namespaces during the lifecycle of the controller.
In this case we will remove the namespace from the ns_head and will try
to create a new one (this will create a new ns_head as well).

While we're here we fixed also the transfer length calculation in case
the block layer doesn't generate/verify metadata (in this case only the HW
will do it so the new calculated transfer length value on the wire should be
written in the CC.SGL length).

This series is based on nvme-6.8 branch with 2 fixes added manually:
1. nvme-core: fix a memory leak in nvme_ns_info_from_identify() [from Maurizio Lombardi]
2. nvme: check for valid nvme_identify_ns() before using it [from  Ewan D. Milne]

Israel Rukshin (3):
  nvme-rdma: Fix transfer length when write_generate/read_verify are 0
  nvme-fabrics: add option to disallow T10-PI offload
  nvme-rdma: enable user to disallow T10-PI offload

Max Gurtovoy (4):
  nvme: use Independent ID-NS only for unknown cmd sets
  nvme: set uniform metadata settings for ns head
  nvme: allocate a new namespace if validation fail
  nvme: add nvme_queue_scan_sync helper

Ori Evron (1):
  nvme: sync the namespace scanning during ctrl start

 drivers/nvme/host/core.c    | 430 +++++++++++++++++++++++-------------
 drivers/nvme/host/fabrics.c |   7 +
 drivers/nvme/host/fabrics.h |   3 +
 drivers/nvme/host/rdma.c    |  18 +-
 4 files changed, 295 insertions(+), 163 deletions(-)

-- 
2.18.1




More information about the Linux-nvme mailing list