linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH 2/3] nvme: avoid reconnection for the discovery controller
Date: Thu, 24 May 2018 16:18:16 +0200	[thread overview]
Message-ID: <20180524141817.127576-3-hare@suse.de> (raw)
In-Reply-To: <20180524141817.127576-1-hare@suse.de>

If the connection to the discovery controller fails for whatever
reason we should not attempt to reconnect; rather the user should
retry the discovery altogether.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/fabrics.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index d25aa4322d16..997d8677ab44 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -474,6 +474,9 @@ EXPORT_SYMBOL_GPL(nvmf_connect_io_queue);
 
 bool nvmf_should_reconnect(struct nvme_ctrl *ctrl)
 {
+	if (ctrl->opts->discovery_nqn)
+		return false;
+
 	if (ctrl->opts->max_reconnects != -1 &&
 	    ctrl->nr_reconnects < ctrl->opts->max_reconnects)
 		return true;
-- 
2.12.3

  parent reply	other threads:[~2018-05-24 14:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 14:18 [PATCH 0/3] nvme: fix stuck discovery Hannes Reinecke
2018-05-24 14:18 ` [PATCH 1/3] nvme: centralize discovery controller defaults Hannes Reinecke
2018-05-24 20:31   ` James Smart
2018-05-25  8:55   ` Christoph Hellwig
2018-05-24 14:18 ` Hannes Reinecke [this message]
2018-05-24 20:30   ` [PATCH 2/3] nvme: avoid reconnection for the discovery controller James Smart
2018-05-25  6:43     ` Hannes Reinecke
2018-05-24 14:18 ` [PATCH 3/3] nvme: allow duplicate connections to " Hannes Reinecke
2018-05-24 20:31   ` James Smart
2018-05-25  8:56   ` Christoph Hellwig
2018-06-18 16:11   ` James Smart
2018-06-18 22:54     ` Hannes Reinecke
2018-06-18 23:57       ` James Smart
2018-06-19 10:05         ` Hannes Reinecke

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=20180524141817.127576-3-hare@suse.de \
    --to=hare@suse.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;
as well as URLs for NNTP newsgroup(s).