From: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org,
Pekka Enberg <penberg@cs.helsinki.fi>,
Michael Halcrow <mhalcrow@us.ibm.com>,
Erez Zadok <ezk@cs.sunysb.edu>,
Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@ftp.linux.org.uk>, Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] fsstack: Generic get/set lower object functions
Date: Fri, 3 Nov 2006 15:47:43 -0500 [thread overview]
Message-ID: <20061103204743.GC16506@filer.fsl.cs.sunysb.edu> (raw)
In-Reply-To: <1162483565.6299.98.camel@lade.trondhjem.org>
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.
next prev parent reply other threads:[~2006-11-03 20:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-02 3:59 [PATCH 0/3] fsstack updates Josef Jeff Sipek
2006-11-02 3:59 ` [PATCH 1/3] fsstack: Make fsstack_copy_attr_all copy inode size Josef Jeff Sipek
2006-11-02 3:59 ` [PATCH 2/3] fsstack: Generic get/set lower object functions Josef Jeff Sipek
2006-11-02 16:06 ` Trond Myklebust
2006-11-03 3:27 ` Josef Sipek
2006-11-03 3:45 ` Mark Williamson
2006-11-03 3:51 ` Josef Sipek
2006-11-03 6:25 ` Trond Myklebust
2006-11-03 9:13 ` Pekka Enberg
2006-11-03 16:36 ` Jan Engelhardt
2006-11-03 20:47 ` Josef Sipek [this message]
2006-11-03 21:22 ` Trond Myklebust
2006-11-02 3:59 ` [PATCH 3/3] fsstack: Make ecryptfs a user of new fsstack_* functions Josef Jeff Sipek
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=20061103204743.GC16506@filer.fsl.cs.sunysb.edu \
--to=jsipek@fsl.cs.sunysb.edu \
--cc=akpm@osdl.org \
--cc=ezk@cs.sunysb.edu \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhalcrow@us.ibm.com \
--cc=penberg@cs.helsinki.fi \
--cc=trond.myklebust@fys.uio.no \
--cc=viro@ftp.linux.org.uk \
/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
all inboxes | Powered by JetHome®