Re: fscache corruption in Linux 5.17?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022/04/19 18:42, David Howells <dhowells@xxxxxxxxxx> wrote:
> Could the file have been modified by a third party?  If you're using NFS3
> there's a problem if two clients can modify a file at the same time.  The
> second write can mask the first write and the client has no way to detect it.
> The problem is inherent to the protocol design.  The NFS2 and NFS3 protocols
> don't support anything better than {ctime,mtime,filesize} - the change
> attribute only becomes available with NFS4.

I tried to write a script to stress-test writing and reading, but
found no clue so far.  I'll continue that tomorrow.

My latest theory is that this is a race condition; what if one process
writes to the file, which invalidates the cache; then, in the middle
of invalidating the local cache and sending the write to the NFS
server, another process (on the same server) reads the file; what
modification time and what data will it see?  What if the cache gets
filled with old data, while new data to-be-written is still in flight?

Max

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux