Re: knfsd and system crashes

Bill Hawes (whawes@star.net)
Sun, 16 Nov 1997 08:36:19 -0500


Richard Henderson wrote:
> 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?)

If I understand your suggestion correctly, you would have nfsd regard
the exported filesystem as just a flat collection of inodes. So rather
than searching the volume to get a dentry representing the actual
structure on the disk, it would just use a synthetic dentry with a
"dev.ino" name.

This would probably work fine for reading and writing, but some of the
fs operations expect to get dentries with a specific relationship, and
perform dcache operations on the dentries. For example, the rename
operation results in the dentries changing names and parents, which
could result in the synthetic dentries getting mixed up with the real
ones.

Another problem would be the existence of aliased names (without a hard
link) could result in inodes that were busy (use count > 1) even though
the dentry count was 1. Some operations need to know whether an inode is
still busy before proceeding.

Anyway, it's an interesting suggestion, but I think it would introduce
many potential problems.

Regards,
Bill