linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Waiman Long <waiman.long@hp.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@redhat.com>,
	Miklos Szeredi <mszeredi@suse.cz>, Ingo Molnar <mingo@redhat.com>,
	Ian Kent <raven@themaw.net>,
	autofs mailing list <autofs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Andi Kleen <andi@firstfloor.org>,
	"Chandramouleeswaran, Aswin" <aswin@hp.com>,
	"Norton, Scott J" <scott.norton@hp.com>
Subject: Re: [PATCH v4 04/12] auto-fs: rename d_count field of dentry to d_refcount
Date: Thu, 4 Jul 2013 23:50:33 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1307042349230.11637@ionos.tec.linutronix.de> (raw)
In-Reply-To: <CA+55aFwNS+QSngRg4SQ_1o3GsGKqVXENaTsD0jB_8HwBP+kSUg@mail.gmail.com>

On Thu, 4 Jul 2013, Linus Torvalds wrote:

> On Thu, Jul 4, 2013 at 7:47 AM, Waiman Long <waiman.long@hp.com> wrote:
> >
> > I could change patch 3 so that I keep the d_count name, but #define
> > d_refcount to d_count. In that way, I can do piece-meal changes without
> > breaking the build. Alternatively, I could collapse patches 3-11 into a
> > single big patch which will be harder to review.
> 
> Since there are many fewer d_count users than there are d_lock users,
> I think collapsing things is the right thing to do.
> 
> That said, I think Al is right that for all those filesystem uses, we
> might actually be much better off with a helper function looking at
> d_count, with no macros etc, since they are purely about reading the
> count.
> 
> So maybe the right thing to do is to add a
> 
>    static inline int d_count(struct dentry *dentry) { return dentry->d_count; }
> 
> helper function *first*, and just say "filesystems should never access
> d_count directly", and make the few filesystem users use this helper
> function first. That way we can do that as independent commits to
> prepare for the switch-over.
> 
> Then when the switch-over happens, we just change "d_count" in that
> helper function, and it has no filesystem impact at all.
> 
> But fs/dcache.c and fs/namei.c that actually really know about and
> modify d_count would not use that helper function. It would purely be
> about isolating filesystems from these kinds of internal
> implementation issues: fs/cache.c and fs/namei.c are all *about* those
> internal issues, so they shouldn't be isolated..

And all of this can sanely be done with coccinelle. Julia will
certainly help to get the scripts right.

Thanks,

	tglx

      reply	other threads:[~2013-07-04 21:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04  3:33 [PATCH v4 04/12] auto-fs: rename d_count field of dentry to d_refcount Waiman Long
2013-07-04  3:50 ` Linus Torvalds
2013-07-04  4:59   ` Al Viro
2013-07-04 14:51     ` Waiman Long
2013-07-04 14:47   ` Waiman Long
2013-07-04 17:53     ` Linus Torvalds
2013-07-04 21:50       ` Thomas Gleixner [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=alpine.DEB.2.02.1307042349230.11637@ionos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=andi@firstfloor.org \
    --cc=aswin@hp.com \
    --cc=autofs@vger.kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mszeredi@suse.cz \
    --cc=peterz@infradead.org \
    --cc=raven@themaw.net \
    --cc=rostedt@goodmis.org \
    --cc=scott.norton@hp.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=waiman.long@hp.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;
as well as URLs for NNTP newsgroup(s).