[Top][All Lists]

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

bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

From: Paul Eggert
Subject: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS
Date: Mon, 13 Feb 2023 22:12:43 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2023-02-13 09:16, George Valkov wrote:
1. We apply my original patch to disable sparse-copy on macOS. Otherwise since 
fclonefileat is not used whenever we overwrite a file, corruption will still 

I'm not entirely sold on this patch, because I still don't understand what's happening. The original bug report in <https://github.com/openwrt/openwrt/pull/11960> basically says only "it doesn't work", and I'd like to know more.

Part of the reason I'm hesitating is that there are multiple ways of interpreting what SEEK_HOLE and SEEK_DATA mean, and perhaps it's just that Apple has come up with yet another way to interpret it, which we need to know about.

Another reason to hesitate is that GNU coreutils is not the only core program that uses SEEK_HOLE and SEEK_DATA. If this really is a generic Apple problem we need to know which Apple releases have it, so that we can program around it at the Gnulib level instead of mucking about with each individual program.

Yet another reason is that perhaps the bug was introduced by this pair of changes introduced to Gnulib in November 2021 to try to address <https://bugs.gnu.org/51857>:


These Gnulib patches are attached. If you revert these, does the problem go away?

And yet another reason is that perhaps the bug was introduced by this pair of Coreutils changes made in October 2021 to try to address <https://bugs.gnu.org/51433>:


These Coreutils patches are also attached. Does reverting them help?

All things considered, I'd like a copy of the dtruss output for unmodified coreutils 9.1 cp on the failing case. This is really helpful for debugging this sort of thing. It's what helped us debug Bug#51857.

Attachment: 0001-lseek-port-around-macOS-SEEK_DATA-glitch.patch
Description: Text Data

Attachment: 0002-lseek-port-around-macOS-SEEK_HOLE-glitch.patch
Description: Text Data

Attachment: 0001-cp-defend-better-against-FreeBSD-9.1-zfs-bug.patch
Description: Text Data

Attachment: 0002-cp-revert-unnecessary-FreeBSD-workaround.patch
Description: Text Data

reply via email to

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