Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Dec 2004 12:36:15 +0100
From:      Thomas Nystrom <thn@saeab.se>
To:        Alexander Kabaev <kan@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: Dead vnode locking against itself
Message-ID:  <41B595AF.7050602@saeab.se>
In-Reply-To: <20041206231347.GA18156@freefall.freebsd.org>
References:  <41B0C899.C005AE1E@saeab.se> <20041206205628.GA3309@freefall.freebsd.org> <41B4D832.2D886E86@saeab.se> <20041206231347.GA18156@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Kabaev wrote:
>=20
> Unless I am reading sources wrong, the scenario you describe should not=

> happen. vgonel resets the vnode type to VBAD just before releasing vnod=
e
> locks for the last time and vtryrecycle avoids calling vgonel on vnodes=

> with that type:
>=20
>         if (vp->v_type !=3D VBAD) {
>                 VOP_UNLOCK(vp, 0, td); =20
>                 vgonel(vp, td);
>                 VI_LOCK(vp);
>         } else
>                 VOP_UNLOCK(vp, 0, td);
>=20
> 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 ha=
d
> not yet have a chance to update vnode's type. Just out of curiosity, ca=
n 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 int=
erlock
> is released after vclean completes and before vgonel sets the vnode typ=
e.
> 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=20
playing around with nodes after it has released via vgonel(). I have=20
seen other indications of that.....

/thn

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41B595AF.7050602>