HomeFreeBSD

cp: use copy_file_range(2)

Description

cp: use copy_file_range(2)

This has three advantages over write(2)/read(2):

  • Fewer context switches and data copies
  • Mostly preserves a file's sparseness
  • On some file systems (currently NFS 4.2) the file system will perform the copy in an especially efficient way.

Reviewed by: rmacklem
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D26377

Details

Provenance
asomersAuthored on
Reviewer
rmacklem
Differential Revision
D26377: cp: use copy_file_range(2)
Parents
rS365548: [PowerPC] Fix setting of time in OPAL
Branches
Unknown
Tags
Unknown