History

nvme: introduce "Command Aborted By host" status code

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.

Max Gurtovoy committed 7 years ago

Commit 2dc39471 parent 59534b93 files · +3 −1Browse files

Unified · Split

3 files
  1. drivers/nvme/host/core.c +1 −1
  2. drivers/nvme/host/multipath.c +1 −0
  3. include/linux/nvme.h +1 −0
drivers/nvme/host/core.c+1−1
@@ -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}
drivers/nvme/host/multipath.c+1−0
@@ -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.
include/linux/nvme.h+1−0
@@ -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,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t