Subject: Re: LK_SHARED for VFS_VGET/FHTOVP
To: Bill Studenmund <wrstuden@netbsd.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 05/26/2004 10:54:35
--Apple-Mail-5--87306471
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
On May 26, 2004, at 9:22 AM, Bill Studenmund wrote:
>> Why do you think that a shared lock requires use of the Biglock?
>
> Because of the code in question was written assuming an exclusive lock,
> not a shared one. ufs_update() for example. Also, currently, it's
> documented to get an exclusive lock.
Ok, so it's not so much that you think shared locks require use of
Biglock... your complaint is really that the code may modify data
structures when they have only locked the data structure for reading,
and the Biglock protects us from the brokenness. (It doesn't, really,
because it's legal to sleep while holding a sleeping lock, such as the
vnode lock, and Biglock is released when the LWP holding it goes to
sleep.)
That certainly is a bug that should be fixed. I suggest you file PRs
about these issues, and assign them to the people who caused the
breakage :-)
-- Jason R. Thorpe <thorpej@wasabisystems.com>
--Apple-Mail-5--87306471
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAtNnbOpVKkaBm8XkRAj81AJ4yp5sIZ5uX9dxikbYeAIUe7IwH7gCdH+Qx
yQ2XV2e7kPaGqlBxM+yWA0s=
=Xc+x
-----END PGP SIGNATURE-----
--Apple-Mail-5--87306471--