]> git.ipfire.org Git - thirdparty/coreutils.git/commit
copy: attempt copy offload with sparse files by default
authorPádraig Brady <P@draigBrady.com>
Fri, 30 Dec 2022 19:34:27 +0000 (19:34 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 31 Dec 2022 00:20:45 +0000 (00:20 +0000)
commit879d2180d6b58e7a83312681fbce9a1e841c2ae4
tree05e1f38b37df59083fa494810966cd246cf1b699
parent266b7cbc846f91e5f48085c7de68682f5841e2a0
copy: attempt copy offload with sparse files by default

This was seen to vastly improve performance
on NFS 4.2 systems by allowing server side copies,
with partially sparse files (avidemux generated mp4 files).

* src/copy.c (lseek_copy): Also set hole_size to 0,
i.e. enable copy_file_range(), with --sparse=auto (the default),
to enable copy offload in this case, as we've strong signal
from SEEK_DATA that we're operating on actual data and not holes here.
* NEWS: Mention the improvement.
Fixes https://bugs.gnu.org/60416
NEWS
src/copy.c