Re: Dumb struct dentry question (fwd)

Thomas Schoebel-Theuer (
Wed, 6 Aug 1997 13:10:49 +0200 (MET DST)

> I was noticing that every struct dentry has d_mounts and d_covers entries.
> Which are unused 99% of the time, and just waste space.
> I was thinking of ways to shrink that, to at most one pointer.
> What makes the most sense to me is to note that the covered dentry
> has the name, and the dentry mounted on that doesn't contain anything
> except an inode pointer.
> So why not have two inode pointers in the dentry? One for the covered
> inode and one for the mounted inode? They'd be the same in most cases.


your observation is right in principle, and I have also plans to change
the way a mount is done. In particular, the new mount should be independent
of any hardware file system space boundaries, and should at least provide
what you can read in Uresh Vahalia's "Unix Internals" in chapter 11.11
under the headline "stackable file systems", but implemented in rather
different way which should be much simpler than even the old mount.

For example, the inodes should not be used for mounts any more, because
inodes are for doing actual IO in future, while dentries are for lookup()
and other things concerning namespace.

So everything concerning namespace should deal with dentries solely, and
mounting is just adding a new dentry name space layer. For example,
directory inodes would be superfluous at all if the attributes currently
belonging to them are moved to a separate structure.

I'm just busy with family affairs and have no time to explain it
in detail, so please wait until a) Linus will converge the new vfs to
a more stable state, and b) until I have more time again for discussions
on the topic.

-- Thomas