Subject: Re: vclean: vnode locking procedure change #1a to suport stacked
To: Bill Studenmund <>
From: Konrad Schroder <>
List: tech-kern
Date: 06/02/1999 16:43:30
On Wed, 2 Jun 1999, Bill Studenmund wrote:

> Whenever a vnode gets stacked on top of another node, it locks the
> simple_lock in the underlying node, and then inserts itself in the list.
> When it gets reclaimed, it (locks the underlying simple_lock and) removes
> itself.

Yes :^)  This kind of registration is what I was trying to get at with my
earlier message about watchdogs.  But:

> The second half is what the underlying node does with this. I think the
> best thing is that vclean would look at the list on the vnode it is
> cleaning, and repeatedly call vclean on the head vnode. Then it would
> vclean the given node. Oh, it would have to release the interlock first.

What about unionfs?  Would not the appropriate thing to do there be to
cause the upper vnode to switch its lower vnode to the appropriate vnode
in the other filesystem, rather than to cause the upper vnode to be
cleaned out and discarded?

If so, we are saying that the behavior should be dependent on the
upper-mounted filesystem; should we not call a vop on the upper vnode,
rather than always calling vclean?

I think, too, that this registration could provide the facility for a more
general operation, a sort of reverse bypass that calls the an
above-mounted layer instead of a below-mounted layer; which could be
useful for other things as well.  Ordinary filesystems should not need to
know about it, but rather, layered filesystems would be able to take
indirect vops on the vnodes that they reference, as well as direct vops on
their own vnodes.  This could make a watchdogfs work, say; or provide
better synchronization between layers if it ever becomes useful to cache
data at an upper layer.

Konrad Schroder
System Administrator              
Human Interface Technology Lab                    Voice: +1.206.616.1478
Box 352142, University of Washington, 98195, USA    FAX: +1.206.543.5380