tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Layered fs, vnode locking and v_vnlock removal

On Tue, Jun 01, 2010 at 11:44:03AM +0200, Juergen Hannken-Illjes wrote:
 > > It's not immediately clear how either of these ought to work, so
 > > I'm concerned that making the infrastructure less general will
 > > lead to problems.
 > 1) One upper to many lower vnodes
 >    This is a file system like unionfs.  It has to lock either one or
 >    many lower vnodes and does/will not earn anything of shared locks.
 > 2) Many upper to one lower vnode
 >    Such a layered file system could use a lock shared between ALL
 >    upper and the lower vnode.  Always taking the lower vnode's lock
 >    will do the same.  I see no need for shared locks here.

That seems plausible.

 > > In the long run I intend to make all the vnode ops symmetric with
 > > respect to locking, which should make a lot of this less toxic, but at
 > > the rate I've been able to work on this stuff we won't be there
 > > anytime soon.
 > The asymmetry comes from functions like null_mount() where a vnode gets
 > locked by the lower layer and unlocked by the upper layer.  A lower
 > layer expecting its VOP_LOCK() to be matched by a VOP_UNLOCK() will
 > fail badly.

...that is just broken, yes. If you can beat sanity into that, please do.

David A. Holland

Home | Main Index | Thread Index | Old Index