HomeFreeBSD

nfscl: Make NFSv4.2 Copy set atime on infd

Description

nfscl: Make NFSv4.2 Copy set atime on infd

RFC7862 does not specify infile atime behaviour when a NFSv4.2 Copy
operation is performed. Since the collective opinion of a mailing
list discussion (on freebsd-hackers@) seemed to indicate that
copy_file_range(2) should update atime on the infd,
even if there is no data copied, this
patch attempts to ensure that behaviour.

For Copy, it preceeds the Copy operation with a Setattr of
TimeAccess_Set(NFSv4. speak for atime) for the invp. For the case
where no data will be copied, it does a Setattr RPC to set
TimeAccess_Set for the invp.

A __FreeBSD_version bump will be done as a separate commit, since
this patch changes the internal interface between the nfscommon and
nfscl modules.

(cherry picked from commit 57ce37f9dcd0ec749e5e4512e1e44eb963565c68)

Details

Provenance
rmacklemAuthored on Oct 18 2023, 8:07 PM
Parents
rG2c83f1ada435: mountd: Update exports.5 for commit 7c5146da1286
Branches
Unknown
Tags
Unknown