From: martinus.gpy@gmail.com (martinus.gpy@gmail.com)
Subject: [PATCH] nvme-multipath: relax ANA state check
Date: Mon, 28 Jan 2019 19:54:46 +0530 [thread overview]
Message-ID: <20190128142446.6732-1-marting@netapp.com> (raw)
From: Martin George <marting@netapp.com>
Always call nvme_mpath_set_live() when transitioning to a live
state, where live is defined as ANA Optimized or Non-Optimized,
irrespective of what the previous asymmetric access state was.
This removes the restriction of only permitting transitions
from states that were not considered live.
Signed-off-by: Martin George <marting at netapp.com>
Signed-off-by: Gargi Srinivas <sring at netapp.com>
---
drivers/nvme/host/multipath.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index b9fff3b8ed1b..23da7beadd62 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -366,15 +366,12 @@ static inline bool nvme_state_is_live(enum nvme_ana_state state)
static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
struct nvme_ns *ns)
{
- enum nvme_ana_state old;
-
mutex_lock(&ns->head->lock);
- old = ns->ana_state;
ns->ana_grpid = le32_to_cpu(desc->grpid);
ns->ana_state = desc->state;
clear_bit(NVME_NS_ANA_PENDING, &ns->flags);
- if (nvme_state_is_live(ns->ana_state) && !nvme_state_is_live(old))
+ if (nvme_state_is_live(ns->ana_state))
nvme_mpath_set_live(ns);
mutex_unlock(&ns->head->lock);
}
--
2.17.1
next reply other threads:[~2019-01-28 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 14:24 martinus.gpy [this message]
2019-01-28 16:30 ` [PATCH] nvme-multipath: relax ANA state check Christoph Hellwig
2019-01-28 17:10 ` George, Martin
2019-01-31 10:03 ` hch
-- strict thread matches above, loose matches on Subject: below --
2019-01-25 11:12 martinus.gpy
2019-01-25 12:57 ` Hannes Reinecke
2019-01-28 7:43 ` Christoph Hellwig
2019-01-28 14:01 ` George, Martin
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=20190128142446.6732-1-marting@netapp.com \
--to=martinus.gpy@gmail.com \
/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