Bug 1956080 - cp --reflink=never no longer works as expected
Summary: cp --reflink=never no longer works as expected
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 34
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2021-05-02 15:49 UTC by Chris Murphy
Modified: 2021-05-06 01:01 UTC (History)
10 users (show)

Fixed In Version: coreutils-8.32-25.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)
strace cp --reflink=never (8.63 KB, text/plain)
2021-05-02 16:02 UTC, Chris Murphy
no flags Details

Description Chris Murphy 2021-05-02 15:49:53 UTC
Description of problem:

cp --reflink=never creates shared extents

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cp --reflink=never a b
2. filefrag -v a; filefrag -v b

Actual results:

a and b share all extents

Expected results:

They should not be reflink copies

Additional info:

Just a guess but when I strace the command using --reflink=never I see:

copy_file_range(3, NULL, 4, NULL, 9223372035781033984, 0) = 65843200
copy_file_range(3, NULL, 4, NULL, 9223372035781033984, 0) = 0

And I see in the change log:

* Wed Mar 24 2021 Kamil Dudka <kdudka@redhat.com> - 8.32-20
- cp: use copy_file_range if available

So I wonder if there isn't a reflink=never exception to that change?

Comment 1 Chris Murphy 2021-05-02 16:02:27 UTC
Created attachment 1778596 [details]
strace cp --reflink=never

Comment 2 Chris Murphy 2021-05-02 16:14:47 UTC
Problem does not happen with 

Problem does happen with

Comment 3 Chris Murphy 2021-05-02 18:17:53 UTC
Upstream bug report:

Comment 4 Kamil Dudka 2021-05-03 09:02:22 UTC
Thank you for debugging it and reporting it upstream!

We need to backport the following upstream commit to fix it:


Comment 6 Fedora Update System 2021-05-03 12:09:59 UTC
FEDORA-2021-893a614857 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-893a614857

Comment 7 Fedora Update System 2021-05-04 01:09:01 UTC
FEDORA-2021-893a614857 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-893a614857`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-893a614857

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-05-06 01:01:30 UTC
FEDORA-2021-893a614857 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.