Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 1998 08:47:58 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        fs@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   PATCH.D: Kernel changes for NFS client and server locking
Message-ID:  <199802110847.BAA22120@usr09.primenet.com>

next in thread | raw e-mail | index | archive | help
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 freebsd-fs" in the body of the message



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