From owner-freebsd-hackers Thu Nov 11 18:52:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E72A15266 for ; Thu, 11 Nov 1999 18:52:27 -0800 (PST) (envelope-from conrad@apple.com) Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.9.3/8.9.3) with ESMTP id SAA18900 for ; Thu, 11 Nov 1999 18:52:26 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate1.apple.com (mailgate1.apple.com- SMTPRS 2.0.15) with ESMTP id ; Thu, 11 Nov 1999 18:52:24 -0800 Received: from [17.202.43.185] (wa.apple.com [17.202.43.185]) by scv3.apple.com (8.9.3/8.9.3) with ESMTP id SAA12023; Thu, 11 Nov 1999 18:52:22 -0800 (PST) X-Sender: conrad@mail.apple.com Message-Id: In-Reply-To: References: MIME-Version: 1.0 Date: Thu, 11 Nov 1999 18:52:10 -0800 To: Alfred Perlstein , Doug Barton From: Conrad Minshall Subject: Re: Serious locking problem over NFS Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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