linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH 04/10] nvme: clear current path on ANA state change
Date: Tue, 29 May 2018 14:43:16 +0200	[thread overview]
Message-ID: <20180529144316.24ccbf59@pentland.suse.de> (raw)
In-Reply-To: <20180529122212.rd74wmr42nysxii2@linux-x5ow.site>

On Tue, 29 May 2018 14:22:12 +0200
"Johannes Thumshirn" <jthumshirn@suse.de> wrote:

> On Tue, May 29, 2018@12:14:25PM +0200, Hannes Reinecke wrote:
> > Whenever ANA state changes the path selection needs to be
> > retriggered, so we should be clearing the current path here.
> > 
> > Signed-off-by: Hannes Reinecke <hare at suse.com>
> > ---
> >  drivers/nvme/host/multipath.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/nvme/host/multipath.c
> > b/drivers/nvme/host/multipath.c index a5f43d164b19..a520582811f8
> > 100644 --- a/drivers/nvme/host/multipath.c
> > +++ b/drivers/nvme/host/multipath.c
> > @@ -44,6 +44,7 @@ void nvme_set_disk_name(char *disk_name, struct
> > nvme_ns *ns, static void nvme_update_ana_state(struct nvme_ns *ns,
> > enum nvme_ana_state state) {
> >  	WRITE_ONCE(ns->ctrl->ana_state[ns->anagrpid], state);
> > +	nvme_mpath_clear_current_path(ns);  
> 
> Don't we need the subsys lock when calling
> nvme_mpath_clear_current_path()? At least that's how I interpreted
> Paul here:
> http://lists.infradead.org/pipermail/linux-nvme/2018-May/017484.html
> 
> 

I'm aware of that, and interpreted it differently.
In the end we're only _clearing_ the pointer, not assigning a new one.
And clearing is always an atomic update, so that's okay.
We might be racing with another update, but then this is not a
hard requirement but rather a hint to the path selector. So if it's
being overwritten later on, fine.

Cheers,

Hannes

  reply	other threads:[~2018-05-29 12:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 10:14 [PATCH 00/10] nvme: ANA fixups Hannes Reinecke
2018-05-29 10:14 ` [PATCH 01/10] nvme: add missing kfree() in nvme_configure_ana() Hannes Reinecke
2018-05-29 12:16   ` Johannes Thumshirn
2018-05-29 12:39   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 02/10] nvme: ANA transition timeout handling Hannes Reinecke
2018-05-29 12:47   ` Christoph Hellwig
2018-05-29 13:34     ` Hannes Reinecke
2018-05-29 13:47       ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 03/10] nvme: Only update capacity for optimized or non-optimized paths Hannes Reinecke
2018-05-29 12:38   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 04/10] nvme: clear current path on ANA state change Hannes Reinecke
2018-05-29 12:22   ` Johannes Thumshirn
2018-05-29 12:43     ` Hannes Reinecke [this message]
2018-05-29 12:48   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 05/10] nvme: retry nvme_get_log_ext() when processing ANA log Hannes Reinecke
2018-05-29 12:48   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 06/10] nvme: simplify check for ANA in nvme_ns_id_attrs_are_visible() Hannes Reinecke
2018-05-29 12:49   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 07/10] nvmet: make ANATT configurable Hannes Reinecke
2018-05-29 12:50   ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 08/10] nvmet: Set nanagrpid correctly Hannes Reinecke
2018-05-29 12:51   ` Christoph Hellwig
2018-05-29 13:04     ` Hannes Reinecke
2018-05-29 13:38       ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 09/10] nvmet: Set mnan correctly Hannes Reinecke
2018-05-29 12:52   ` Christoph Hellwig
2018-05-29 13:06     ` Hannes Reinecke
2018-05-29 13:40       ` Christoph Hellwig
2018-05-29 10:14 ` [PATCH 10/10] nvmet: set 'nuse' and 'nsze' to zero for inaccessible paths Hannes Reinecke
2018-05-29 12:57   ` Christoph Hellwig
2018-05-31 10:30 ` [PATCH 00/10] nvme: ANA fixups Sagi Grimberg
2018-05-31 16:26   ` 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=20180529144316.24ccbf59@pentland.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).