Skip to content
Snippets Groups Projects
Commit d87caacf authored by Jannik Glückert's avatar Jannik Glückert Committed by Jonathan Wakely
Browse files

libstdc++: Use copy_file_range for filesystem::copy_file


copy_file_range is a recent-ish syscall for copying files. It is similar
to sendfile but allows filesystem-specific optimizations. Common are:
Reflinks: BTRFS, XFS, ZFS (does not implement the syscall yet)
Server-side copy: NFS, SMB, Ceph

If copy_file_range is not available for the given files, fall back to
sendfile / userspace copy.

libstdc++-v3/ChangeLog:

	* acinclude.m4 (_GLIBCXX_USE_COPY_FILE_RANGE): Define.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* src/filesystem/ops-common.h (copy_file_copy_file_range):
	Define new function.
	(do_copy_file): Use it.

Signed-off-by: default avatarJannik Glückert <jannik.glueckert@gmail.com>
parent f80a8b42
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment