From: Sagi Grimberg <sagi@grimberg.me>
To: Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>
Cc: linux-nvme@lists.infradead.org, Keith Busch <keith.busch@wdc.com>
Subject: Re: [PATCH] nvme: retrigger ANA log update if group descriptor isn't found
Date: Wed, 13 Jan 2021 19:13:10 -0800 [thread overview]
Message-ID: <cbfc78e1-87be-cc09-9b8d-44bf0659eb26@grimberg.me> (raw)
In-Reply-To: <20201205152901.56665-1-hare@suse.de>
> If ANA is enabled but no ANA group descriptor is found when creating
> a new namespace the ANA log is most likely out of date, so trigger
> a re-read. The namespace will be tagged with the NS_ANA_PENDING flag
> to exclude it from path selection until the ANA log has been re-read.
>
> Reported-by: Martin George <marting@netapp.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/host/multipath.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 74896be40c17..ee4a42dc99a0 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -667,6 +667,10 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
> if (desc.state) {
> /* found the group desc: update */
> nvme_update_ns_ana_state(&desc, ns);
> + } else {
> + /* group desc not found: trigger a re-read */
> + set_bit(NVME_NS_ANA_PENDING, &ns->flags);
> + queue_work(nvme_wq, &ns->ctrl->ana_work);
btw, I just commented on the original thread, but I do like this
one better.
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-01-14 3:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 15:29 [PATCH] nvme: retrigger ANA log update if group descriptor isn't found Hannes Reinecke
2020-12-07 15:31 ` Keith Busch
2020-12-07 15:34 ` Christoph Hellwig
2020-12-07 15:46 ` Keith Busch
2020-12-08 14:03 ` Christoph Hellwig
2020-12-08 19:17 ` Keith Busch
2020-12-09 7:35 ` Christoph Hellwig
2020-12-07 15:51 ` Hannes Reinecke
2021-01-14 3:13 ` Sagi Grimberg [this message]
2021-03-25 10:55 ` George, Martin
2021-03-25 21:54 ` Keith Busch
2021-03-25 22:20 ` Sagi Grimberg
2021-04-02 16:49 ` 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=cbfc78e1-87be-cc09-9b8d-44bf0659eb26@grimberg.me \
--to=sagi@grimberg.me \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=keith.busch@wdc.com \
--cc=linux-nvme@lists.infradead.org \
/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