From owner-freebsd-hackers Thu Dec 19 10:23:53 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA03587 for hackers-outgoing; Thu, 19 Dec 1996 10:23:53 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id KAA03582 for ; Thu, 19 Dec 1996 10:23:49 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA11849; Thu, 19 Dec 1996 11:20:18 -0700 From: Terry Lambert Message-Id: <199612191820.LAA11849@phaeton.artisoft.com> Subject: Re: Please, tell me I am wrong To: rminnich@Sarnoff.COM (Ron G. Minnich) Date: Thu, 19 Dec 1996 11:20:18 -0700 (MST) Cc: yves@CC.McGill.CA, freebsd-hackers@freebsd.org In-Reply-To: from "Ron G. Minnich" at Dec 19, 96 11:03:44 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Hi all, > > - NFS on FreeBSD does not support file locking. Maybe it will in the future > > but it probably won't inter-operate with Sun's. > > you need to distinguish two things. > 1) It is true that > NFS on freebsd does not have a 'lock' protocol compatible with Sun's. > 2) BUT: last time I tried it, sun's lockd etc. didn't work all that well > either. and they never have. Not for lack of trying on sun's part, > it is a hard problem, esp. in a stateless system such as nfs. Bah humbug. 1) The rpc.lockd and rpc.statd currently in the source tree correctly interoperate with Sun's locking implementation. 2) The Sun locking works correctly if you obey order of operation protocols in your client code. If it doesn't work for someone, it's pilot error, not an unclosable hole in the code. 3) The FreeBSD implementation of rpc.lockd (for the NFS server) always returns "success" to the NFS client instead of making local fcntl() calls to assert the locks on the local system on the clients behalf. 4) Patches to do this were submitted, but never integrated. They remain available in the -current list archive for anyone who is interested in integrating them. 5) FreeBSD does not support making client RPC calls to a remote lockd, mostly because there is not a remote lockd to test against, and even if there were, the VOP_ADVLOCK code can not be used in an FS stacking layer to implement NFS client locking until VOP_ADVLOCK is changed, per my suggested patches of June, 1994. This is because NFS client locking requires a local assert/remote veto ordering to ensure that there is not an unrecoverable race condition in lock assertion over the wire. 6) NFS locking is not stateless. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.