Subject: Re: kern/25279: NFS read doesn't update atime
To: None <chuq@chuq.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/29/2005 09:43:39
> my point is that it does not seem correct to update timestamps as part of
> cache-flushing.  whether or not the incorrect change is doable on a branch
> is irrelevant.

my point was "do it when detecting dirtiness of pages".
it happens to be the same place as cache-flushing in
the current implementation.

> it seems better to have VOP_GETPAGES() update atime on VM_PROT_READ accesses
> and update mtime on VM_PROT_WRITE accesses.  the only caller that doesn't
> fit with this behaviour that has been mentioned so far is ufs_balloc_range().

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.

> I meant that it makes a bit more sense for ufs_balloc_range() to call
> VOP_GETPAGES() with VM_PROT_WRITE instead of VM_PROT_READ.

do you mean, letting VOP_GETPAGES allocate blocks rather than doing it in
ufs_balloc_range?

YAMAMOTO Takashi