BTRFS info (device loop0): balance: start -d -m -s BTRFS info (device loop0): relocating block group 6881280 flags data|metadata BTRFS info (device loop0): relocating block group 5242880 flags data|metadata BTRFS critical (device loop0): trying to drop 2 refs but we only have 1 for bytenr 5251072 ------------[ cut here ]------------ BTRFS: Transaction aborted (error -117) WARNING: CPU: 0 PID: 5083 at fs/btrfs/extent-tree.c:3109 __btrfs_free_extent.cold+0xe71/0x1176 fs/btrfs/extent-tree.c:3109 Modules linked in: CPU: 0 PID: 5083 Comm: syz-executor253 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:__btrfs_free_extent.cold+0xe71/0x1176 fs/btrfs/extent-tree.c:3109 Code: ff 31 ff 89 c3 89 c6 e8 4f 12 b7 f7 84 db 0f 84 65 01 00 00 e8 d2 15 b7 f7 be 8b ff ff ff 48 c7 c7 a0 33 94 8a e8 81 f5 f4 ff <0f> 0b e8 ba 15 b7 f7 48 8b 7c 24 20 44 0f b6 c3 b9 8b ff ff ff ba RSP: 0018:ffffc90003c9f288 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff88807b999d40 RSI: ffffffff8166721c RDI: fffff52000793e43 RBP: ffff88807db90d10 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000502000 R15: ffff88807edef360 FS: 00007f0e9b00d700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005562722c2960 CR3: 000000002b6ec000 CR4: 0000000000350ee0 Call Trace: run_delayed_data_ref fs/btrfs/extent-tree.c:1536 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1710 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1950 [inline] __btrfs_run_delayed_refs+0x803/0x3760 fs/btrfs/extent-tree.c:2015 btrfs_run_delayed_refs+0x19a/0x490 fs/btrfs/extent-tree.c:2146 btrfs_commit_transaction+0x1e94/0x36c0 fs/btrfs/transaction.c:2151 prepare_to_relocate+0x41d/0x6b0 fs/btrfs/relocation.c:3600 relocate_block_group+0x123/0xd60 fs/btrfs/relocation.c:3625 btrfs_relocate_block_group+0x51a/0xda0 fs/btrfs/relocation.c:4087 btrfs_relocate_chunk+0x14a/0x350 fs/btrfs/volumes.c:3240 __btrfs_balance fs/btrfs/volumes.c:3968 [inline] btrfs_balance+0x1caf/0x3b50 fs/btrfs/volumes.c:4352 btrfs_ioctl_balance fs/btrfs/ioctl.c:3591 [inline] btrfs_ioctl+0xfda/0x5830 fs/btrfs/ioctl.c:4622 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0ea2482a79 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0e9b00d2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f0ea250d7f0 RCX: 00007f0ea2482a79 RDX: 0000000020022300 RSI: 00000000c4009420 RDI: 0000000000000008 RBP: 00007f0ea24da26c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e R13: 00007f0ea24d9270 R14: 61635f7261656c63 R15: 00007f0ea250d7f8