dentry_operations vs inode_operations

Benjamin C R LaHaise (blah@dot.superaje.com)
Mon, 25 Aug 1997 23:21:29 +0000 ( )


Hello,

I've begun to look at rewriting my loopback filesystem to take advantage
of dentries, but they haven't help at all yet, and here is my idea/plan
for making them useful (smbfs, ncpfs and such should benefit too). I'd
like to move most of the inode operations that operate on directory
entries into the dentry_operations. This will give lofs the advantage of
not having to duplicate any inodes of the underlying filesystem, but
still be able to provide say read only functionality on top of a rw fs.
A quick glance suggests that all operations except for
(read|writ|updatee)page, bmap, truncate, smap and revalidate will have to
move. If there's no great objection to this, I'll put together a patch
that does this.

Sorry if it seems an enourmous change, but it's the only way I can see
for us to get the usefulness of a dentry-centric system that allows us to
implement filesystems without underlying indoes. Hey, ideally
directories wouldn't *need* an inode resident in memory for networks
filesystems.

For background lofs for 2.0 was implemented by creating an inode for each
directory of the underlying filesystem with the same inode #, but
different device. This means that a few race conditions exist in it
(namely O_CREAT|O_EXCL is unreliable), but I've yet to receive a single
bug report :-/ (maybe noone uses it? Nah!) It's still at
ftp://dot.superaje.com/pub/linux/lofs-2.0.30.diff for anyone who needs it.

-ben