2008-01-30 11:23:03

by Jens Axboe

[permalink] [raw]
Subject: Re: atimes not updated over NFS

On Tue, Jan 29 2008, Andre Majorel wrote:
> On 2008-01-29 19:30 +0100, Jens Axboe wrote:
>
> > diff --git a/fs/splice.c b/fs/splice.c
> > index 0a0b79b..504a096 100644
> > --- a/fs/splice.c
> > +++ b/fs/splice.c
> > @@ -1052,8 +1052,10 @@ out_release:
> > /*
> > * If we transferred some data, return the number of bytes:
> > */
> > - if (bytes > 0)
> > + if (bytes > 0) {
> > + file_accessed(in);
> > return bytes;
> > + }
> >
> > return ret;
>
> Does the (bytes > 0) test mean that read(2) on an empty file will
> not update the atime ? Not a big deal for me personally, but that
> would be inconsistent with local file system behaviour.

Good point, I'll commit a fixup for that patch.

--
Jens Axboe



2008-01-30 12:13:24

by Andre Majorel

[permalink] [raw]
Subject: Re: atimes not updated over NFS

On 2008-01-30 12:23 +0100, Jens Axboe wrote:
> On Tue, Jan 29 2008, Andre Majorel wrote:
> > On 2008-01-29 19:30 +0100, Jens Axboe wrote:
> >=20
> > > diff --git a/fs/splice.c b/fs/splice.c
> > > index 0a0b79b..504a096 100644
> > > --- a/fs/splice.c
> >=20
> > Does the (bytes > 0) test mean that read(2) on an empty file will
> > not update the atime ? Not a big deal for me personally, but that
> > would be inconsistent with local file system behaviour.
>=20
> Good point, I'll commit a fixup for that patch.

Excellent. Thanks to everyone involved.

--=20
Andr=E9 Majorel <URL:http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for contact information.