From: Keith Busch <kbusch@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Stuart Hayes <stuart.w.hayes@gmail.com>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org, Hannes Reinecke <hare@suse.de>,
Martin Wilck <martin.wilck@suse.com>,
Ayush Siddarath <ayush.siddarath@dell.com>
Subject: Re: [PATCH v4] nvme_core: scan namespaces asynchronously
Date: Thu, 18 Jul 2024 13:16:47 -0600 [thread overview]
Message-ID: <ZplqH6uNn4IvULMS@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <64ec91e8-4ff2-4c56-a468-c194f803db6b@t-8ch.de>
On Wed, Jul 17, 2024 at 11:16:19PM +0200, Thomas Weißschuh wrote:
> On 2024-07-17 13:55:50+0000, Stuart Hayes wrote:
> > +static void nvme_scan_ns_async(void *data, async_cookie_t cookie)
> > +{
> > + struct async_scan_info *scan_info = data;
> > + int idx;
> > + u32 nsid;
> > +
> > + idx = (u32)atomic_fetch_add(1, &scan_info->next_nsid);
>
> atomic_fetch_inc() ?
Good call. Also, that returns an int, and 'idx' is an int too, so the
(u32) cast inbetween is unnecessary. The highest 'next_nsid' could
possibly be anyway is 1023, so int is fine.
prev parent reply other threads:[~2024-07-18 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 18:55 Stuart Hayes
2024-07-17 20:29 ` Sagi Grimberg
2024-07-17 20:46 ` Keith Busch
2024-07-18 2:10 ` stuart hayes
2024-07-18 19:14 ` Keith Busch
2024-07-22 14:46 ` Keith Busch
2024-07-17 21:16 ` Thomas Weißschuh
2024-07-18 19:16 ` Keith Busch [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=ZplqH6uNn4IvULMS@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=ayush.siddarath@dell.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux@weissschuh.net \
--cc=martin.wilck@suse.com \
--cc=sagi@grimberg.me \
--cc=stuart.w.hayes@gmail.com \
/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
all inboxes | Powered by JetHome®