Subject: Re: New panic
To: Frank van der Linden <firstname.lastname@example.org>
From: Paul Kranenburg <email@example.com>
Date: 07/09/1997 23:13:07
> This appears to be the scenario:
> - call vndstrategy
> - vnode gets locked
> - ufs_bmap is called
> - an available buffer is looked for
> - while doing this, a DELWRI buffer on the same vnode is found
> - a bawrite() is done on it
> - vndstrategy again
> - try to lock the vnode as in step 2, but it's already locked.
> -> panic
Actually, since the DELWRI buffer is passed to vndstrategy(), it must
have been associated with a vnode on the "vnd" filesystem. Once in
vndstrategy() again, a lock is requested on the underlying vnode (which
is on ffs, in this case).
So, the problem is that the VOP_LOCK/VOP_UNLOCK pair precludes recursive
calls to vndstrategy() through VOP_BMAP. This was also a problem in
the new swap code that deals with swapping on regular files; there,
the VOP_LOCK calls were omitted, which should be Ok as long as the file
you're trying to "bmap()" isn't changing in size.