Subject: Re: kern/25279: NFS read doesn't update atime
To: None <bouyer@antioche.eu.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/27/2005 07:26:21
hi,

> > quoting kern/25279:
> > 	nfsd doesn't update atime of the file for READ RPCs
> > 	because recently nfsd uses VOP_GETPAGES to serve them.

sorry for leaving the PR for this long time.

> > This is hightly annoying in some environnement, and because of this
> > I'm stuck with 1.6.x on my production NFS servers.
> > It looks like it shoudln't be too hard to make VOP_GETPAGES update the
> > atime at last for UFS-like filesystems (FFS and LFS already have their
> > own getpage vnode operation, I can easily add one for ext2fs), but is it
> > the right way to go ? would updating the atime from getpage have
> > bad side effects, or break a traditionnal behavior ?

i don't think it's the right way.

> Here is a patch that makes VOP_GETPAGES update atime for UFS-like filesystems.
> This fixes the mailbox issue for me.

doesn't it make write(2) and mmap'ed accesses update atime
in somewhat unpredictable manner?

because i don't think the problem can be solved properly without
vnode interface changes, i plan to export nfsd_use_loan as a sysctl knob
for now.  does it make sense for you?

for long term, i think it's better to extend VOP_SETATTR so that
it can be used for this purpose.

(although i think it's silly to rely on atime over nfs...)

YAMAMOTO Takashi