Subject: Re: amd/nfs/vgone interaction.
To: Christos Zoulas <christos@zoulas.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/12/2003 15:15:08
On Wed, 12 Feb 2003, Christos Zoulas wrote:

> On Feb 12, 10:11am, wrstuden@netbsd.org (Bill Studenmund) wrote:
> -- Subject: Re: amd/nfs/vgone interaction.
>
> But why is VOP_RECLAIM being called on vnodes of unmounted filesystems?
> I thought that the vnode list of the mount point contains all the vnodes
> that have been allocated for that mount point, and when the filesystem
> gets unmounted these get cleaned up. How does a vnode ends up being
> on the free list and not on the mount list?

Because where, other than the free list, should we put vnodes that aren't
in use? :-) The "free" list is the list of vnodes that we can grab for new
uses. vnodes from unmounted file systems certainly are grabbable for new
uses, so it's the best place for them.

> | Assuming all of the timer cleanup is internal (not waiting for callbacks
> | or such that we have to answer to keep others going too), then Frank's
> | suggestion of moving the cleanup to VOP_INACTIVATE is fine.
> |
> | Other solutions are to:
> |
> | 1) when unmounting, vgone all the vnodes on the file system
> |
> | or
> |
> | 2) when unmounting, flag all the vnodes on the mountpint as "NFS DEAD" -
> | set an internal flag. Everything from then on ignores the mount info, and
> | waits for the eventual RECLAIM.
>
> But how do you find all the vnodes? Does one have to look in the free list?

I think you're right, that they will be on the mount point's list. Thus we
can find all of them at unmount.

I think the real issue is that VOP_RECLAIM isn't dealing with the fact
that it will get called on unmounted vnodes. It could well be other parts
aren't either...

Take care,

Bill