Subject: Re: kern/25279: NFS read doesn't update atime
To: Chuck Silvers <chuq@chuq.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 07/06/2005 15:42:27
On Mon, Jul 04, 2005 at 09:58:01AM -0700, Chuck Silvers wrote:
> [...]
> however, VOP_PUTPAGES() is used to write back dirty pages that were created
> both via write() and via mappings, and we would like to avoid updating mtime
> again when flushing dirty pages created by write(), since in that case there
> is no question as to whether the mtime was updated in a coherent manner with
> the file data. while it would be possible to track exactly which pages are
> dirtied via which mechanism, that would be rather messy. most applications
> modify file data via one interface or the other and don't flip back and forth,
> so we'll usually do the right thing if we assume that. currently we don't
> know exactly when a vnode has mappings since we don't keep a count of them,
> but we can approximate this by setting a flag in the vnode when a mapping is
> created, and clearing this flag in VOP_INACTIVE(). in VOP_PUTPAGES(), we
> would update mtime only if this flag is set. I think that would give us
> the desired behaviour in the vast majority of cases.
I'm not sure I see all the details you're talking about here. Would you have
some time to implement this ? Otherwise, do you think the last patch I posted
(which updates the mtime in GOP_WRITE) could be commited as a temporary
measure ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--