Subject: Re: mnt_leaf, v_vnlock, VLAYER
To: Bill Studenmund <wrstuden@netbsd.org>
From: Brett Lymn <blymn@baesystems.com.au>
List: tech-kern
Date: 12/02/2005 22:04:11
On Tue, Nov 29, 2005 at 04:24:39PM -0800, Bill Studenmund wrote:
> 
> If we do this, we remove one use of VLAYER, in vget(). The problem now is 
> that vget was written with the assumption that vnodes on the free list are 
> unlocked. For layered ones, that's not necessarily true.
>

Picking up on another of Bill's off-list comments....  Wouldn't this
problem pretty much go away if, as you suggested, that the current
cloud of vnodes (each layer allocates it's own vnode and tracks that)
was collapsed into a single entity that could be referenced by all the
layers? It means that we have a single thing to lock and there is no
uncertainty about the state of the vnode between the differing layers.

If the vnode struct was split into a section that holds non-layer
specific data, which there does not seem to be much of, and have the
layer specific data in a linked list then all the layers would see a
consistent vnode and it would mean that other layers could see what
other layer has an interest in the vnode (perhaps even do a VOP_UPCALL
which, again, was mentioned offlist).
 
-- 
Brett Lymn