From cd2714b5b5c6a8d5b6c9da1fbd097a8992b27ac5 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Fri, 1 Apr 2022 10:30:54 +0900 Subject: [PATCH] nvme: Change nvme_qpair_abort_queued_reqs() to set SC_ABORTED_SQ_DELETION Transport specific qpair_abort_reqs() set SC to SC_ABORTED_SQ_DELETION. However, nvme_qpair_abort_queued_reqs() set SC to SC_ABORTED_BY_REQUEST even if its call is not requested by the upper layer. Change nvme_qpair_abort_queued_reqs() to set SC to SC_ABORTED_SQ_DELETION for consistency. nvme_qpair_abort_queued_reqs() is used to abort queued requests that were sent while adminq was connecting. SC_ABORTED_SQ_DELETION will not be so bad even for the case. This change is required for the NVMe bdev module to be resilient for I/O error. The NVMe bdev module does not retry I/O if SC is SC_ABORTED_BY_REQUEST. SC is set to SC_INTERNAL_DEVICE_ERROR if a request is failed to submit to qpair by a generic qpair layer. We can change it to SC_ABORTED_SQ_DELETION as well but we keep this for now. SC_INTERNAL_DEVICE_ERROR is also retriable for the NVMe bdev module. Signed-off-by: Shuhei Matsumoto Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12121 (master) (cherry picked from commit dbe7e74cee21c640677393fcd6fae05a6c0b53a4) Change-Id: I7d8d5e97b222fe9275afc4fed024c1654c9579a2 Signed-off-by: Krzysztof Karas Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12486 Reviewed-by: Tomasz Zawadzki Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- lib/nvme/nvme_qpair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvme/nvme_qpair.c b/lib/nvme/nvme_qpair.c index c48d4083b..f90ba0f93 100644 --- a/lib/nvme/nvme_qpair.c +++ b/lib/nvme/nvme_qpair.c @@ -560,7 +560,7 @@ nvme_qpair_abort_queued_reqs(struct spdk_nvme_qpair *qpair, uint32_t dnr) SPDK_ERRLOG("aborting queued i/o\n"); } nvme_qpair_manual_complete_request(qpair, req, SPDK_NVME_SCT_GENERIC, - SPDK_NVME_SC_ABORTED_BY_REQUEST, dnr, true); + SPDK_NVME_SC_ABORTED_SQ_DELETION, dnr, true); } }