From owner-freebsd-current Wed Feb 11 00:48:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA17420 for current-outgoing; Wed, 11 Feb 1998 00:48:10 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA17395; Wed, 11 Feb 1998 00:48:06 -0800 (PST) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id BAA19394; Wed, 11 Feb 1998 01:48:06 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp02.primenet.com, id smtpd019380; Wed Feb 11 01:48:00 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id BAA22120; Wed, 11 Feb 1998 01:47:58 -0700 (MST) From: Terry Lambert Message-Id: <199802110847.BAA22120@usr09.primenet.com> Subject: PATCH.D: Kernel changes for NFS client and server locking To: fs@FreeBSD.ORG, current@FreeBSD.ORG Date: Wed, 11 Feb 1998 08:47:58 +0000 (GMT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is the decription of two patches, to follow immeditely. These two patches are being submitted for review by a wider audioence to determine of they damage advisory locking semantics or other system functionality. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. ============================================================================== Description: The following two patches implement the majority of the necessary kernel code for supporting NFS client and server locking. I recommend that other *BSD's apply this against a -current FreeBSD tree, and then use that information to apply them against their own. FreeBSD has diverged greatly in the files these patches touch, despite claims to the contrary. Purpose: 1) Resubmit patches first submitted ~3 years ago. These patches are virtually unchanged, but have not been committed because they previously included bug fixes to other portions of the kernel that people (apparently) didn't want fixed. 2) Provide a small enough subset of patches at one time; the purpose of this is five-fold: a) It allows someone who has not spent their career (as I have) working on FS code to understand the nature of the changes, without me having to spend an equal amount of time as I have spent educating myself to educate them (this code is already ~3 years old; my research has progressed significantly beyond this point already). b) It increases the likelihood that they will be committed. c) It allows me to not have to merge ~1500 of my over 30,000 lines of diffs each time I update my kernel. d) It puts a damper on any forward progress I could make if all of my patches were committed, while I seperate this stuff out from my othe changes. e) It stretches out the time it's going to take to get them all committed, and generally slows down my research, since it increases the overall commit latency I must put up with. Admittedly, these last two are of questionable benefit to anyone but a wart on the tail of progress. 8-|. 3) Get feedback on whether or not this actually breaks anything for someone other than myself. It doesn't break things for me; I would be interested in the ruslts of anyone else's attempts at running the POSIX validation suite before and after these patches. 4) Provide a base from which Andrew and Doug can actually finish the implementation of rpc.lockd and the NFS client locking code, which will hopefully result in the first free and working NFS locking implementation. Jordan was going to finish this code for Kirk's class, but never did. 5) Various people at BSDI have been pestering me for these, off and on, for some time. 6) It might be nice if, for once, FreeBSD actually had something before Linux, for a change. Specific changes are: 1) Add preliminary NFS server locking support; the following fcntl() commands are added: F_RGETLK F_RSETLK F_RSETLKW F_CNVT F_UNLKSYS These are identical to the same commands in SunOS 4.1.3 2) Move VOP_ADVLOCK to a veto basis This is necessary for NFS client locking support. NFS client locking proxies local requests on the caller's behalf. 3) Add preliminary NFS client locking support. This consists of changing nfs_advlock to operate a veto basis. The ufs_advlock function is also changed so it will continue to function. 4) Add preliminary advisory locking to all filesystems. Before this patch, advisory locking was not supported on any FS other than a UFS derived FS and on NFS. 5) Seperate lock assertion from lock coelescence (see previous discussion over the past several days on the -current list). 6) Move the advisory lock list to hang off the in core vnode instead of the in core inode. This is consistent with the VOP_FINALVP discussion, and was necessary to support the veto-based VOP_ADVLOCK interface. 7) Modify vn_advlock() parameters and add vn_unlksys() support. The first is for seperation of lock commits for NFS client locking support, the second is for NFS server locking support. 8) Addition of lf_commit(). This allows a provisional lock to be committed (coelesced) or aborted (deasserted prior to coelesce). 10) Revision of lock debug dumps for use in kernel debugger. 11) Addition of a comment to union_vnops.c to note what is really taking place (necessary information for agregation support at a later date). 12) Removal of n_lockf from nfsnode. This is no longer necessary; lock lists are off the vnode now. 13) Removal of i_lockf from inode. This is no longer necessary; lock lists are off the vnode now. 14) Binary backward compatability is assured through the use of an oflock structure. Binary forward compatability is assured with an l_pad reservation of 4 longwords. 15) Copious comments 16) The fcntl.2 man page is updated to reflect these changes. ============================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe current" in the body of the message