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 <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451274
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2019-04-16 12:26:36 -04:00 committed by Jim Harris
parent 328c500001
commit c596ea4bd5

View File

@ -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;