Subject: Re: vn_lock(LK_RETRY) (was: Re: CVS commit: src/sys/miscfs)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/20/2004 15:36:22
--H+4ONPRPur6+Ovig
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 20, 2004 at 02:15:23PM +0900, YAMAMOTO Takashi wrote:
> > Maybe, maybe not. One advantage of our node locking protocol is that th=
e=20
> > locking is visable to the caller. So the caller can use the lock to=20
> > perform a sequence of actions atomically.
>=20
> no.
> you shouldn't use vnode locking for such purpose because
> VOPs are allowed to be no-op as genfs_nolock.
> (i know that our nfsd does such.  it should be changed, IMO.)

nfsd? You mean the NFS client code? No, it uses real locking now.

I agree that file systems using genfs_nolock is bad. Thus the note where I=
=20
spoke about how we almost have stopped using it. :-)

> > > btw, please answer my first question.
> > > are you going to add checks on every vn_lock(LK_RETRY)?
> >=20
> > Not at the present time. While I think that would be a good and correct
> > thing, I do not have the time nor energy to change each occurrence.
>=20
> i see.  thanks.
> as i still disagree,
> please have a discussion here (tech-kern@) before doing so..

The place I care most is in handling PDIRUNLOCKED, especially in error=20
cases. The code is correct there, so I'm happy. :-)

--H+4ONPRPur6+Ovig
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFA1hFmWz+3JHUci9cRAkYRAJ4x8d8t56BweIoH6EyiBU2uzaz+gwCggwWm
revrSnkf+BKes42mMa+R5cA=
=qSMg
-----END PGP SIGNATURE-----

--H+4ONPRPur6+Ovig--