From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 459B8C433F5 for ; Thu, 23 Sep 2021 09:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2719E6121F for ; Thu, 23 Sep 2021 09:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240173AbhIWJdn (ORCPT ); Thu, 23 Sep 2021 05:33:43 -0400 Received: from zaphod.cobb.me.uk ([213.138.97.131]:51364 "EHLO zaphod.cobb.me.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240157AbhIWJdj (ORCPT ); Thu, 23 Sep 2021 05:33:39 -0400 Received: by zaphod.cobb.me.uk (Postfix, from userid 107) id 4A53D9B817; Thu, 23 Sep 2021 10:32:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cobb.uk.net; s=201703; t=1632389526; bh=JcmyUrGtNxRsgWNuoygIYrFOeiNZKKY6s0eIjBIiXqg=; h=From:To:Cc:References:Subject:Date:In-Reply-To:From; b=ikFrV7cHJQwO7WITVr+P8MuS5nVSd/AyYSpXS1/uyzTyXVHs7zKpxtoKtVDLK5WEO 33uGB2BvbFxcKsEtXBofMXqImviIjbHnjmW5Urovjf5yJWsv9ArFNuPDogbML6M548 z8icKDhjIduXGP50tTMe9xSiYF8ojdpfbAmgid1P10NKJGjeIWPWdbSUXz48oXYmPp uTc9XfgcpkCUAsufTVmeHe6IIND7L2JEkx9/Ls6ZYeHEM1C2EpOcKbo+NOnJjio3GR AK+13+0p6AvzbQKJxJUf91kCqjC9jTYwE5dI/EkvJ634nmfr1Uji4v3vuN7dJXODsf rP9Ovk3n9gg4A== Received: from black.home.cobb.me.uk (unknown [192.168.0.205]) by zaphod.cobb.me.uk (Postfix) with ESMTP id 6956B9B730; Thu, 23 Sep 2021 10:27:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cobb.uk.net; s=201703; t=1632389225; bh=JcmyUrGtNxRsgWNuoygIYrFOeiNZKKY6s0eIjBIiXqg=; h=From:To:Cc:References:Subject:Date:In-Reply-To:From; b=yVPQ0os8JkhX7a0oFK+ROB27Dl+yjg2JJ8YqgHDbP41n5ZOo9e0n4B6ivZhsBXs2L xhTKQdO1EDfbt/PcVWPYk7sQ6TSB4MtGmbT2Zvyf0el7GL8gbGHP/kc9WgPXjnQMCe 8cXnQDOeTA2jXgwIrJK6Nfk4WgT1Jj8be+dw+tO4qPv+vUyBG8a8nUjCR35aGjLw/r TZavUiiKzXIJH2++bHzGY8CYkTcLix34uR+xLSfC+GNae3vYTfIUak75FuuS+6M4HV txmgT89/XBd36mckm2dezzvI6KbvacRNX10SvuTpueyDFbbcoNlhAXSRbU1LWlYqwM j5QgozgSunuSQ== Received: from [192.168.0.202] (ryzen.home.cobb.me.uk [192.168.0.202]) by black.home.cobb.me.uk (Postfix) with ESMTP id F35222A0F4F; Thu, 23 Sep 2021 10:27:04 +0100 (BST) From: Graham Cobb To: Yuxuan Shui , Qu Wenruo Cc: linux-btrfs@vger.kernel.org References: Subject: Re: btrfs receive fails with "failed to clone extents" Message-ID: Date: Thu, 23 Sep 2021 10:27:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 23/09/2021 02:34, Yuxuan Shui wrote: > Hi, > > On Thu, Sep 23, 2021 at 12:24 AM Qu Wenruo wrote: >> >> >> >> On 2021/9/23 03:37, Yuxuan Shui wrote: >>> Hi, >>> >>> The problem is as the title states. Relevant logs from `btrfs receive -vvv`: >>> >>> mkfile o119493905-1537066-0 >>> rename o119493905-1537066-0 -> >>> shui/programs/treeusage/target/release/build/zstd-sys-506c8effd111251c/out/include/zstd.h >>> utimes shui/programs/treeusage/target/release/build/zstd-sys-506c8effd111251c/out/include >>> clone shui/programs/treeusage/target/release/build/zstd-sys-506c8effd111251c/out/include/zstd.h >>> - source=shui/.cargo/registry/src/github.com-1ecc6299db9ec823/zstd-sys-1.6.1+zstd.1.5.0/zstd/lib/zstd.h >>> source offset=0 offset=0 length=131072 >>> ERROR: failed to clone extents to >>> shui/programs/treeusage/target/release/build/zstd-sys-506c8effd111251c/out/include/zstd.h: >>> Invalid argument >>> >>> stat of shui/.cargo/registry/src/github.com-1ecc6299db9ec823/zstd-sys-1.6.1+zstd.1.5.0/zstd/lib/zstd.h, >>> on the receiving end: >>> >>> File: /mnt/backup/home/backup-32/shui/.cargo/registry/src/github.com-1ecc6299db9ec823/zstd-sys-1.6.1+zstd.1.5.0/zstd/lib/zstd.h >>> Size: 145904 Blocks: 288 IO Block: 4096 regular file >>> >>> Looks to me the range of clone is within the boundary of the source >>> file. Not sure why this failed? >> >> The most common reason is, you have changed the parent subvolume from RO >> to RW, and modified the parent subvolume, then converted it back to RO. > > This is 100% not the case. I created these snapshots as RO right > before sending, and definitely haven't > changed them to RW ever. The problem isn't with the snapshots on the sending side, it is with the snapshots on the receiving side. Are you certain the snapshot on the receiving end has not been touched in any way (in particular, never been set to "RW" at any time)? Graham