summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorZhengrong Li <zhengrong_li@linux.alibaba.com>2026-07-28 16:26:01 +0800
committerKeith Busch <kbusch@kernel.org>2026-08-10 12:19:16 -0700
commit0a96b9e440331bffbf049f80d7e5c96417d37e36 (patch)
tree34c35fce068bc27e64a38dc0ff7e3c176a608e25 /tools/perf/scripts/python/bin
parentba98d6796d12258e837ece065d2ecb59d76ce4ff (diff)
nvmet: fix Reservation Register Replace for unregistered host with IEKEY
When a host sends a Reservation Register command with RREGA=Replace and IEKEY=1 without being previously registered, nvmet returns Reservation Conflict. The NVMe specification states: "A host may replace its reservation key without regard to its registration status or current reservation key value by setting the Ignore Existing Key (IEKEY) bit to '1' in the Reservation Register command." Fix nvmet_pr_replace() to add a new registrant when the host is not found in the registrant list and IEKEY is set with a non-zero NRKEY. If IEKEY is set but NRKEY is zero, return Invalid Field since there is no valid reservation key to register. Tested with nvme-cli against nvmet-tcp: # no prior registration nvme resv-register /dev/nvmeXn1 -n 1 --rrega=2 --iekey --nrkey=0x9999 Before: RESERVATION_CONFLICT (0x4083) After: success, registrant created with rkey 0x9999 Fixes: 5a47c2080a73 ("nvmet: support reservation feature") Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Guixin Liu <kanie@linux.alibaba.com> Signed-off-by: Zhengrong Li <zhengrong_li@linux.alibaba.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions