On Thu, 26 Aug 1999, Jason Gunthorpe 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. Is the userland server still supported on 2.2.*? I always was told to switch to knfs, when the server runs 2.2.*. But 2.2.* on the client and 2.0.* on the server (with the userland server) works perfectly well, if the attached patch (by Olaf Kirch) is applied to the client's kernel (with "nolock" in the mount options). Ciao Roland -- * [EMAIL PROTECTED] * http://www.spinnaker.de/ * PGP: 1024/DD08DD6D 2D E7 CC DE D5 8D 78 BE 3C A0 A4 F1 4B 09 CE AF
--- 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; }