All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuxuan Shui <yshuiv7@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs receive fails with "failed to clone extents"
Date: Thu, 23 Sep 2021 02:40:30 +0100	[thread overview]
Message-ID: <CAGqt0zy6a8+awo6ifUn4x+WxN=c6e8PnuMW5kYRodxOQ6vwU-A@mail.gmail.com> (raw)
In-Reply-To: <CAGqt0zyEx1pyStPVTSnvsZGYKAGEv9yUunv-82Mj6ZED3WNKRA@mail.gmail.com>

On Thu, Sep 23, 2021 at 2:34 AM Yuxuan Shui <yshuiv7@gmail.com> wrote:
>
> Hi,
>
> On Thu, Sep 23, 2021 at 12:24 AM Qu Wenruo <quwenruo.btrfs@gmx.com> 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.

Besides that, I straced the btrfs command and this clone ioctl
definitely looks valid, irregardless of whether the parent snapshot
has been changed or not. The length looks to be aligned (128k), and
the range is within the source file. Why did the clone fail?

>
> >
> > Btrfs should not allow such incremental send at all.
> >
> > We're already working on such problem, but next time if you want to
> > modify a RO subvolume which could be the parent subvolume of incremental
> > send, please either do a snapshot then modify the snapshot, or just
> > don't do it.
> >
> > Thanks,
> > Qu
> >
> > >
> > > Sending end has 5.14.6 and btrfs-progs 5.14, receiving end has 5.14.6
> > > and btrfs-progs 5.13.1
> > >
>
>
>
> --
>
> Regards
> Yuxuan Shui



-- 

Regards
Yuxuan Shui

  reply	other threads:[~2021-09-23  1:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 19:37 btrfs receive fails with "failed to clone extents" Yuxuan Shui
2021-09-22 23:24 ` Qu Wenruo
2021-09-23  1:34   ` Yuxuan Shui
2021-09-23  1:40     ` Yuxuan Shui [this message]
2021-09-23  2:32       ` Qu Wenruo
     [not found]         ` <CAGqt0zz+=nUYbNwLSPYwzYcNLgyxsWT22p+jwwFpAOcyAHAWgA@mail.gmail.com>
2021-09-23  9:27           ` Fwd: " Yuxuan Shui
     [not found]           ` <e83029f0-8583-91b9-47c8-a99d4b00a6ae@gmx.com>
2021-09-23  9:38             ` Yuxuan Shui
2021-09-23  9:43               ` Yuxuan Shui
2021-09-23  9:44                 ` Qu Wenruo
2021-09-23 10:08                   ` Yuxuan Shui
2021-09-23 10:19                     ` Qu Wenruo
2021-09-23 10:46                       ` Filipe Manana
2021-09-23 11:16                         ` Qu Wenruo
2021-09-23 11:24                           ` Filipe Manana
2021-09-24  9:47                           ` Yuxuan Shui
2021-09-24  9:57                             ` Qu Wenruo
2021-09-23  9:27     ` Graham Cobb
2021-09-23  9:40       ` Yuxuan Shui
2021-09-23 10:13 ` Filipe Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGqt0zy6a8+awo6ifUn4x+WxN=c6e8PnuMW5kYRodxOQ6vwU-A@mail.gmail.com' \
    --to=yshuiv7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.