Commit 300583e2 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

lib/nvme: when failing a controller, disconnect the admin qpair.



This is really useful when the intent of failing the qpair is to
do something like fail over to a different controller structure
and we want back completions for everything outstanding from the
admin queue.

Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Change-Id: Icbfdf855ddb1a380da7b9036ab5da6faab862e00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1815


Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 6189c0ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -757,6 +757,7 @@ nvme_ctrlr_fail(struct spdk_nvme_ctrlr *ctrlr, bool hot_remove)
		ctrlr->is_removed = true;
	}
	ctrlr->is_failed = true;
	nvme_transport_ctrlr_disconnect_qpair(ctrlr, ctrlr->adminq);
	SPDK_ERRLOG("ctrlr %s in failed state.\n", ctrlr->trid.traddr);
}