From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH V2 2/2] nvme-loop: use xarray for loop port tracking
Date: Mon, 5 Oct 2020 14:48:35 +0200 [thread overview]
Message-ID: <20201005124835.GB518@lst.de> (raw)
In-Reply-To: <20200930045557.53669-3-chaitanya.kulkarni@wdc.com>
> + unsigned long idx;
>
> - mutex_lock(&nvme_loop_ports_mutex);
> - list_for_each_entry(p, &nvme_loop_ports, entry) {
> + rcu_read_lock();
> + xa_for_each(&nvme_loop_ports, idx, p) {
Why is the rcu_read_lock()? We'd need a synchronize_rcu on the port
disable side. But the manual mutex_locking seems more sensible here
anyway.
> + xa_init(&nvme_loop_ports);
I don't think this is needed.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
prev parent reply other threads:[~2020-10-05 12:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 4:55 [PATCH V2 0/2] nvme-loop: use xarray for ctrl and port list Chaitanya Kulkarni
2020-09-30 4:55 ` [PATCH V2 1/2] nvme-loop: use xarray for loop ctrl tracking Chaitanya Kulkarni
2020-10-05 12:46 ` Christoph Hellwig
2020-10-06 2:56 ` Chaitanya Kulkarni
2020-09-30 4:55 ` [PATCH V2 2/2] nvme-loop: use xarray for loop port tracking Chaitanya Kulkarni
2020-10-05 12:48 ` Christoph Hellwig [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=20201005124835.GB518@lst.de \
--to=hch@lst.de \
--cc=chaitanya.kulkarni@wdc.com \
--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).