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: 07/06/2005 15:32:55
On Thu, Jun 30, 2005 at 12:13:31PM +0900, YAMAMOTO Takashi wrote:
> > +int
> > +ufs_gop_write(struct vnode *vp, struct vm_page **pgs, int npages, int flags)
> > +{
> > +	struct inode *ip = VTOI(vp);
> > +	int error;
> > +
> > +	error = genfs_gop_write(vp, pgs, npages, flags);
> > +	if (error == 0) {
> > +		/* file has been written, update mtime */
> > +		ip->i_flag |= IN_CHANGE | IN_UPDATE;
> > +	}
> > +	return error;
> > +}
> 
> as modifications are visible to the world at this point,
> "if (error == 0)" here doesn't make much sense.

If genfs_gop_write() returned an error, it's possible that the data have not
been written, right ? Do we still want to update the mtime of the inode if
no data was written on disk ?

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