Commit 7c331adf authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvmf: update the subsystem poll group's reservation information correctly



Existing condition for updating subsystem poll group's reservation
information is wrong, when received the RELEASE command, the
reservation type may be changed to none, but it will not be
saved to the subsystem's poll group.

Change-Id: Idc177a0f03fb9611d6eda1e25a5b90caaa73d1be
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450727


Reviewed-by: default avatarLiang Yan <liang.z.yan@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent d02950e6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -951,10 +951,12 @@ poll_group_update_subsystem(struct spdk_nvmf_poll_group *group,

		if (ns == NULL) {
			memset(&sgroup->ns_info[i], 0, sizeof(struct spdk_nvmf_subsystem_pg_ns_info));
		} else if (ns->rtype && ns->holder) {
		} else {
			sgroup->ns_info[i].crkey = ns->crkey;
			sgroup->ns_info[i].rtype = ns->rtype;
			if (ns->holder) {
				sgroup->ns_info[i].holder_id = ns->holder->hostid;
			}

			memset(&sgroup->ns_info[i].reg_hostid, 0, SPDK_NVMF_MAX_NUM_REGISTRANTS * sizeof(struct spdk_uuid));
			j = 0;