From owner-freebsd-current Sat Oct 26 16:05:37 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA21142 for current-outgoing; Sat, 26 Oct 1996 16:05:37 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA21136 for ; Sat, 26 Oct 1996 16:05:35 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA17763; Sat, 26 Oct 1996 16:00:12 -0700 From: Terry Lambert Message-Id: <199610262300.QAA17763@phaeton.artisoft.com> Subject: Re: /etc/rc* stuff To: adam@veda.is (Adam David) Date: Sat, 26 Oct 1996 16:00:12 -0700 (MST) Cc: wpaul@skynet.ctr.columbia.EDU, freebsd-current@FreeBSD.org In-Reply-To: <199610261350.NAA04998@veda.is> from "Adam David" at Oct 26, 96 01:50:06 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > >No, they aren't. rpc.statd is fully functional. rpc.lockd is halfway > >functional. In either case, it doesn't hurt to have them on. > > $ man rpc.lockd | vgrep > BUGS > The current implementation provides only the server side of the protocol > (ie. clients running other OS types can establish locks on a FreeBSD > fileserver, but there is currently no means for a FreeBSD client to es- > tablish locks). > $ ^D > > I'd like to see them in the default /etc/rc too. The lockd lies. It always grants all lock requests because it does not apply the locks to the local fs, and therefore does not run intersections on them. This should *not* be turned on by default. The net effect it has to to tell Sun machines "Quit yer bitchin'". Server side locking requires extending the fcntl interface by five commands. You can get my code for 4 of them from Jordan, or I posted them to -current and you can get it from the list archives. The 5th call is converting an NFS file cookie into an open file handle. I didn't write it because I was unsure from the user space code how the cookie would need to be represented. Look at the lease code function references for NFS as an LKM. The routine your fcntl op will need to call will need to be hooked via function pointer the same way. The actual routine is in /sys/nfs/nfs_subr.c. You will still have to do user space descriptor agregation and lock release in the rpc.lockd code. This is basically grunt work for list management code. If you use pointer to pointers to self reference the list elements, it should take no more than a day to code and test. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.