lkml.org 
[lkml]   [1999]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectfile locking, NFS, and cache invalidation
Normally fcntl() locking is a cache coherency point for NFS. However
in 2.2.x the cache isn't invalidated after a fcntl() lock if the
partition was mounted with the "nolock" option.

This recently came up on the debian development mailing list,
in a thread about mail loss over NFS and 2.2 kernels. A patch
was posted, originally by Olaf Kirch, and this should probably go
into 2.2.13.

Note that the same problem exist in the current 2.3.15 kernel.

filename="nfs.nolock.okir.patch"

--- fs/nfs/file.c.org Tue Jun 1 13:09:01 1999
+++ fs/nfs/file.c Thu Aug 19 22:35:33 1999
@@ -214,7 +214,7 @@

/* Fake OK code if mounted without NLM support */
if (NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)
- return 0;
+ /* return 0; */ goto out_okay;

/*
* No BSD flocks over NFS allowed.
@@ -241,6 +241,7 @@
* Make sure we re-validate anything we've got cached.
* This makes locking act as a cache coherency point.
*/
+out_okay:
NFS_CACHEINV(inode);
return 0;
}
Mike.
--
... somehow I have a feeling the hurting hasn't even begun yet
-- Bill, "The Terrible Thunderlizards"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.057 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site