Subject: Re: CVS commit: syssrc/sys/miscfs/nullfs
To: enami tsugutomo <enami@but-b.or.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/24/2002 16:45:20
On Sun, 24 Mar 2002, enami tsugutomo wrote:
> > Hmmm... I'll have to think about how to handle this. Probably the best way
> > to do it is have the layer inactivates look to see what the count on the
> > overall node is. If it's zero, fire off an update to flush that out.
>
> It is possible that there may be direct reference to lower vnode when
> layer_inactive is called and the reference may be released while layer
> node is cached, isn't it?
I'm not sure if I understand your question.
My thought is that when the only references on the collections of vnodes
(because we could have a layer or two on a layer) are other layer vnodes,
we call a routine which uses the VOP_UPCALL() (or whatever it becomes) to
tell all the vnodes that the whole collection is now only on the free
list, and that the nodes with references should preform special
on-freelist processing. i.e. for ufs, VOP_UPDATE(). Not all of the nodes
will be in the free list, so they shouldn't do all the inactivate
processing.
Oh, I think you're suggesting, can't we just release the reference on the
lower node in the inactivate routine? We could, but how do we re-establish
that reference? The problem is that it is perfectly valid to take the
inactivated vnode off of the free list and start using it. Without a call
to the file system's code (there is no VOP_REACTIVATE()). So how do we do
that establishment?
Take care,
Bill