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 | if (blk_mq_request_completed(req)) | 298 | if (blk_mq_request_completed(req)) |
| 299 | return true; | 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 | blk_mq_complete_request(req); | 302 | blk_mq_complete_request(req); |
| 303 | return true; | 303 | return true; |
| 304 | } | 304 | } |
| @@ -95,6 +95,7 @@ void nvme_failover_req(struct request *req) · 94 unmodified lines | |||
| 95 | } | 95 | } |
| 96 | break; | 96 | break; |
| 97 | case NVME_SC_HOST_PATH_ERROR: | 97 | case NVME_SC_HOST_PATH_ERROR: |
| 98 | case NVME_SC_HOST_ABORTED_CMD: | ||
| 98 | /* | 99 | /* |
| 99 | * Temporary transport disruption in talking to the controller. | 100 | * Temporary transport disruption in talking to the controller. |
| 100 | * Try to send on a new path. | 101 | * Try to send on a new path. |
| @@ -1368,6 +1368,7 @@ enum { · 1367 unmodified lines | |||
| 1368 | NVME_SC_ANA_INACCESSIBLE = 0x302, | 1368 | NVME_SC_ANA_INACCESSIBLE = 0x302, |
| 1369 | NVME_SC_ANA_TRANSITION = 0x303, | 1369 | NVME_SC_ANA_TRANSITION = 0x303, |
| 1370 | NVME_SC_HOST_PATH_ERROR = 0x370, | 1370 | NVME_SC_HOST_PATH_ERROR = 0x370, |
| 1371 | NVME_SC_HOST_ABORTED_CMD = 0x371, | ||
| 1371 | 1372 | ||
| 1372 | NVME_SC_CRD = 0x1800, | 1373 | NVME_SC_CRD = 0x1800, |
| 1373 | NVME_SC_DNR = 0x4000, | 1374 | NVME_SC_DNR = 0x4000, |