Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Oct 2023 19:48:41 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        Mark Johnston <markj@freebsd.org>, freebsd-hackers@freebsd.org, rmacklem@freebsd.org
Subject:   Re: copy_file_range() doesn't update the atime of an empty file
Message-ID:  <CAOtMX2hHg=ow%2BzsmjVnWQVyCwH0M_Smx5fE5TYdLCax1=ikRKg@mail.gmail.com>
In-Reply-To: <CAM5tNy70AmgrsLmYPqgiDkPAP10msv77o8E_DzCmiO0LycEnfg@mail.gmail.com>
References:  <ZR2FUeIhO7DIQIpj@nuc> <CAOtMX2h7QLqLHPm-gUMDJKeR8oyAXssn2vxkJ8xNgBBT6Cc3bw@mail.gmail.com> <CAM5tNy72tPBLHM8mkhqkUu64GuLUiZuKFJ%2B2JFsOzVgA1hm0eA@mail.gmail.com> <CAM5tNy5nLWf9c%2BnsdxJsU-M9Q3p_VVc%2BnpuY6uwbZPwM6EwhKg@mail.gmail.com> <CAM5tNy4%2BZZTYQ4QuD_sapx3q%2BQ%2Bwz9uNu6CGL17JFsjN13i0Sg@mail.gmail.com> <CAOtMX2jSXLnhjN1JDxk9N_NCjjjKWxguhsb05F4ww9mKwcbSsg@mail.gmail.com> <CAM5tNy4k%2BfZYC8MVJO5gGf9%2Bo=Fi0sL8ER_kckrwZmi6Fwt9ow@mail.gmail.com> <CAM5tNy70AmgrsLmYPqgiDkPAP10msv77o8E_DzCmiO0LycEnfg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 5, 2023 at 6:53=E2=80=AFPM Rick Macklem <rick.macklem@gmail.com=
> wrote:
>
> On Thu, Oct 5, 2023 at 3:30=E2=80=AFPM Rick Macklem <rick.macklem@gmail.c=
om> wrote:
> >
> > On Thu, Oct 5, 2023 at 8:41=E2=80=AFAM Alan Somers <asomers@freebsd.org=
> wrote:
> > >
> > > I don't think that Linux is a good model to copy from, where atime is
> > > concerned.  It long ago gave up on POSIX-compliance for atime by
> > > default.  In this case, I think it's better to stick as closely as we
> > > can to read(2).  Preserving the existing behavior of tools like cat,
> > > too, is worthwhile I think.
> > I have no problem with Mark's patch being applied for the default
> > local fs case.  NFSv4.2 will not be able to comply with this unless
> > (as will be the case for the FreeBSD server) the NFSv4.2 server
> > happens to change atime after Mark's patch is applied to the
> > FreeBSD NFSv4.2 server (the Linux NFSv4.2 server will not).
> I have come up with a NFSv4.2 client patch that explicitly sets atime
> for the input file in the same compound RPC as the Copy.  It works for
> a FreeBSD server without Mark's patch.  If a NFSv4.2 server does not
> do it, we can argue that the server ignores the Setattr of atime.
>
> So, with this patch (which I will be testing against assorted servers nex=
t
> week (an ietf bakeathon testing event) and Mark's patch, the only case
> that may need more work is ZFS?
>
> rick
> ps: I'll admit I still doubt anyone cares about atime being set, but the
>       collective opinion seems to be that it should be set.

I think the fusefs copy_file_range will already do this, but I should
at least add a test for it.
-Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hHg=ow%2BzsmjVnWQVyCwH0M_Smx5fE5TYdLCax1=ikRKg>