+7
−0
+87
−0
+43
−2
+26
−2
+2
−0
Loading
This patch introduces namespace masking for NVMe-over-fabrics targets by allowing to (dynamically) add or remove hosts for a given namespace on a given subsystem. A host can only perform operations to a namespace it has been given access. To preserve current behavior all namespaces are automatically visible. To control visibility on a per-host basis, the nvmf_subsystem_add_ns RPC shall be called with "--no-auto-visible". We introduce two new RPC calls: - nvmf_ns_add_host <subsysNQN> <NSID> <hostNQN> - nvmf_ns_remove_host <subsysNQN> <NSID> <hostNQN> These RPCs apply both to existing and future controllers for the given subsystem/hostnqn pair. The list in spdk_nvmf_ns is used to keep track of hostNQNs which controllers should be attached on connect. The visible_ns array in spdk_nvmf_ctrlr is used for fast lookup to check whether a NSID is visible on command execution. Change-Id: I1c3a3c2bf3615fa76e7bfe3aaf08e2b82d6b4ec0 Signed-off-by:Jonas Pfefferle <pepperjo@japf.ch> Signed-off-by:
Jim Harris <jim.haris@samsung.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7821 Reviewed-by:
Ben Walker <ben@nvidia.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>