Date: Wed, 25 Mar 2026 01:50:09 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Rick Macklem <rick.macklem@gmail.com> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: RFC: atime and ZFS snapshots Message-ID: <acMjMSio2Y7kSKGW@kib.kiev.ua> In-Reply-To: <CAM5tNy46vf%2BDHc9MTOM%2BCcZE6gTW7edbEynaYW8k1rc8rDH2WA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On Tue, Mar 24, 2026 at 04:20:20PM -0700, Rick Macklem wrote: > Hi, > > Commit cc760de and 57ce37f (in main) modified the > NFSv4.2 behaviour to attempt to always make the > atime get updated for the <from> file for copy_file_range(2). > (At the time, the concensus seemed to be that this was > correct behaviour.) > > This was done via a Setattr of atime unless "noatime" > is specified on the mount. > > But, for a file in a ZFS snapshot, the atime never gets > updated (not surprising) and, as such, EROFS gets > replied unless "noatime" is specified for an NFSv4.2 > mount. > > Does this sound correct or should the NFSv4.2 server > ignore the EROFS reply for Setattr of atime and allow > the Copy? This triggered some memories, and indeed we have the VOP_MMAPPED() implemented only for UFS. The goal was to confirm to the POSIX requirement that mmaping the file should update its access time. I think that - the VOP is not quite correctly named, but this is minor - I do not see why it is missed for ZFS and probably tmpfs as well, IMO this is a bug - you can use it for optional update of the access time for generic copy_file_range implementation, and then same can be done in fs-specific VOP as well.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?acMjMSio2Y7kSKGW>
