Re: [RFD 1/4] Pass no useless nameidata to the create, lookup, and permission IOPs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 26, 2007 at 04:15:11PM -0700, [email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux