Source-Changes-D archive

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

Re: CVS commit: src



On Mon, Jan 10, 2011 at 06:25:16PM +0000, David Laight wrote:
> On Mon, Jan 10, 2011 at 11:11:04AM +0000, Juergen Hannken-Illjes wrote:
> > Module Name:        src
> > Committed By:       hannken
> > Date:               Mon Jan 10 11:11:04 UTC 2011
> > 
> > Modified Files:
> >     src/sys/miscfs/genfs: layer_extern.h layer_vnops.c
> >     src/sys/miscfs/nullfs: null_vnops.c
> >     src/sys/miscfs/overlay: overlay_vnops.c
> >     src/sys/miscfs/umapfs: umap_vnops.c
> >     src/tests/fs/ptyfs: t_nullpts.c
> > 
> > Log Message:
> > Add layer_revoke() that adjusts the lower vnode use count to be at least as
> > high as the upper vnode count before passing down the VOP_REVOKE().
> > 
> > This way vclean() check for active (vp->v_usecount > 1) vnodes gets it 
> > right.
> 
> Randomly changing v_usecount sounds bogus to me?

This is not a random change.  Layered file systems take exactly one reference
on the lower vnode.  All references regarding layered vnodes are only taken
on the layer vnode.  So we get a bootom vnode that is active (we are working
on it) while it may have just one reference.  The upper (layer) vnode has
the "valid" reference count.

Now when VOP_REVOKE() goes down the stack it will revoke the lowest vnode
but this vnode "looks" inactive.  Adjusting the lower vnode refcount gets
the (in respect to activity) right usecount on the lowest vnode while
VOP_REVOKE() works on the lowest vnode.

> Probably hiding some other bug somewhere else.
> 
>       David
> 
> -- 
> David Laight: david%l8s.co.uk@localhost

-- 
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)


Home | Main Index | Thread Index | Old Index