bdev/nvme: Prioritize aborted_by_request higher than ctrlr_is_unavailable
Abort is used usually for error cases. When abort is done, controller may not be available. At completion, controller availability was checked prior to aborted by request. Hence if abort is done when controller is not available, the aborted request is retried. Fix the case in this patch. Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I3e7b356797dd50faed0e5113f6f7a47fea26d9cc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14098 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3d59045a2a
commit
fc912a0284
@ -1041,8 +1041,8 @@ bdev_nvme_io_complete_nvme_status(struct nvme_bdev_io *bio,
|
||||
goto complete;
|
||||
}
|
||||
|
||||
if (cpl->status.dnr != 0 || (g_opts.bdev_retry_count != -1 &&
|
||||
bio->retry_count >= g_opts.bdev_retry_count)) {
|
||||
if (cpl->status.dnr != 0 || spdk_nvme_cpl_is_aborted_by_request(cpl) ||
|
||||
(g_opts.bdev_retry_count != -1 && bio->retry_count >= g_opts.bdev_retry_count)) {
|
||||
goto complete;
|
||||
}
|
||||
|
||||
@ -1062,8 +1062,6 @@ bdev_nvme_io_complete_nvme_status(struct nvme_bdev_io *bio,
|
||||
}
|
||||
}
|
||||
delay_ms = 0;
|
||||
} else if (spdk_nvme_cpl_is_aborted_by_request(cpl)) {
|
||||
goto complete;
|
||||
} else {
|
||||
bio->retry_count++;
|
||||
|
||||
@ -5855,8 +5853,8 @@ bdev_nvme_admin_passthru_complete_nvme_status(void *ctx)
|
||||
goto complete;
|
||||
}
|
||||
|
||||
if (cpl->status.dnr != 0 || (g_opts.bdev_retry_count != -1 &&
|
||||
bio->retry_count >= g_opts.bdev_retry_count)) {
|
||||
if (cpl->status.dnr != 0 || spdk_nvme_cpl_is_aborted_by_request(cpl) ||
|
||||
(g_opts.bdev_retry_count != -1 && bio->retry_count >= g_opts.bdev_retry_count)) {
|
||||
goto complete;
|
||||
}
|
||||
|
||||
@ -5867,8 +5865,6 @@ bdev_nvme_admin_passthru_complete_nvme_status(void *ctx)
|
||||
spdk_nvme_cpl_is_aborted_sq_deletion(cpl) ||
|
||||
!nvme_ctrlr_is_available(nvme_ctrlr)) {
|
||||
delay_ms = 0;
|
||||
} else if (spdk_nvme_cpl_is_aborted_by_request(cpl)) {
|
||||
goto complete;
|
||||
} else {
|
||||
bio->retry_count++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user