Commit 7d97acd4 authored by Michael Haeuptle's avatar Michael Haeuptle Committed by Jim Harris
Browse files

nvmf: Fixes outstanding io counting for NVME verify



The is_aer check doesn't check for the adminq to determine
if the cmd is an async event request. This can clash with
the verify IO cmd that has the same opc 0xc as the
async event request.
In the case of an nvme verify, io_outstanding would not
be decremented which then prevents the subsystem from ever
being paused.

Added adminq check for is_aer determination.

Change-Id: I498e85f761258c331ae4c206813a802bbea786d1
Signed-off-by: default avatarMichael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26068


Tested-by: default avatarSPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJacek Kalwas <jacek.kalwas@nutanix.com>
Reviewed-by: default avatarChangpeng Liu <changpeliu@tencent.com>
Reviewed-by: default avatarKonrad Sztyber <ksztyber@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
parent 0e49cede
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4699,9 +4699,10 @@ _nvmf_request_complete(void *ctx)
	if (spdk_likely(qpair->ctrlr)) {
		sgroup = &qpair->group->sgroups[qpair->ctrlr->subsys->id];
		assert(sgroup != NULL);
		is_aer = req->cmd->nvme_cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST;
		if (spdk_likely(qpair->qid != 0)) {
			qpair->group->stat.completed_nvme_io++;
		} else if (req->cmd->nvme_cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST) {
			is_aer = true;
		}

		/* If we changed nvme_cmd.nsid to match the passthrough nsid, we need to