Commit 17f3ea2d authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

nvme: respect abort_dnr when aborting queued req in submit



When a qpair is disconnected, queued requests are aborted with DNR bit
set to abort_dnr.  This wasn't true if we detected that a qpair was
disconnected while submitting a queued request.  Additionally, such
requests will now be completed with SPDK_NVME_SC_ABORTED_SQ_DELETION to
keep the behavior aligned with those aborted when qpair is disconnected.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2a4df203a9afe7fc19ca3e7258f7aa88ac5812de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19445


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent d4ee6f6c
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1059,8 +1059,15 @@ error:

	/* The request is from queued_req list we should trigger the callback from caller */
	if (spdk_unlikely(req->queued)) {
		if (rc == -ENXIO) {
			nvme_qpair_manual_complete_request(qpair, req, SPDK_NVME_SCT_GENERIC,
						   SPDK_NVME_SC_INTERNAL_DEVICE_ERROR, true, true);
							   SPDK_NVME_SC_ABORTED_SQ_DELETION,
							   qpair->abort_dnr, true);
		} else {
			nvme_qpair_manual_complete_request(qpair, req, SPDK_NVME_SCT_GENERIC,
							   SPDK_NVME_SC_INTERNAL_DEVICE_ERROR,
							   true, true);
		}
		return rc;
	}