From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 13:12:56 2021 Received: (at submit) by debbugs.gnu.org; 2 May 2021 17:12:56 +0000 Received: from localhost ([127.0.0.1]:43782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFeK-00056w-4l for submit@debbugs.gnu.org; Sun, 02 May 2021 13:12:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:34220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldFeF-00056p-DM for submit@debbugs.gnu.org; Sun, 02 May 2021 13:12:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldFeE-0000jd-Vg for bug-coreutils@gnu.org; Sun, 02 May 2021 13:12:51 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:42599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldFeA-0001Hh-4A for bug-coreutils@gnu.org; Sun, 02 May 2021 13:12:47 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 4-20020a05600c26c4b0290146e1feccd8so2174754wmv.1 for ; Sun, 02 May 2021 10:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=colorremedies-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=VtDmwufKWxiD+WwrqJI5GTUFqgBThZ5QPKmZaLTDHkY=; b=0c/TNHp3roHDedIbFDYVwFr1MLUKCGE3PRxHPq/7QDw4cydDefK0qOrtNA+zz5KS48 xreyfPDyxHu2CO7Pc2VmRj/yBJRhkOFh17gj/aqGzliJhLH7thM8F8jBcUUSC0uCosNg lhy78s37XeTsPNM3pq73XJzU8c3iXCG5Kq1K5nSHwBMMbMIbp6q5FFGFGt74WdmfUjDi 1Thk3Hqd0AbDbQtcd4fHwQFbufYKD2bnYYh0Xaczt5pnTIspEe6Y5aNrOHM9NxtdbeDq FXmKWc839bRw6f9zooQnhukI5FAHZuF/opGyn5WWFUSqevyxEL1+YYOVcc3CjvjOTujH ThvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VtDmwufKWxiD+WwrqJI5GTUFqgBThZ5QPKmZaLTDHkY=; b=pEMY2fh9wgsyF374wwpSMwuPkAwfgfP+z9Igx9VeWW5T34dVJv1sFohrWVXTE8e8m8 a/UR0jgkpu3YhcZJQqzsYiMX19INt1LpFy2lee51jYLFFkbaL229Md6vbsUzzDi7+d2f 7gGEu4iaD6ei4C+yVSMvvsyJ0JHJoRmgDdZ2Jf+vzs6FfwADtXux5CPkeKX0n7WwEkP7 +hgFtcsrmMAEzejE+yQ8TDlYT48M8gKrrbE61XnzbQzpfoHkz6em/3FDA2XSgZgPORvp esEmm7n/UhNUkhB3CL5xNV/yJzAsP0H3gUOK2xXO5XGXXSLGFEBwe0cUPsRqyWqx9VAV SIew== X-Gm-Message-State: AOAM5301I+Ly1O/Ihfp4h34od8h3TzcsUGT0iBSQvijx8VuD0kEkZrw/ YBwIVhSttYDqs4k5AbksG23Cz0Ieesg8Hhm5B+g6Gja9aOeXGq9h X-Google-Smtp-Source: ABdhPJz4nMxWoibot+LlSqLv47GhhrHgw1WyOhGaL/nYPG7xLczAYBNC5IlesSsMhx8ztHUtzfzr6/5juWniHP6OX94= X-Received: by 2002:a7b:c18b:: with SMTP id y11mr17367009wmi.11.1619975563806; Sun, 02 May 2021 10:12:43 -0700 (PDT) MIME-Version: 1.0 From: Chris Murphy Date: Sun, 2 May 2021 11:12:27 -0600 Message-ID: Subject: cp --reflink=never no longer works as expected To: bug-coreutils@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=chris@colorremedies.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 16:59:32 2021 Received: (at 48164-done) by debbugs.gnu.org; 2 May 2021 20:59:32 +0000 Received: from localhost ([127.0.0.1]:44696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldJBb-0000j9-Px for submit@debbugs.gnu.org; Sun, 02 May 2021 16:59:32 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldJBZ-0000j3-Be for 48164-done@debbugs.gnu.org; Sun, 02 May 2021 16:59:30 -0400 Received: by mail-wr1-f46.google.com with SMTP id d11so3514665wrw.8 for <48164-done@debbugs.gnu.org>; Sun, 02 May 2021 13:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=A0qV/IteouEBacNZ1aVcijAVL6jGY1ufozZreYLDshU=; b=gsaPAEZaJxacvY23J7ClFYidSHIxUuIrmTDJ47at1ZFlkuf2K9kii0WiKApefF6/k2 4eqZ2WKOwlMYTzTqtqUvQSdX0kjpzdJIvx7gFC7cB1g/oo7kJ/Wn2rl0T+96IS5SFHjH 5NJuRARBs49xRlV2DUXBMjCZFEXH0WWYTwCWSt3AKP02EALHsCOiQIZ6BJuLiu6UWCe3 JrHma5qmcmf0Y7yAyFMHY4NLpBgQ5RnVmeJ86ZOxd3mIJfYVIDysvbOx0V7PjvCaxhg8 uLri22rDSFtUXp057htCQkoc0MFAtMYrz9u8pAOhxY97ydHXm8Se5dQCu/cRrEpSJJQb zG1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=A0qV/IteouEBacNZ1aVcijAVL6jGY1ufozZreYLDshU=; b=pnGFl+wXzix274PRt2tny8ytuJezEI13+hcUqLPemL9DETIDs6VF/uFUGZDvnZbhpt f49gRtKAsar9+Gz9iXbqDJoLmkEPDeJeVqkhO4Be0Bx+LiaMio63/JKexPDpmm5fca6H GEcdItoE17PDPO1YFfAx8EEmIADfNe12POv4xevmCsoFzYTJwOf6izpJuakp/5uwRX2x rE+LKge0KUdu4+1+KEdAe8e+JNg+juLYKk74wPpgkdROzzTt0jpFJNM1FPKb+jhDIz/W HAFPzxkCUlnPozlKBiLudxTme2RKKosrp2mnaDeGvP/qyYMZ7yWnWCkyxCslYD8wYJNK SqIA== X-Gm-Message-State: AOAM530HCGQJ+mGVrQ5TqnOiDAwwOjl0qXTy3cUPXrqpyVOfFtpl9+I/ h5h7E40vXJlyuI0W9rTtCikxP0L5zFA= X-Google-Smtp-Source: ABdhPJyUaULXrlrbeJXRqGeCRqkGhG/1A3dBONogfIrZyKQiUIHF8bFGsl+mT/OnxN5m+S99YWceyg== X-Received: by 2002:a5d:6d85:: with SMTP id l5mr20481938wrs.22.1619989163294; Sun, 02 May 2021 13:59:23 -0700 (PDT) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with UTF8SMTPSA id o13sm9932089wrf.91.2021.05.02.13.59.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 May 2021 13:59:22 -0700 (PDT) Subject: Re: bug#48164: cp --reflink=never no longer works as expected To: Chris Murphy , 48164-done@debbugs.gnu.org References: From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: Date: Sun, 2 May 2021 21:59:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48164-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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 From unknown Tue Jun 17 01:33:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 31 May 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator