Commit c596ea4b authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

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: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451274


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarLiang Yan <liang.z.yan@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 328c5000
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;