2.0.28: NFS caching fix did not make it

Christoph Lameter (clameter@miriam.fuller.edu)
14 Jan 1997 09:02:55 -0800


There was a NFS fix posted by Olaf Kirch that did not make it into 2.0.28:
This is very important since most locking over NFS is done this way.

On Sat, 28 Dec 1996 10:25:29 PST, Christoph Lameter wrote:
> It first opens a lockfile with a unique name and then links that one
> to the classic /var/spool/mail/username.lock lockfile. Then it checks the
> number of links on that file. If there are two then the lock is
> successful. Problem is Linux fstat call always returns 1 for the number of
> links even though a link() was done immediately prior.

There is nothing in the NFS spec that requires the client to update its
cached link count[*]. So I would assume the author's claim means that this
locking technique `works better over NFS on the systems I tested it on.'

Nevertheless, I guess I'll have to support this in the upcoming NFS
code... For the time being, I suggest exim users apply the following
patch to fs/nfs/dir.c, function nfs_link:

-------- fake patch -----
nfs_lookup_cache_remove(dir, oldinode, NULL);
+ NFS_CACHEINV(oldinode);
iput(oldinode);
-------------------------