Re: knfsd and system crashes

Richard Henderson (rth@dot.cygnus.com)
Sat, 15 Nov 1997 17:30:40 -0800


On Sat, Nov 15, 1997 at 09:58:54AM -0500, Bill Hawes wrote:
> I've included the parent directory inode number in the FH as well, but
> if the parent dentry isn't cached somewhere, I don't see any way around
> searching the exported volumes to see who owns the inode in question.

All you need is _some_ dentry not _the_ dentry. The dentries already
handle inodes with multiple links -- make up a new dentry and pretend
this is another.

Seems to me you can create a single superblock for knfsd (which need
not necessarily be on the regular list of superblocks), use d_alloc_root
to instantiate a special inode to do the dirty work. You'd not ever
let this new dentry get collected. (This does not affect the collection
of its children, correct?)

File handles now only need device and inode numbers. To look them
up in the cache, you render "dev.ino" in ascii, and give lookup_dentry
the special root dentry we created earlier. If the dentry is in the
cache, we're happy. If it isn't, i_op->lookup on our special inode
interprets the "dev.ino", calls back to get_super and iget, and does
the standard thing after that.

Am I missing something?

r~