From: Ashok Vairavan Date: Fri, 26 Aug 2016 17:18:19 +0000 (-0700) Subject: NVMe: End sync requests immediately on failure X-Git-Tag: v4.1.12-92~82^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=21b6c56a4585405647e656ca5a77ec6e1b1b438a;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Jens Axboe Orabug: 24561038 Mainline Commit: 75619bfa904d0f2840b4274eb92ce47b2e1c472e Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index b3e0a2a57c59..e0c325dace5d 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1041,7 +1041,8 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, if (IS_ERR(req)) return PTR_ERR(req); - req->cmd_type = REQ_TYPE_SPECIAL; + req->cmd_type = REQ_TYPE_SPECIAL; + req->cmd_flags = REQ_FAILFAST_DRIVER; req->__data_len = 0; req->__sector = (sector_t) -1; req->bio = req->biotail = NULL;