Dumb struct dentry question

Colin Plumb (colin@nyx.net)
Tue, 5 Aug 97 15:47:01 MDT

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.

You could leave s_root alone as a dentry, or you could change a lot of
interfaces to make it an inode. Whatever's easiest, but the dentry would
be unused on mounted file systems.