RFC: atime and ZFS snapshots

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Tue, 24 Mar 2026 23:20:20 UTC
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?

Any comments appreciated, rick