]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nvme: allow timed-out ios to retry
authorJames Smart <jsmart2021@gmail.com>
Thu, 7 Sep 2017 20:18:04 +0000 (13:18 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Sep 2017 14:56:05 +0000 (08:56 -0600)
Currently the nvme_req_needs_retry() applies several checks to see if
a retry is allowed. On of those is whether the current time has exceeded
the start time of the io plus the timeout length. This check, if an io
times out, means there is never a retry allowed for the io. Which means
applications see the io failure.

Remove this check and allow the io to timeout, like it does on other
protocols, and retries to be made.

On the FC transport, a frame can be lost for an individual io, and there
may be no other errors that escalate for the connection/association.
The io will timeout, which causes the transport to escalate into creating
a new association, but the io that timed out, due to this retry logic, has
already failed back to the application and things are hosed.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index d470f031e27f52174700f50a81cd6600dc989d43..5589f67d2cd8ee91466ae309e97f468174fd702f 100644 (file)
@@ -134,8 +134,6 @@ static inline bool nvme_req_needs_retry(struct request *req)
                return false;
        if (nvme_req(req)->status & NVME_SC_DNR)
                return false;
-       if (jiffies - req->start_time >= req->timeout)
-               return false;
        if (nvme_req(req)->retries >= nvme_max_retries)
                return false;
        return true;