From: "Jörn Engel" <joern@lazybastard.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] Pack the vfsmount and dentry in nameidata into a struct path
Date: Sun, 4 Feb 2007 04:16:53 +0000 [thread overview]
Message-ID: <20070204041653.GA3672@lazybastard.org> (raw)
In-Reply-To: <200702031425.38054.agruen@suse.de>
On Sat, 3 February 2007 14:25:37 -0800, Andreas Gruenbacher wrote:
>
> While we store the (dentry, nameidata) in struct file as a struct path, we do
> not do so in struct nameidata at the moment. Here is a patch that changes
> that. The changes are syntactic only; gcc should generate identical code.
>
> So what is this good for?
>
> Well, we currently pass around (dentry, vfsmount) pairs in a number of places.
> With this change, these pairs of objects are embedded in a struct path for
> all file lookup oprations or open files. We could start passing around struct
> paths instead of (dentry, vfsmount) pairs, without having to construct
> temporary struct path objects. This could lead to nice code cleanups. The
> struct paths could be passed by value or by reference.
>
> Opinions?
On its own, I don't like this patch too much. It is just a form of
mental masturbation that complicates the source.
> - inode = nd.dentry->d_inode;
> + inode = nd.path.dentry->d_inode;
However, once we start passing struct path by reference, it should
result in a smaller binary. So if this patch is followed by others, as
you indicated, and the overall result is a measurably smaller binary,
I'm all for it.
Jörn
--
Joern's library part 1:
http://lwn.net/Articles/2.6-kernel-api/
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-02-04 4:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-03 22:25 [RFC] Pack the vfsmount and dentry in nameidata into a struct path Andreas Gruenbacher
2007-02-04 4:16 ` Jörn Engel [this message]
2007-02-04 12:00 ` Andreas Gruenbacher
2007-02-04 17:45 ` Jörn Engel
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=20070204041653.GA3672@lazybastard.org \
--to=joern@lazybastard.org \
--cc=agruen@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).