All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org, Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v2] nvme: invalidate paths during rescan
Date: Wed, 11 Aug 2021 17:22:46 +0200	[thread overview]
Message-ID: <20210811152246.ppr46xj437cxhqdy@carbon.lan> (raw)
In-Reply-To: <8718c238-de35-ad35-898d-e6620446276f@grimberg.me>

Hi Sagi,

On Tue, Aug 10, 2021 at 06:18:01PM -0700, Sagi Grimberg wrote:
> > +void nvme_mpath_invalidate_paths(struct nvme_ns *ns)
> 
> invalidate is not a great name for this very specific case here.

Okay, I opted for nvme_mpath_revalidate_paths() as we already have
nvme_revalidate_zones() which does also capacity checks too.

> > +{
> > +	struct nvme_ns_head *head = ns->head;
> > +	sector_t capacity = get_capacity(head->disk);
> > +	int node;
> > +
> > +	for_each_node(node)
> > +		rcu_assign_pointer(head->current_path[node], NULL);
> 
> Here the ns can get re-selected as the current path.

This is on purpose. By clearing all current_path the next
nvme_find_path() will select a valid current_path which might be the
same path.

> > +
> > +	list_for_each_entry_rcu(ns, &head->list, siblings) {
> > +		if (capacity != get_capacity(ns->disk))
> > +			set_bit(NVME_NS_INVALIDATED, &ns->flags);
> 
> maybe instead of invalidated reverse the polarity with
> NVME_NS_READY? clear it here and set it in update_ns_info?

Will do, see next version.

Thanks for the feedback!

Daniel

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply	other threads:[~2021-08-11 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  7:10 [PATCH v2] nvme: invalidate paths during rescan Daniel Wagner
2021-08-11  1:18 ` Sagi Grimberg
2021-08-11 15:22   ` Daniel Wagner [this message]

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=20210811152246.ppr46xj437cxhqdy@carbon.lan \
    --to=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=linux-nvme@lists.infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.