nvmf: update the reservation information for ACQUIRE/RLEASE commands

Change-Id: Ibfebffa4d683da08ae8f9350cce144fafe6a5538
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455910
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Changpeng Liu 2019-06-11 02:48:21 -04:00
parent 196d4f704a
commit af6ed1e94a

View File

@ -1964,6 +1964,11 @@ exit:
}
}
if (update_sgroup && ns->ptpl_activated) {
if (nvmf_ns_update_reservation_info(ns)) {
status = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR;
}
}
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
req->rsp->nvme_cpl.status.sc = status;
return update_sgroup;
@ -2064,6 +2069,11 @@ nvmf_ns_reservation_release(struct spdk_nvmf_ns *ns,
}
exit:
if (update_sgroup && ns->ptpl_activated) {
if (nvmf_ns_update_reservation_info(ns)) {
status = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR;
}
}
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
req->rsp->nvme_cpl.status.sc = status;
return update_sgroup;