Date: Tue, 13 May 2003 00:22:31 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Don Lewis <truckman@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: rpc.lockd spinning; much breakage Message-ID: <3EC09D37.2BA4078B@mindspring.com> References: <200305130701.h4D70xM7049478@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Don Lewis wrote: > > Normally, lockf(1) gets back EAGAIN and polls for the lock to be > > released. I'm not sure which case in the client rpc.lockd(8) it is. > > Since Solaris doesn't support O_EXLOCK and lockf(1) it wasn't easy for > > me to test, but since the server returns the same result from FreeBSD > > and Solaris, I'm guessing it's a client-side mapping problem. > > Presumably some instance of nlm_denied should return EAGAIN instead. > > I think this gets an nlm4_denied response, which is handled by the > following code in lock_answer(): Historically, this was implemented using O_EXCL to ensure only a single process was allowed to open the file at a time. It may be that that's what's being expected over the wire. I'm pretty sure AIX implemented this by putting an advisory range lock over the entirety of the file; but AIX has a couple of other quirks in the NFS processing that make it less than ideal as a reference implementation. As of Solaris 5.x, the man pages claim that O_EXCL without O_CREAT has undefined behaviour. The SCO manual pages are pretty clear that it means exclusive use (FWIW; do a Google search on "O_EXCL" and "exclusive use"). -- Terry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EC09D37.2BA4078B>