Subject: Re: vn_lock(LK_RETRY) (was: Re: CVS commit: src/sys/miscfs)
To: Chris Jepeway <jepeway@blasted-heath.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/21/2004 13:08:55
--eAbsdosE1cNLO4uF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 20, 2004 at 10:51:30PM -0400, Chris Jepeway wrote:
> >I don't think a file system can really choose to do something other=20
> >than
> >our "real" locking method. That strikes me as being like changing which
> >side of the road vehicles drive on, and starting with just the trucks.
> I thought VOP_LOCK() and friends were always considered advisory.
> If the f/s could get along without actually locking anything, well,=20
> fine.

VOP_LOCK() and friends are not advisory.

While what you describe would be fine if we had only leaf file systems, it
won't work for layered file systems. They are implemented assuming that=20
VOP_LOCK() and friends actually work.

Note that flock(2) locking is different. Those operations go through=20
VOP_ADVLOCK().

Take care,

Bill

--eAbsdosE1cNLO4uF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFA10BWWz+3JHUci9cRArdwAKCR2q9OHDEe4MdC68DMIn9r6eoTlgCfYGwU
6LiWW3T07FeiEonOLGe3rt4=
=V9Zt
-----END PGP SIGNATURE-----

--eAbsdosE1cNLO4uF--