]> git.ipfire.org Git - thirdparty/coreutils.git/commit
copy: be more defensive/restrictive with posix_fadvise
authorPádraig Brady <P@draigBrady.com>
Fri, 31 Oct 2025 15:37:55 +0000 (15:37 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 1 Nov 2025 11:24:59 +0000 (11:24 +0000)
commit2c5754649e08a664f3d43f7bc1df08f498bc1554
treed5d374f5b6e3e0d15a88dad50252b3294f7f543c
parent64b8fdb5b4767e0f833486507c3eae46ed1b40f8
copy: be more defensive/restrictive with posix_fadvise

* src/copy-file-data.c (copy_file_data): Only give the
POSIX_FADV_SEQUENTIAL hint when we _know_ we'll definitely
use a read/write loop to copy the data.  Also only apply
the hint to the whole file, as we've seen OpenZFS at least
special case that.
(sparse_copy): Update stale comment.
src/copy-file-data.c