GNU bug report logs -
#48164
cp --reflink=never no longer works as expected
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#48164: cp --reflink=never no longer works as expected
which was filed against the coreutils package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 48164 <at> debbugs.gnu.org.
--
48164: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48164
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
On 02/05/2021 18:12, Chris Murphy wrote:
> Hi,
>
> Fedora 34 user 'adrum' reports that 'cp --reflink=never' is performing
> a lightweight copy on Btrfs. And filefrag -v shows the extents are
> shared. Strace shows use of copy_file_range even with --reflink=never
>
> The note for copy_file_range() includes:
>
> copy_file_range() gives filesystems an opportunity to implement
> "copy acceleration" techniques, such as the use of reflinks
>
>
> Downstream bug
> https://bugzilla.redhat.com/show_bug.cgi?id=1956080
>
> The commit that causes the change in behavior:
> https://src.fedoraproject.org/rpms/coreutils/c/1737e5c81fa82451b510f982499bdedb2a1619d1?branch=rawhide
>
> It references five upstream commits.
Thanks for the detailed report. I've fixed this upstream with:
https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.32-147-gea9af9923
Ideally copy_file_range() would take CAN_REFLINK as a flag,
but for now the patch above avoids the call with --reflink=never.
Note we've not released an official coreutils release with this change yet,
as we've yet to fully test all variations of this new copying logic.
There are subtle interactions like this that need to be considered.
BTW there has been recent discussions on the non generality of
copy_file_range() at https://lwn.net/Articles/846403/
Marking this as done.
cheers,
Pádraig
[Message part 3 (message/rfc822, inline)]
Hi,
Fedora 34 user 'adrum' reports that 'cp --reflink=never' is performing
a lightweight copy on Btrfs. And filefrag -v shows the extents are
shared. Strace shows use of copy_file_range even with --reflink=never
The note for copy_file_range() includes:
copy_file_range() gives filesystems an opportunity to implement
"copy acceleration" techniques, such as the use of reflinks
Downstream bug
https://bugzilla.redhat.com/show_bug.cgi?id=1956080
The commit that causes the change in behavior:
https://src.fedoraproject.org/rpms/coreutils/c/1737e5c81fa82451b510f982499bdedb2a1619d1?branch=rawhide
It references five upstream commits.
--
Chris Murphy
This bug report was last modified 4 years and 16 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.