Dead vnode locking against itself

Thomas Nystrom thn at saeab.se
Tue Dec 7 03:36:23 PST 2004


Alexander Kabaev wrote:
> 
> Unless I am reading sources wrong, the scenario you describe should not
> happen. vgonel resets the vnode type to VBAD just before releasing vnode
> locks for the last time and vtryrecycle avoids calling vgonel on vnodes
> with that type:
> 
>         if (vp->v_type != VBAD) {
>                 VOP_UNLOCK(vp, 0, td);  
>                 vgonel(vp, td);
>                 VI_LOCK(vp);
>         } else
>                 VOP_UNLOCK(vp, 0, td);
> 
> The vnode data below shows that vnode has a type of VDIR and evidently its
> v_op is set to dead_vnodeops. At the same time, v_tag is "none", which
> suggests that vnode has been processed by vclean already, but vgonel had
> not yet have a chance to update vnode's type. Just out of curiosity, can you
> try your code with VI_UNLOCK(vp);/VI_LOCK(vp); pair removed from the
> vgonel function around line 294? This is the only place where vnode interlock
> is released after vclean completes and before vgonel sets the vnode type.
> There is no point in unlocking the interlock just to lock it again
> immediately anyway.

Ok, I missed that VBAD setting. Then I assume that it is arla that is 
playing around with nodes after it has released via vgonel(). I have 
seen other indications of that.....

/thn

-- 
---------------------------------------------------------------
Svensk Aktuell Elektronik AB                     Thomas Nyström
Box 10                                    Phone: +46 8 35 92 85
S-191 21  Sollentuna                        Fax: +46 8 35 92 86
Sweden                                      Email: thn at saeab.se
---------------------------------------------------------------



More information about the freebsd-fs mailing list