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.

MFC after: 1 month

Details

Provenance
rmacklemAuthored on Oct 18 2023, 8:07 PM
Parents
rGc4e298251ab0: nfscl: Handle the NFSERR_RETRYUNCACHEDREP error from a NFSv4 server
Branches
Unknown
Tags
Unknown