Subject: Re: kern/25279: NFS read doesn't update atime
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 06/28/2005 15:18:41
On Tue, Jun 28, 2005 at 08:35:33PM +0900, YAMAMOTO Takashi wrote:
> > can you use diff -up ?
> >
> > > @@ -554,6 +557,9 @@
> > > struct vm_page *pg;
> > > off_t off;
> > >
> > > +
> > > + ip->i_flag |= IN_UPDATE | IN_CHANGE;
> > > +
> > > if (!DOINGSOFTDEP(vp) || (ap->a_flags & PGO_CLEANIT) == 0) {
> > > return genfs_putpages(v);
> > > }
> >
> > it seems like an overkill.
> > i think that GOP_WRITE is a better place.
>
> and, as i wrote in another mail, it might be better to have
> some kludge for pages dirtied by write.
This would be in uvm code then, right ? So we would need to extend the vnode op
interface for this ?
This patch causes the mtime to be updated when dirty pages are written to
disk, not when they are dirtied (which can delay the mtime update by
several seconds). On the other hand, tools like dump don't want to have the
mtime updated before data are written to disk. I don't know how this would
interract with filesystem snapshots.
Does SUSv3 say anything about it ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--