Skip to content
Snippets Groups Projects
  • Jannik Glückert's avatar
    d87caacf
    libstdc++: Use copy_file_range for filesystem::copy_file · d87caacf
    Jannik Glückert authored
    
    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>
    d87caacf
    History
    libstdc++: Use copy_file_range for filesystem::copy_file
    Jannik Glückert authored
    
    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>