Re: [syzbot] [btrfs?] WARNING in __btrfs_check_leaf

From: David Sterba
Date: Mon Aug 26 2024 - 11:11:55 EST


On Fri, Aug 23, 2024 at 05:08:25AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 872cf28b8df9 Merge tag 'platform-drivers-x86-v6.11-4' of g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=154c5825980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4fc2afd52fd008bb
> dashboard link: https://syzkaller.appspot.com/bug?extid=d7d1fc7e21835ca19219
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/c63409516c62/disk-872cf28b.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/79b2b8c52d3a/vmlinux-872cf28b.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/27cb9df9c339/bzImage-872cf28b.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+d7d1fc7e21835ca19219@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 6069 at fs/btrfs/tree-checker.c:1545 check_extent_item fs/btrfs/tree-checker.c:1545 [inline]

Thats'

case BTRFS_EXTENT_OWNER_REF_KEY:
WARN_ON(!btrfs_fs_incompat(fs_info, SIMPLE_QUOTA));
break;

So the incompat bit is unset for some reason, or the tree item is intentionally
inserted. Either way this should be handled in a better way.