Subject: Re: kern/25279: NFS read doesn't update atime
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 07/08/2005 10:31:42
On Tue, Jul 05, 2005 at 07:53:25AM +0900, YAMAMOTO Takashi wrote:
> > > updating mtime in VOP_GETPAGES means that you can see new mtime + old data.
> > > as pointed out, it has bad effects to eg. nfs cache coherency.
> > 
> > new mtime and old data is not a problem for NFS,
> > it's old mtime and new data that would be trouble.
> > but I see your point.
> 
> it's a problem because once an nfs client get new mtime + old data,
> it has no way to notice new data.

that's only a problem if any more new data comes along later without
the mtime being updated again.


> otoh, old mtime + new data should not be a big problem because
> the client will notice the new mtime on the next cache validation.

that assumes that the mtime is updated again in the future.
if it is not, then this situation is a problem.


the difference in our interpretation of these scenarios is the point in
time that we are considering.  you seem to be thinking about a point in
the middle of a stream of data changes and associated mtime updates,
whereas I'm talking about a point after the stream of data changes and
associated mtime updates is done and the file is unchanged for some time.
it seems more useful to talk about the latter time frame, since it's the
sequencing of the last data change and last mtime update that is most
important (ie. the final mtime update should not be before the final
data change).

-Chuck