Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available

From: David Howells
Date: Fri Nov 18 2016 - 14:08:53 EST


Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> Does AFS allow you to infer something from the actual value?

Yes. Given:

(1) Each write on a file is atomic with respect to all other writes to that
same file.

(2) The data version is incremented by exactly one for each write committed,
and that value is returned in the reply to the write RPC call.

If you think you have a file with version 99, you do a call and get back
version 100, you *know* that there was no conflicting write before your write.

If the version came back as 101, however, you *know* that there was a write
you didn't know about. Therefore, you have to flush your cache.

David