From: Omar Sandoval <osandov@osandov.com>
To: Joe Perches <joe@perches.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v6] Move BTRFS RCU string to common library
Date: Sat, 8 Nov 2014 23:32:34 -0800 [thread overview]
Message-ID: <20141109073234.GA28668@mew.home.network> (raw)
In-Reply-To: <1415463217.23530.26.camel@perches.com>
On Sat, Nov 08, 2014 at 08:13:37AM -0800, Joe Perches wrote:
> On Sat, 2014-11-08 at 00:46 -0800, Omar Sandoval wrote:
> > The RCU-friendly string API used internally by BTRFS is generic enough for
> > common use. This doesn't add any new functionality, but instead just moves the
> > code and documents the existing API.
>
> Some more trivia, can be updated later if desired.
>
> > diff --git a/include/linux/rcustring.h b/include/linux/rcustring.h
> > new file mode 100644
> []
> > +
> > +/**
> > + * printk_in_rcu() - printk in an RCU read-side critical section
>
> It'd be nice to show the arguments for kernel-doc here
My impression is that referencing printk tells you everything you need to know,
but for completeness' sake, that sounds fair.
> > + */
> > +#define printk_in_rcu(fmt, ...) \
> > + do { \
> > + rcu_read_lock(); \
> > + printk(fmt, __VA_ARGS__); \
>
> This should use ##__VA_ARGS__ to allow the
> compiler to elide the comma when using
>
> printk_in_rcu("Hello World!");
>
Luckily, there's probably no sane reason anyone would do a printk_in_rcu
without the varargs, but once again, it's probably good hygiene.
Anyone else have anything to add? Otherwise, I'll wrap this up in another
iteration of the patch.
Thanks!
--
Omar
next prev parent reply other threads:[~2014-11-09 7:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 20:17 [PATCH v5] Move BTRFS RCU string to common library Omar Sandoval
2014-11-07 20:21 ` Chris Mason
2014-11-08 0:39 ` Joe Perches
2014-11-08 8:46 ` [PATCH v6] " Omar Sandoval
2014-11-08 16:13 ` Joe Perches
2014-11-09 7:32 ` Omar Sandoval [this message]
2014-11-13 10:18 ` [PATCH v7] " Omar Sandoval
2014-11-20 22:10 ` Omar Sandoval
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=20141109073234.GA28668@mew.home.network \
--to=osandov@osandov.com \
--cc=clm@fb.com \
--cc=jbacik@fb.com \
--cc=joe@perches.com \
--cc=josh@joshtriplett.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
/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