From c596ea4bd54cfdc462d85493ce79176595bc4a91 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Tue, 16 Apr 2019 12:26:36 -0400 Subject: [PATCH] nvmf: update subsystem's poll group information for register command Existing code only update the subsystem's poll group reservation information when unregistering the key, however, new registrant and update the key actions also need to be updated. Change-Id: Ib8db9eb457977757251403edb92eda073b846e59 Signed-off-by: Changpeng Liu Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451274 Tested-by: SPDK CI Jenkins Reviewed-by: Liang Yan Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/nvmf/subsystem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/nvmf/subsystem.c b/lib/nvmf/subsystem.c index 713a72ba6..15ca25db9 100644 --- a/lib/nvmf/subsystem.c +++ b/lib/nvmf/subsystem.c @@ -1575,6 +1575,7 @@ nvmf_ns_reservation_register(struct spdk_nvmf_ns *ns, status = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR; goto exit; } + update_sgroup = true; } else { /* register with same key is not an error */ if (reg->rkey != key.nrkey) { @@ -1623,6 +1624,7 @@ nvmf_ns_reservation_register(struct spdk_nvmf_ns *ns, goto exit; } reg->rkey = key.nrkey; + update_sgroup = true; break; default: status = SPDK_NVME_SC_INVALID_FIELD;