Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/9] nvme: allow timed-out ios to retry
Date: Mon, 18 Sep 2017 16:14:45 -0700	[thread overview]
Message-ID: <20170918231453.27128-2-hch@lst.de> (raw)
In-Reply-To: <20170918231453.27128-1-hch@lst.de>

From: James Smart <jsmart2021@gmail.com>

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 at broadcom.com>
Reviewed-by: Keith Busch <keith.busch at intel.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d470f031e27f..5589f67d2cd8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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;
-- 
2.14.1

  reply	other threads:[~2017-09-18 23:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 23:14 nvme multipath support V2 Christoph Hellwig
2017-09-18 23:14 ` Christoph Hellwig [this message]
2017-09-18 23:14 ` [PATCH 2/9] block: move REQ_NOWAIT Christoph Hellwig
2017-09-18 23:14 ` [PATCH 3/9] block: add REQ_DRV bit Christoph Hellwig
2017-09-18 23:14 ` [PATCH 4/9] block: provide a direct_make_request helper Christoph Hellwig
2017-09-18 23:14 ` [PATCH 5/9] block: add a blk_steal_bios helper Christoph Hellwig
2017-09-18 23:14 ` [PATCH 6/9] nvme: track subsystems Christoph Hellwig
2017-09-21 22:52   ` Keith Busch
2017-09-18 23:14 ` [PATCH 7/9] nvme: introduce a nvme_ns_ids structure Christoph Hellwig
2017-09-20  8:27   ` Johannes Thumshirn
2017-09-18 23:14 ` [PATCH 8/9] nvme: track shared namespaces Christoph Hellwig
2017-09-20  8:36   ` Johannes Thumshirn
2017-09-20 14:54     ` Christoph Hellwig
2017-09-21  5:22       ` Johannes Thumshirn
2017-09-21 14:37         ` Christoph Hellwig
2017-09-21 15:16           ` Keith Busch
2017-09-24 15:25             ` Christoph Hellwig
2017-09-18 23:14 ` [PATCH 9/9] nvme: implement multipath access to nvme subsystems Christoph Hellwig
2017-09-20  0:18   ` Tony Yang
2017-09-20  8:15     ` Johannes Thumshirn
2017-09-20  9:42   ` Johannes Thumshirn
2017-09-20 22:58   ` Keith Busch
2017-09-20 23:52     ` Christoph Hellwig
2017-09-21 21:12       ` Keith Busch
2017-09-24 14:42         ` Christoph Hellwig
2017-09-22 15:09   ` Keith Busch
2017-09-24 14:48     ` Christoph Hellwig
2017-09-20 11:09 ` nvme multipath support V2 Johannes Thumshirn
2017-09-20 14:55   ` Christoph Hellwig
2017-09-21  5:23     ` Johannes Thumshirn
2017-09-21 14:50       ` Christoph Hellwig
2017-09-22  0:21         ` Tony Yang
2017-09-24 14:41           ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918231453.27128-2-hch@lst.de \
    --to=hch@lst.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox