HomeFreeBSD

xinstall: use copy_file_range(2) with fallback to previous behavior

Description

xinstall: use copy_file_range(2) with fallback to previous behavior

This allows to use special filesystem features like server-side
copying on NFS 4.2 or block cloning on OpenZFS 2.2.

Note: copy_file_range(2) is not used when a digest calculation is
requested as this would require to read the input file twice.

Reviewed by: asomers, imp, rmacklem
Differential revision: https://reviews.freebsd.org/D40898

Details

Provenance
mmAuthored on Jul 8 2023, 7:46 PM
Reviewer
asomers
Differential Revision
D40898: copy_file_range() support for install(1)
Parents
rG8113cc827611: cat: use copy_file_range(2) with fallback to previous behavior
Branches
Unknown
Tags
Unknown