GNU bug report logs - #48164
cp --reflink=never no longer works as expected

Previous Next

Package: coreutils;

Reported by: Chris Murphy <lists <at> colorremedies.com>

Date: Sun, 2 May 2021 17:13:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48164 in the body.
You can then email your comments to 48164 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#48164; Package coreutils. (Sun, 02 May 2021 17:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Murphy <lists <at> colorremedies.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 02 May 2021 17:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chris Murphy <lists <at> colorremedies.com>
To: bug-coreutils <at> gnu.org
Subject: cp --reflink=never no longer works as expected
Date: Sun, 2 May 2021 11:12:27 -0600
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




Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sun, 02 May 2021 21:00:01 GMT) Full text and rfc822 format available.

Notification sent to Chris Murphy <lists <at> colorremedies.com>:
bug acknowledged by developer. (Sun, 02 May 2021 21:00:02 GMT) Full text and rfc822 format available.

Message #10 received at 48164-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Chris Murphy <lists <at> colorremedies.com>, 48164-done <at> debbugs.gnu.org
Subject: Re: bug#48164: cp --reflink=never no longer works as expected
Date: Sun, 2 May 2021 21:59:21 +0100
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 31 May 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.