Subject: RE: kern/25279: NFS read doesn't update atime
To: None <tech-kern@NetBSD.org>
From: Gordon Waidhofer <gww@traakan.com>
List: tech-kern
Date: 06/27/2005 19:30:28
> > talking about mtime, i think it can be noted when the changes are
> > flushed out to backing store. ie. when we usually notice the dirtiness
> > of the pages.
> > updating mtime in VOP_GETPAGES is somewhat improper, IMO.
>
> For whatever it's worth, I agree with all of the above. To restate:
>
> Update atime on mmap(...PROT_READ...)
> Update mtime when flushing dirty mmapped pages out to backing store.
>
> I would expect neither more nor less.
>
NFS clients use mtime to determine whether client-side
cache is valid or stale. A local program reading/mmaping
a file could see a different result than a client reading
the same file because the has mistakenly determined cache
validity because mtime hasn't changed.
Yes, NFS coherency is much more complicated than that.
But I thought it worth pointing out.
Regards,
-gww