Re: RFC: posix_fadvise( "to end of file" ) semantics
From:
Collin Funk
Subject:
Re: RFC: posix_fadvise( "to end of file" ) semantics
Date:
Sat, 01 Nov 2025 01:13:44 -0700
User-agent:
Gnus/5.13 (Gnus v5.13)
Pádraig Brady <P@draigBrady.com> writes:
> This patch is in fact required with OpenZFS as my hunch was correct
> that a zero length would be treated specially (even perhaps because
> cp has used 0 for so long). With a specific length OpenZFS 2.2.2
> synchronously (decompresses and) populates the cache, which
> defeats the subsequent copy offload. Details at:
>https://github.com/coreutils/coreutils/issues/122
>
> I'll apply the above, but also the attached more defensive patch,
> to avoid fdadvise unless we really need it.
Interesting. Do you happen to have any performance benchmarks from when
fadvise was added to 'cp'? I assumed that the impact of it would be
minimal, but that report proves otherwise at least for ZFS.
Collin