lkml.org 
[lkml]   [2007]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFD 1/4] Pass no useless nameidata to the create, lookup, and permission IOPs
On Tue, Jun 26, 2007 at 04:15:11PM -0700, jjohansen@suse.de wrote:
> The create, lookup, and permission inode operations are all passed a
> full nameidata. This is unfortunate because in nfsd and the mqueue
> filesystem, we must instantiate a struct nameidata but cannot provide
> all of the same information that a regular lookup would provide. The
> unused fields take up space on the stack, but more importantly, it is
> not obvious which fields have meaningful values and which don't, and so
> things might easily break.
>
> This patch introduces struct nameidata2 with only the fields that make
> sense independent of an actual lookup, and uses that struct in those
> places where a full nameidat is not needed.

We need something like this, but I don't quite like the way you've done
it. First the name is wrong, it's not a nameidata anymore but a lookup
intent, so it should be named that way, struct lookup_intent. Second
the macro hackery is more than ugly, please keep the structures separate.
With modern gcc it might be possible to embed the lookup_intent into
the nameidata anonymously. Also please either remove the dentry from
struct lookup_entry or from the direct argument list of the functions
and methods - there is no need to pass this one twice.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-30 11:15    [W:0.319 / U:0.188 seconds]
©2003-2014 Jasper Spaans. Advertise on this site