Commit 3dc3f416 authored by Ziye Yang's avatar Ziye Yang Committed by Changpeng Liu
Browse files

nvmf: Update the subsystem state check during connect



Observed some issues related with AER in the testpool,
which states that the subsystem is not ready. So change
the check, which will be more accurate. We only did not
allow the subsystem in inactive state or deactivitating
state. For others, we can still queue the requests.

Change-Id: Ic041298dfc5f7d7bfab5f5e5314ade377273df32
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439797


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 40f70de0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -358,7 +358,8 @@ spdk_nvmf_ctrlr_connect(struct spdk_nvmf_request *req)
		return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
	}

	if (subsystem->state != SPDK_NVMF_SUBSYSTEM_ACTIVE) {
	if ((subsystem->state == SPDK_NVMF_SUBSYSTEM_INACTIVE) ||
	    (subsystem->state == SPDK_NVMF_SUBSYSTEM_DEACTIVATING)) {
		SPDK_ERRLOG("Subsystem '%s' is not ready\n", subnqn);
		rsp->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC;
		rsp->status.sc = SPDK_NVMF_FABRIC_SC_CONTROLLER_BUSY;