bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.


From: Pádraig Brady
Subject: bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.
Date: Sat, 23 Aug 2025 19:01:09 +0100
User-agent: Mozilla Thunderbird Beta

On 23/08/2025 01:48, Paul Eggert wrote:
On 8/22/25 07:04, Pádraig Brady wrote:
        /* Copy this extent, looking for further opportunities to not
           bother to write zeros if --sparse=always, since SEEK_HOLE
           is conservative and may miss some holes.  */

So the comment needs to be tweaked, but a more general issue
is that it disables copy offloading (copy_file_range) for sparse files.

Ouch, I didn't see that. That's a real loss. I installed the first
attached patch to revert that part of my recent change.

Cool. I'll push the attached test to enforce this
I assume the part of the change that always punches holes is OK. I
couldn't see why one would not want to punch a hole if one has already
taken the trouble to find and create the hole.

Fair enough. It simplifies the code anyway.

BTW commit 26bf557 also changed this a couple of weeks ago
without updating the comment, so the comment relates to sparse_mode !=
SPARSE_ALWAYS.

Not quite following but I hope the comment is OK now with the first
patch installed.

Right, I missed that commit 26bf557 didn't actually change the logic
for this line, only the syntax.

thanks!
Padraig

Attachment: cp-copy-offload-nfs-test.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]