Subject: Re: vnode changes & 1.4E
To: Jason Thorpe <>
From: Gandhi woulda smacked you <>
List: current-users
Date: 07/08/1999 23:29:13
On Wed, 7 Jul 1999, Jason Thorpe wrote:

# On Wed, 7 Jul 1999 20:24:34 -0700 
#  "Aaron J. Grier" <> wrote:
#  > > Right now the only filesystems which are unchanged are unionfs and nfs.
#  > > nfs does no locking right now, and adding it would be a big mess.
#  > 
#  > How big of a mess?
# Not "nfs file locking", but locking on the internal NFS data structures.

It's a big mess, but it is something that will need to be addressed
Sometime Soon [TM] [if anyone can figure out how to addres the race
condition -- wouldn't a double-locking scheme work, i.e.

	lock(path,0);		return(lockid);
	lock(path,lockid);	return(0) [already locked];
	unlock(path,lockid);	return(0) [unlocked ok]

where lock(path,0) would return -1 if the lock was not granted...?
Or some sort of confirmation where you double check the lock id to
make sure the server really had assigned the lock to that lockid.
Seems to me it's pretty hard for a server to answer affirmatively
to two "granted" lockids, even in case of a race condition where
lock(path, 0) returns lockids to both clients for the same path,
since it will only register one lock.]

Just late night ramblings....

#         -- Jason R. Thorpe <>