From: Daniel Wagner <dwagner@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [RFC v2 2/3] nvme: move ns id info to struct nvme_ns_head
Date: Mon, 4 Dec 2023 11:56:05 +0100 [thread overview]
Message-ID: <v7ixirgnem6tlk7zcirhkazkrswx26yfuq7xxwxnvicyueqvn4@ubhf4axlztc5> (raw)
In-Reply-To: <24805050-82d3-4704-98ff-1909213abbbc@grimberg.me>
On Mon, Dec 04, 2023 at 10:30:52AM +0200, Sagi Grimberg wrote:
> > -bool nvme_mpath_clear_current_path(struct nvme_ns *ns)
> > +bool nvme_mpath_clear_current_path(struct nvme_ns_head *head)
> > {
> > - struct nvme_ns_head *head = ns->head;
> > bool changed = false;
> > int node;
> > @@ -181,7 +183,7 @@ bool nvme_mpath_clear_current_path(struct nvme_ns *ns)
> > goto out;
> > for_each_node(node) {
> > - if (ns == rcu_access_pointer(head->current_path[node])) {
> > + if (head == rcu_access_pointer(head->current_path[node])->head) {
> > rcu_assign_pointer(head->current_path[node], NULL);
> > changed = true;
> > }
>
> I'm not sure about this one.
>
> This is changing the behavior of the function. Previously it only
> cleared the current_path if it was directed to ns, now it will if the
> current_path has the same head, which is always the case isn't it?
>
> I'm unsure to why this change is needed?
As Christoph pointed out we really need to check the ns pointer. I tried
to workaound not to use nvme_ctrl_find_ns. Anyway, I'll drop this hunk
here.
Thanks,
Daniel
next prev parent reply other threads:[~2023-12-04 10:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 9:27 [RFC v2 0/3] nvme: add csi, ms and nuse to sysfs Daniel Wagner
2023-12-01 9:27 ` [RFC v2 1/3] nvme: lookup ctrl from request instead from namespace Daniel Wagner
2023-12-04 7:46 ` Christoph Hellwig
2023-12-04 8:24 ` Sagi Grimberg
2023-12-01 9:27 ` [RFC v2 2/3] nvme: move ns id info to struct nvme_ns_head Daniel Wagner
2023-12-04 7:51 ` Christoph Hellwig
2023-12-04 10:41 ` Daniel Wagner
2023-12-04 8:30 ` Sagi Grimberg
2023-12-04 10:56 ` Daniel Wagner [this message]
2023-12-01 9:27 ` [RFC v2 3/3] nvme: add csi, ms and nuse to sysfs Daniel Wagner
2023-12-04 8:48 ` Sagi Grimberg
2023-12-05 6:02 ` Chaitanya Kulkarni
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=v7ixirgnem6tlk7zcirhkazkrswx26yfuq7xxwxnvicyueqvn4@ubhf4axlztc5 \
--to=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 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).