linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Zach Brown <zab@zabbo.net>
Cc: Josef Bacik <josef@redhat.com>,
	linux-btrfs@vger.kernel.org, wfg@linux.intel.com
Subject: Re: [PATCH] Btrfs: use rcu to protect device->name V2
Date: Tue, 12 Jun 2012 14:08:01 -0400	[thread overview]
Message-ID: <20120612180800.GE1565@localhost.localdomain> (raw)
In-Reply-To: <4FD77D52.8000203@zabbo.net>

On Tue, Jun 12, 2012 at 10:33:06AM -0700, Zach Brown wrote:
> 
> >#define device_name_printk(dev, level, fmt, ...) do {		\
> >	struct rcu_string *name;				\
> >								\
> >	rcu_read_lock();					\
> >	name = rcu_dereference(dev->name);			\
> >	printk(level "%s: " fmt, name->str, ##__VA_ARGS__);	\
> >	rcu_read_unlock();					\
> >	} while (0)
> 
> Right, that has the same problem of limiting flexibility in the device
> name args.  That's why I gave that example of a specific macro for
> dereferencing a device name arg's rcu_string.
> 
> Does this diff make it more clear?  It's generated on your patch, only
> build tested..
> 

Ah ok I like that better than what I had, I'll do that, thanks,

Josef

      reply	other threads:[~2012-06-12 18:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 13:30 [PATCH] Btrfs: use rcu to protect device->name V2 Josef Bacik
2012-06-11 21:10 ` Zach Brown
2012-06-12 13:25   ` Josef Bacik
2012-06-12 13:43   ` Josef Bacik
2012-06-12 17:33     ` Zach Brown
2012-06-12 18:08       ` Josef Bacik [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=20120612180800.GE1565@localhost.localdomain \
    --to=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wfg@linux.intel.com \
    --cc=zab@zabbo.net \
    /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).