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
298298 if (blk_mq_request_completed(req))
299299 return true;
300300
301− nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR;
301+ nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
302302 blk_mq_complete_request(req);
303303 return true;
304304 }
drivers/nvme/host/multipath.c+1−0
@@ -95,6 +95,7 @@ void nvme_failover_req(struct request *req) · 94 unmodified lines
9595 }
9696 break;
9797 case NVME_SC_HOST_PATH_ERROR:
98+ case NVME_SC_HOST_ABORTED_CMD:
9899 /*
99100 * Temporary transport disruption in talking to the controller.
100101 * Try to send on a new path.
include/linux/nvme.h+1−0
@@ -1368,6 +1368,7 @@ enum { · 1367 unmodified lines
13681368 NVME_SC_ANA_INACCESSIBLE = 0x302,
13691369 NVME_SC_ANA_TRANSITION = 0x303,
13701370 NVME_SC_HOST_PATH_ERROR = 0x370,
1371+ NVME_SC_HOST_ABORTED_CMD = 0x371,
13711372
13721373 NVME_SC_CRD = 0x1800,
13731374 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