On 31/12/2022 01:36, Paul Eggert wrote:
On 2022-12-30 16:23, Pádraig Brady wrote:
I may follow up with a related patch to
ensure we _don't_ use copy_file_range with --sparse=never.
Not sure it's worth the bother. A file system that would create holes
with copy_file_range could also do so with plain 'write', no?
Well copy_file_range() would be lower level and within its
remit to propagate holes. The FreeBSD docs allude to this also.
But yes, our use of copy_file_range() is generally restricted
to non holes, so less of an issue for us.
Also there may be users using `cp --sparse=never` to avoid
the perf issue currently, like we saw on the OP web thread.
I'll hold off on that change so.
Hopefully copy_file_range() flags are introduced to give
control over this (like I suggested on lkml years ago).
cheers,
Pádraig