From nobody Tue Mar 24 23:50:09 2026 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fgRcK3hVJz6WNBk for ; Tue, 24 Mar 2026 23:50:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4fgRcJ50qfz3HMj for ; Tue, 24 Mar 2026 23:50:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 62ONo9OD077307; Wed, 25 Mar 2026 01:50:12 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 62ONo9OD077307 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 62ONo95K077306; Wed, 25 Mar 2026 01:50:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 25 Mar 2026 01:50:09 +0200 From: Konstantin Belousov To: Rick Macklem Cc: FreeBSD CURRENT Subject: Re: RFC: atime and ZFS snapshots Message-ID: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-2.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; NEURAL_HAM_SHORT(-0.09)[-0.086]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_TO(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; HAS_XAW(0.00)[] X-Rspamd-Queue-Id: 4fgRcJ50qfz3HMj X-Spamd-Bar: -- 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 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.