From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>,
linux-nvme@lists.infradead.org, Sagi Grimberg <sagi@grimberg.me>,
Keith Busch <keith.busch@wdc.com>, Martin Wilck <mwilck@suse.com>
Subject: [PATCH 1/2] nvme-multipath: fix logic for non-optimized paths
Date: Mon, 27 Jul 2020 18:08:02 +0200 [thread overview]
Message-ID: <20200727160803.55683-2-hare@suse.de> (raw)
In-Reply-To: <20200727160803.55683-1-hare@suse.de>
From: Martin Wilck <mwilck@suse.com>
Handle the special case where we have exactly one optimized path,
which we should keep using in this case.
Signed off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/nvme/host/multipath.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 66509472fe06..fe8f7f123fac 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -246,6 +246,12 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
fallback = ns;
}
+ /* No optimized path found, re-check the current path */
+ if (!nvme_path_is_disabled(old) &&
+ old->ana_state == NVME_ANA_OPTIMIZED) {
+ found = old;
+ goto out;
+ }
if (!fallback)
return NULL;
found = fallback;
--
2.16.4
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-07-27 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 16:08 [PATCH 0/2] nvme-multipath: fixes for non-optimized paths Hannes Reinecke
2020-07-27 16:08 ` Hannes Reinecke [this message]
2020-07-27 19:42 ` [PATCH 1/2] nvme-multipath: fix logic " Sagi Grimberg
2020-07-27 16:08 ` [PATCH 2/2] nvme-multipath: do not fall back to __nvme_find_path() " Hannes Reinecke
2020-07-27 19:46 ` Sagi Grimberg
2020-07-28 6:25 ` Hannes Reinecke
2020-07-28 6:43 ` Sagi Grimberg
2020-07-28 8:02 ` Christoph Hellwig
2020-07-28 8:14 ` Hannes Reinecke
2020-07-28 8:16 ` Christoph Hellwig
2020-07-28 8:18 ` Hannes Reinecke
2020-07-28 10:51 ` [PATCH 0/2] nvme-multipath: fixes " 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=20200727160803.55683-2-hare@suse.de \
--to=hare@suse.de \
--cc=hch@lst.de \
--cc=keith.busch@wdc.com \
--cc=linux-nvme@lists.infradead.org \
--cc=mwilck@suse.com \
--cc=sagi@grimberg.me \
/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