Commit de02db63 authored by GangCao's avatar GangCao Committed by Tomasz Zawadzki
Browse files

lib/nvmf: check the return value of the resume operation



Change-Id: I87975e8cfc450463f46f00e90b4c6ff1744014ee
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16007


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
parent f042d6ba
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1350,7 +1350,10 @@ _nvmf_ns_hot_remove(struct spdk_nvmf_subsystem *subsystem,
		SPDK_ERRLOG("Failed to make changes to NVME-oF subsystem with id: %u\n", subsystem->id);
	}

	spdk_nvmf_subsystem_resume(subsystem, NULL, NULL);
	rc = spdk_nvmf_subsystem_resume(subsystem, NULL, NULL);
	if (rc != 0) {
		SPDK_ERRLOG("Failed to resume NVME-oF subsystem with id: %u\n", subsystem->id);
	}

	free(ctx);
}
@@ -1413,7 +1416,9 @@ _nvmf_ns_resize(struct spdk_nvmf_subsystem *subsystem, void *cb_arg, int status)
	struct subsystem_ns_change_ctx *ctx = cb_arg;

	nvmf_subsystem_ns_changed(subsystem, ctx->nsid);
	spdk_nvmf_subsystem_resume(subsystem, NULL, NULL);
	if (spdk_nvmf_subsystem_resume(subsystem, NULL, NULL) != 0) {
		SPDK_ERRLOG("Failed to resume NVME-oF subsystem with id: %u\n", subsystem->id);
	}

	free(ctx);
}