Commit a58416ab authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

nvme: set ctrlr state to ERROR as part of spdk_nvme_ctrlr_fail()



We should set the ctrlr state to ERROR whenever the ctrlr is
explicitly marked as failed. This ensures that the initialization
process stops (with error) as expected if the ctrlr is marked failed
during initialization.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: Ibeb4d31c0940ef700d0d72e91bcccd7f81f9ef6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23736


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 9d98a82e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1038,6 +1038,7 @@ nvme_ctrlr_fail(struct spdk_nvme_ctrlr *ctrlr, bool hot_remove)
	}

	ctrlr->is_failed = true;
	nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ERROR, NVME_TIMEOUT_INFINITE);
	nvme_transport_ctrlr_disconnect_qpair(ctrlr, ctrlr->adminq);
	NVME_CTRLR_ERRLOG(ctrlr, "in failed state.\n");
}