Re: NFS locking bug -- limited mtime resolution means nfs_lock() does not provide coherency guarantee

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Sep 12 2000 - 13:11:46 EST


> > The fix we have found is to *either* have NFS_CACHEINV(inode)
> > change inode-> i_mtime to an artificial value (0) or to call
> > nfs_zap_caches instead. Since I am not sure which fix is
> > appropriate, I'm not enclosing an actual patch.
>
> This is a known issue, and is not easy to fix. Neither of the
> solutions you propose are correct since they will both cause a cache
> invalidation. This is not the same as cache coherency checking.

Providing everyone is careful to hold a lock I think it is

lockf() is a read barrier providing the local cache is flushed, the unlock
is a write barrier providing the local cache is flushed first. Providing
all users are using lockf for their I/O then it seems to be coherent

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:19 EST