]> git.eshelyaron.com Git - emacs.git/commit
Use copy_file_range to copy files
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Jun 2019 04:18:11 +0000 (21:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Jun 2019 07:44:45 +0000 (00:44 -0700)
commit486a81f387bb59b2fbbc6aff7b41adbe1621394e
tree7b61ed0a44666f10e4da54ef3e0905974c861944
parent111408a0e9eb3a9492c4057ac7d6ddbb8b365aa9
Use copy_file_range to copy files

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.
admin/merge-gnulib
lib/copy-file-range.c [new file with mode: 0644]
lib/gnulib.mk.in
m4/copy-file-range.m4 [new file with mode: 0644]
m4/gnulib-comp.m4
src/fileio.c