Re: patch for 2.1.80 knfsd

Olaf Kirch (okir@monad.swb.de)
Fri, 23 Jan 1998 15:27:02 +0100


Hi Bill,

> The attached patch has some minor fixes and improvements for 2.1.80
> knfsd. It now revokes all exports when the last server process exits,
> rather than waiting for the module to unload. As the exports need to be
> revoked in order to free inodes, this change should simplify the
> shutdown process.

That's kind of least unexpected behavior. The normal mode of operations
would be to exportfs -a at boot time; after that you'r allowed to kill
and restart nfsd as you like.

I think a better solution would be to just nfsd_fh_flush() the FH cache
when the last server process exits. The only dentry that will then remain
at shutdown is the one in exp->ex_dentry.

This dentry should go entirely, IMHO. The only occasion what it is used
is when constructing a file handle in exp_rootfh. In that case, we can
also use lookup_dentry(exp->ex_path, NULL) to get at the dentry. The
advantage of this is that it lets you export CD-ROMS without having to
fiddle with exportfs whenever you want to insert a different CD into
the drive.

Which leads me to yet another problem with the export stuff:-) Currently,
when the server exports /foo, the client can't mount /foo/bar because
the exp_rootfh can only return the FH of the exported directory. So I
guess we should change the API of get_rootfh: throw out the dev/ino
arguments and pass two pathnames instead: one for the exported dir and
one for the requested path relative to that dir.

Olaf

-- 
Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
okir@monad.swb.de  |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
             For my PGP public key, finger okir@brewhq.swb.de.