BTRFS info (device loop9): block group 1048576 has 4194304 bytes, 4096 used 0 pinned 0 reserved 0 zone_unusable [readonly] BTRFS info (device loop9): block group has cluster?: no BTRFS info (device loop9): 0 blocks of free space at or bigger than bytes is ------------[ cut here ]------------ WARNING: CPU: 1 PID: 8273 at fs/btrfs/block-group.c:3505 do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] WARNING: CPU: 1 PID: 8273 at fs/btrfs/block-group.c:3505 btrfs_chunk_alloc+0xc0e/0x1020 fs/btrfs/block-group.c:3728 Modules linked in: CPU: 1 PID: 8273 Comm: syz.9.791 Not tainted 5.15.171-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] RIP: 0010:btrfs_chunk_alloc+0xc0e/0x1020 fs/btrfs/block-group.c:3728 Code: 00 00 00 fc ff df 4c 8b 24 24 0f 1f 44 00 00 e8 68 43 fc fd eb 16 e8 61 43 fc fd 48 c7 c7 a0 2a cc 8a 44 89 ee e8 12 df c7 fd <0f> 0b 48 8b 7c 24 20 48 c7 c6 a0 38 cc 8a ba b1 0d 00 00 e9 8e 00 RSP: 0018:ffffc90002e36a58 EFLAGS: 00010246 RAX: a8bccbd434ba3400 RBX: dffffc0000000000 RCX: 0000000000040000 RDX: ffffc9000f405000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffff888059644001 R08: ffffffff81669a2c R09: ffffed1017224f24 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88805ab35084 R13: ffffffffffffffe4 R14: ffff8880753bd88b R15: 1ffff1100b566a10 FS: 00007f3026fe86c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4967b67d60 CR3: 0000000068aa9000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: find_free_extent_update_loop fs/btrfs/extent-tree.c:4039 [inline] find_free_extent+0x3eb7/0x4ff0 fs/btrfs/extent-tree.c:4402 btrfs_reserve_extent+0x20a/0x540 fs/btrfs/extent-tree.c:4483 cow_file_range+0x674/0xe10 fs/btrfs/inode.c:1181 btrfs_run_delalloc_range+0x38b/0x1500 fs/btrfs/inode.c:2018 writepage_delalloc+0x283/0x5a0 fs/btrfs/extent_io.c:3802 __extent_writepage+0x57d/0xbc0 fs/btrfs/extent_io.c:4108 extent_write_cache_pages fs/btrfs/extent_io.c:5030 [inline] extent_writepages+0xbbd/0x1590 fs/btrfs/extent_io.c:5157 do_writepages+0x481/0x730 mm/page-writeback.c:2386 filemap_fdatawrite_wbc+0x1d6/0x230 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] filemap_fdatawrite_range+0x158/0x1b0 mm/filemap.c:451 btrfs_fdatawrite_range fs/btrfs/file.c:3917 [inline] start_ordered_ops+0xe6/0x210 fs/btrfs/file.c:2144 btrfs_sync_file+0x418/0x1140 fs/btrfs/file.c:2227 generic_write_sync include/linux/fs.h:2991 [inline] btrfs_file_write_iter+0x69b/0xd00 fs/btrfs/file.c:2101 call_write_iter include/linux/fs.h:2174 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xacd/0xe50 fs/read_write.c:594 ksys_write+0x1a2/0x2c0 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f3028b91719 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3026fe8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3028d49058 RCX: 00007f3028b91719 RDX: 000000000000fea7 RSI: 0000000020000040 RDI: 0000000000000006 RBP: 00007f3028c0475e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3028d49058 R15: 00007fffde551c18