In article <[EMAIL PROTECTED]>, Jason Gunthorpe <[EMAIL PROTECTED]> wrote: > >On Thu, 26 Aug 1999, Roland Rosenfeld wrote: > >> The solution for this problem is to use fcntl(), because Linux 2.2.* >> flushes the cache of a file in the moment when it is locked using >> fcntl(). >> >> But only fcntl() locking is not enough, because Linux 2.0.* doesn't >> support this over NFS and then we have no locking over NFS. > >And linux 2.2.x with a userland server also does not support fcntl >locking, it generates an annoying kernel message and fails with ENOLCK.
Ah but that is a configuration error. If you mount a filesystem from a server that doesn't support locking, you are supposed to mount it with the "nolock" option. Then the 2.2 NFS client will behave like 2.0 did - it fakes the locks locally. However there is a bug in 2.2 that if you mount with "nolock", then a fcntl() lock will not flush the cache anymore. Olaf Kirch posted a patch for that on the kernel mailing list. Mike. -- ... somehow I have a feeling the hurting hasn't even begun yet -- Bill, "The Terrible Thunderlizards"