mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>,
	syzbot <syzbot+ae97a827ae1c3336bbb4@syzkaller.appspotmail.com>,
	clm@fb.com, dsterba@suse.com, johannes.thumshirn@wdc.com,
	josef@toxicpanda.com, linux-btrfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [btrfs?] kernel BUG in prepare_to_merge
Date: Wed, 2 Aug 2023 06:19:38 +0800	[thread overview]
Message-ID: <e8778859-8783-21ff-484e-28591f1e65bd@gmx.com> (raw)
In-Reply-To: <ZMju6PMnJ6tnMgfy@infradead.org>



On 2023/8/1 19:39, Christoph Hellwig wrote:
> With misc-next and your debug patch I first ran into another assert:
>
> [  250.848976][T35903] assertion failed: 0, in fs/btrfs/relocation.c:2042
> [  250.849963][T35903] ------------[ cut here ]------------
> [  250.850472][T35903] kernel BUG at fs/btrfs/relocation.c:2042!
>
> and here is the output from your assert:
>
> [ 1378.272143][T189001] BTRFS error (device loop1): reloc tree mismatch, root 8 has no reloc root, expect reloc root key (-8, 132, 8) gen 17

Thanks a lot!

This indeed shows what I feared, on-disk corruption.

The root 8 is quota tree, which doesn't need to go through tree-reloc at
all.

The whole tree-relocation idea is for subvolume trees, which would do a
special snapshot for them, and then swap the highest tree nodes between
the tree reloc tree (the special snapshot) and the subvolume tree.

Thus for non-subvolume trees, relocation is done by just COWing the
involved tree blocks and call it a day.

This means we should never hit a reloc tree for non-subvolume trees, and
this looks like a on-disk format corruption.

Maybe I can reject those obviously incorrect reloc trees in tree-checker.

Thanks,
Qu

> [ 1378.274019][T189001] ------------[ cut here ]------------
> [ 1378.274540][T189001] BTRFS: Transaction aborted (error -117)
> [ 1378.277110][T189001] WARNING: CPU: 3 PID: 189001 at fs/btrfs/relocation.c:1946 prepare_to_merge+0x10e0/0x1460
>

  parent reply	other threads:[~2023-08-01 22:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-01 20:46 syzbot
2023-07-03  5:10 ` syzbot
2023-07-30 17:07 ` syzbot
2023-07-31  5:11   ` Qu Wenruo
2023-07-31  5:26     ` Qu Wenruo
2023-08-01 14:37       ` Aleksandr Nogikh
2023-08-01 14:58         ` syzbot
2023-08-02  5:19           ` Qu Wenruo
2023-08-02  5:35             ` syzbot
2023-07-31  2:13 ` syzbot
2023-07-31  7:37   ` Christoph Hellwig
2023-07-31  8:12     ` Qu Wenruo
2023-07-31  9:46       ` Christoph Hellwig
2023-07-31 10:01         ` Qu Wenruo
2023-08-01 11:39           ` Christoph Hellwig
2023-08-01 15:26             ` Christoph Hellwig
2023-08-02  6:53               ` Qu Wenruo
2023-08-01 22:19             ` Qu Wenruo [this message]
2023-08-02  9:12 ` Qu Wenruo
2023-08-02  9:32   ` syzbot

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=e8778859-8783-21ff-484e-28591f1e65bd@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+ae97a827ae1c3336bbb4@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®