On Thu, Nov 02, 2006 at 11:06:05AM -0500, Trond Myklebust wrote: > On Wed, 2006-11-01 at 22:59 -0500, Josef Jeff Sipek wrote: ... > > +static inline struct inode * > > +__fsstack_lower_inode(struct inode *inode, unsigned long branch_idx) > > +{ > > + struct fsstack_inode_info *info = fsstack_inode_data(inode); > > + > > + return info->inodes[branch_idx]; > > +} > > What is the value of "functions" like the above? They appear just to > obfuscate the code. Unless your aim is to hide the internals of the > struct __fsstack_inode_generic_info (sort of futile, since you are > asking users to include that structure in their private inode structs) > then it is much more obvious to see what is going on when you write > > inode = FSSTACK_I(inode)->inodes[branch]; > > rather than > > inode = __fsstack_lower_inode(inode, branch); I was thinking about this a bit, and it would seem that not having get/set function pretty much kills the reson to have generic pointer structures at all. Would it make sense to change filesystems like ecryptfs to open-code all these things instead of using _their own_ get/set functions (e.g., ecryptfs_inode_to_lower)? Other posibility is to move the lower pointers into generic VFS objects in some clever way (not to waste memory on regular filesystems) - this way, the stackable filesystems can still share some parts. Josef "Jeff" Sipek. -- A computer without Microsoft is like chocolate cake without mustard. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html