Subject: Re: vn_lock(LK_RETRY) (was: Re: CVS commit: src/sys/miscfs)
To: YAMAMOTO Takashi <>
From: Bill Studenmund <>
List: tech-kern
Date: 06/20/2004 15:36:22
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=
> > locking is visable to the caller. So the caller can use the lock to=20
> > perform a sequence of actions atomically.
> 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=
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.
> 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. :-)

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

Version: GnuPG v1.2.3 (NetBSD)