• Paul Eggert's avatar
    Use copy_file_range to copy files · 486a81f3
    Paul Eggert authored
    The copy_file_range syscall (introduced in Linux kernel
    version 4.5) can copy files more efficiently via server-side
    copy etc.
    * admin/merge-gnulib (GNULIB_MODULES): Add copy-file-range.
    * lib/copy-file-range.c, m4/copy-file-range.m4:
    New files, copied from Gnulib.
    * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
    * src/fileio.c (Fcopy_file): Try copy_file_range first,
    falling back on read+write only if copy_file_range failed or
    if the input is empty and so could be a /proc file.
copy-file-range.m4 1.23 KB