BTRFS info (device loop0): balance: start -d -m BTRFS info (device loop0): relocating block group 6881280 flags data|metadata BTRFS info (device loop0): found 1 extents, stage: move data extents ------------[ cut here ]------------ kernel BUG at fs/btrfs/relocation.c:841! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5325 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:get_new_location fs/btrfs/relocation.c:838 [inline] RIP: 0010:replace_file_extents+0x1574/0x1590 fs/btrfs/relocation.c:941 Code: e4 2c fe 49 8b 3e be 03 00 00 00 48 c7 c2 40 d3 17 8c 44 89 e9 e8 4c 48 26 fd e8 f7 36 ff ff e9 a7 fc ff ff e8 5d ca c0 fd 90 <0f> 0b e8 55 ca c0 fd 90 0f 0b e8 4d ca c0 fd 90 0f 0b e8 45 ca c0 RSP: 0018:ffffc9000e15e8e0 EFLAGS: 00010287 RAX: ffffffff84045963 RBX: ffff888011e51e70 RCX: 0000000000100000 RDX: ffffc90020001000 RSI: 000000000005c643 RDI: 000000000005c644 RBP: ffffc9000e15eaf0 R08: ffffea000047e4c7 R09: 1ffffd400008fc98 R10: dffffc0000000000 R11: fffff9400008fc99 R12: 00000000000005a9 R13: ffff888041bf61d8 R14: 0000000000000ddb R15: 97f6772c9ace5d22 FS: 00007fe181beb6c0(0000) GS:ffff88808c826000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000009ff000 CR3: 00000000123fe000 CR4: 0000000000352ef0 Call Trace: btrfs_force_cow_block+0xa4d/0x2450 fs/btrfs/ctree.c:532 btrfs_cow_block+0x3c4/0xa90 fs/btrfs/ctree.c:699 btrfs_search_slot+0xd13/0x2d20 fs/btrfs/ctree.c:2112 btrfs_lookup_inode+0xde/0x480 fs/btrfs/inode-item.c:394 __btrfs_update_delayed_inode+0x177/0x1070 fs/btrfs/delayed-inode.c:1017 btrfs_update_delayed_inode fs/btrfs/delayed-inode.c:1103 [inline] __btrfs_commit_inode_delayed_items+0x1dfa/0x1f50 fs/btrfs/delayed-inode.c:1127 __btrfs_run_delayed_items+0x1f6/0x510 fs/btrfs/delayed-inode.c:1158 btrfs_commit_transaction+0x836/0x30e0 fs/btrfs/transaction.c:2376 prepare_to_relocate+0x39f/0x490 fs/btrfs/relocation.c:3476 relocate_block_group+0x149/0xe70 fs/btrfs/relocation.c:3501 do_nonremap_reloc+0xa8/0x5b0 fs/btrfs/relocation.c:5250 btrfs_relocate_block_group+0x7e6/0xc40 fs/btrfs/relocation.c:5416 btrfs_relocate_chunk+0x115/0x820 fs/btrfs/volumes.c:3598 __btrfs_balance+0x1db0/0x2ae0 fs/btrfs/volumes.c:4509 btrfs_balance+0xaf3/0x11b0 fs/btrfs/volumes.c:4896 btrfs_ioctl_balance+0x3d3/0x610 fs/btrfs/ioctl.c:3453 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe180d9c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe181beafe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe181016090 RCX: 00007fe180d9c819 RDX: 0000200000000180 RSI: 00000000c4009420 RDI: 0000000000000006 RBP: 00007fe180e32c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe181016128 R14: 00007fe181016090 R15: 00007ffef0d02e58 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:get_new_location fs/btrfs/relocation.c:838 [inline] RIP: 0010:replace_file_extents+0x1574/0x1590 fs/btrfs/relocation.c:941 Code: e4 2c fe 49 8b 3e be 03 00 00 00 48 c7 c2 40 d3 17 8c 44 89 e9 e8 4c 48 26 fd e8 f7 36 ff ff e9 a7 fc ff ff e8 5d ca c0 fd 90 <0f> 0b e8 55 ca c0 fd 90 0f 0b e8 4d ca c0 fd 90 0f 0b e8 45 ca c0 RSP: 0018:ffffc9000e15e8e0 EFLAGS: 00010287 RAX: ffffffff84045963 RBX: ffff888011e51e70 RCX: 0000000000100000 RDX: ffffc90020001000 RSI: 000000000005c643 RDI: 000000000005c644 RBP: ffffc9000e15eaf0 R08: ffffea000047e4c7 R09: 1ffffd400008fc98 R10: dffffc0000000000 R11: fffff9400008fc99 R12: 00000000000005a9 R13: ffff888041bf61d8 R14: 0000000000000ddb R15: 97f6772c9ace5d22 FS: 00007fe181beb6c0(0000) GS:ffff88808c826000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000c6b000 CR3: 00000000123fe000 CR4: 0000000000352ef0