Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 1999 18:52:10 -0800
From:      Conrad Minshall <conrad@apple.com>
To:        Alfred Perlstein <bright@wintelcom.net>, Doug Barton <Doug@gorean.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Serious locking problem over NFS
Message-ID:  <l03130303b4512afbe17b@[17.202.43.185]>
In-Reply-To: <Pine.BSF.4.05.9911111638540.12797-100000@fw.wintelcom.net>
References:  <Pine.BSF.4.20.9911111429310.37830-100000@dt054n7c.san.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 4:39 PM -0800 11/11/99, Alfred Perlstein wrote:
>On Thu, 11 Nov 1999, Doug Barton wrote:

>> 	The following small program illustrates an obscure problem with
>> file locking with freebsd as an NFS client. I'm aware of the problems with
>
>We currently don't support client or server locking.
>
>work is in progress, but the dolt that took the job is extremely busy
>right now. (me)

Yup, byte range locking fcntl APIs are present but over NFS they don't work.

So shouldn't one be able to get entire-file locking with the old-fashioned:

  open("foo.lockfile", O_CREAT | O_EXCL, 0644)

You would think so, but my experience is that reliably protects critical
sections only when using NFS Version 3.  Not V2.  Read about EXCLUSIVE in
the CREATE procedure in RFC 1813 for another level of detail.


--
Conrad Minshall ... conrad@apple.com ... 408 974-2749
Apple Computer ... Mac OS X Core Operating Systems ... NFS/UDF/etc
Alternative email address: rad@acm.org.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l03130303b4512afbe17b>