Fix the status code of canceled requests initiated by the host according to TP4028 (Status Code 0x371): "Command Aborted By host: The command was aborted as a result of host action (e.g., the host disconnected the Fabric connection)." Also in a multipath environment, unless otherwise specified, errors of this type (path related) should be retried using a different path, if one is available.
Unified · Split
| @@ -298,7 +298,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved) · 297 unmodified lines | ||
| 298 | 298 | if (blk_mq_request_completed(req)) |
| 299 | 299 | return true; |
| 300 | 300 | |
| 301 | − nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR; | |
| 301 | + nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD; | |
| 302 | 302 | blk_mq_complete_request(req); |
| 303 | 303 | return true; |
| 304 | 304 | } |
| @@ -95,6 +95,7 @@ void nvme_failover_req(struct request *req) · 94 unmodified lines | ||
| 95 | 95 | } |
| 96 | 96 | break; |
| 97 | 97 | case NVME_SC_HOST_PATH_ERROR: |
| 98 | + case NVME_SC_HOST_ABORTED_CMD: | |
| 98 | 99 | /* |
| 99 | 100 | * Temporary transport disruption in talking to the controller. |
| 100 | 101 | * Try to send on a new path. |
| @@ -1368,6 +1368,7 @@ enum { · 1367 unmodified lines | ||
| 1368 | 1368 | NVME_SC_ANA_INACCESSIBLE = 0x302, |
| 1369 | 1369 | NVME_SC_ANA_TRANSITION = 0x303, |
| 1370 | 1370 | NVME_SC_HOST_PATH_ERROR = 0x370, |
| 1371 | + NVME_SC_HOST_ABORTED_CMD = 0x371, | |
| 1371 | 1372 | |
| 1372 | 1373 | NVME_SC_CRD = 0x1800, |
| 1373 | 1374 | NVME_SC_DNR = 0x4000, |