From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: [RFC] Pack the vfsmount and dentry in nameidata into a struct path Date: Sun, 4 Feb 2007 04:16:53 +0000 Message-ID: <20070204041653.GA3672@lazybastard.org> References: <200702031425.38054.agruen@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Andreas Gruenbacher Return-path: Received: from lazybastard.de ([212.112.238.170]:58111 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbXBDEUY (ORCPT ); Sat, 3 Feb 2007 23:20:24 -0500 Content-Disposition: inline In-Reply-To: <200702031425.38054.agruen@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, 3 February 2007 14:25:37 -0800, Andreas Gruenbacher wrote: >=20 > While we store the (dentry, nameidata) in struct file as a struct pat= h, we do=20 > not do so in struct nameidata at the moment. Here is a patch that cha= nges=20 > that. The changes are syntactic only; gcc should generate identical c= ode. >=20 > So what is this good for? >=20 > Well, we currently pass around (dentry, vfsmount) pairs in a number o= f places.=20 > With this change, these pairs of objects are embedded in a struct pat= h for=20 > all file lookup oprations or open files. We could start passing aroun= d struct=20 > paths instead of (dentry, vfsmount) pairs, without having to construc= t=20 > temporary struct path objects. This could lead to nice code cleanups.= The=20 > struct paths could be passed by value or by reference. >=20 > 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 =3D nd.dentry->d_inode; > + inode =3D 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=C3=B6rn --=20 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