Re: patch for 2.1.80 knfsd

Bill Hawes (whawes@star.net)
Fri, 23 Jan 1998 10:28:05 -0500


Olaf Kirch wrote:

> 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.

OK, I'll take a look at that and see if there are any problems with not
holding the export dentry. It didn't seem to me that you would want to
keep the exports around after shutting down the last server, but if we
just flush the FH cache and don't have an export dentry, that would
avoid the busy inodes at shutdown.

> 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.

Sounds reasonable, but you're the keeper of the tools :-) Whatever API
the tools want is fine with me.

Regards,
Bill