Skip to contentSkip to conversation

NVMe: Use requested sync command timeout

PATCH New Keith Busch 1 participant 2 messages May 28, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 NVMe: Use requested sync command timeout

Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/nvme-core.c +1 -1
index c42bc53..4eb9917 100644
@@ -1014,7 +1014,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
 	req->__sector = (sector_t) -1;
 	req->bio = req->biotail = NULL;
 
-	req->timeout = ADMIN_TIMEOUT;
+	req->timeout = timeout ? timeout : ADMIN_TIMEOUT;
 
 	req->cmd = (unsigned char *)cmd;
 	req->cmd_len = sizeof(struct nvme_command);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 NVMe: End sync requests immediately on failure

Do not retry failed sync commands so the original status may be seen without issuing unnecessary retries.

Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/block/nvme-core.c +1 -0
index 4eb9917..6ed1356 100644
@@ -1010,6 +1010,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
 		return PTR_ERR(req);
 
 	req->cmd_type = REQ_TYPE_DRV_PRIV;
+	req->cmd_flags = REQ_FAILFAST_DRIVER;
 	req->__data_len = 0;
 	req->__sector = (sector_t) -1;
 	req->bio = req->biotail = NULL;
Signature · 1 line
1.7.10.4