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: 06/28/2005 17:43:05
On Tue, Jun 28, 2005 at 06:59:53AM -0700, Chuck Silvers wrote:
> On Tue, Jun 28, 2005 at 11:55:39AM +0200, Manuel Bouyer wrote:
> > Hi,
> > so here is another patch, based on comments received:
> > - it also updates the mtime on VOP_PUTPAGE()
> 
> as I mentioned before, I don't think this makes any sense.
> timestamp updates should be associated with changes to a file's
> logical contents, not with internal cache-flushing activity.

Yes, but this requires an interface change in the vnode op, which may not
be doable on the existing branches. In addition, this code doens't exist
yet.

> 
> 
> > - after fixing ufs_balloc_range() to not use VM_PROT_READ, test for
> >   VM_PROT_READ in VOP_GETPAGE() to see if we should update the atime or not
> 
> is sorta makes more sense to use VM_PROT_WRITE here instead of VM_PROT_READ,

In a previous mail YAMAMOTO Takashi said it would be more straitforward to
test VM_PROT_READ here instead of VM_PROT_WRITE (once ufs_balloc_range() uses
VM_PROT_NONE).

> since the overall operation of which this is a part is a write().
> does that make the right things happen?

From the tests I ran, yes. Both VM_PROT_READ and !VM_PROT_WRITE works here.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--