]> git.ipfire.org Git - thirdparty/coreutils.git/commit
copy: don't avoid copy-offload upon SEEK_HOLE indicating non-sparse
authorPádraig Brady <P@draigBrady.com>
Thu, 30 Oct 2025 13:02:48 +0000 (13:02 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 1 Nov 2025 11:24:59 +0000 (11:24 +0000)
commit64b8fdb5b4767e0f833486507c3eae46ed1b40f8
tree45dd0287ed9b06d570d4d2f9b3bccbc3305192e8
parent231cc20195294c9774ab68f523dd06059f4b0a5c
copy: don't avoid copy-offload upon SEEK_HOLE indicating non-sparse

* src/copy-file-data.c (infer_scantype): Fall back to a plain copy
if SEEK_HOLE indicates non-sparse, as zero copy avoids copy offload.
This was seen with transparently compressed files on OpenZFS.
* tests/cp/sparse-perf.sh: Add a test case even though it might
only trigger on compressed file systems that don't support reflink.
* NEWS: Mention the bug fix.
Addresses https://github.com/coreutils/coreutils/issues/122
NEWS
src/copy-file-data.c
tests/cp/sparse-perf.sh