BTRFS info (device loop4): block group 1048576 has 4194304 bytes, 4096 used 0 pinned 0 reserved 0 zone_unusable [readonly] BTRFS info (device loop4): block group has cluster?: no BTRFS info (device loop4): 0 blocks of free space at or bigger than bytes is ------------[ cut here ]------------ WARNING: CPU: 1 PID: 4843 at fs/btrfs/block-group.c:3505 do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] WARNING: CPU: 1 PID: 4843 at fs/btrfs/block-group.c:3505 btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3728 Modules linked in: CPU: 1 PID: 4843 Comm: syz.4.165 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] pc : btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3728 lr : do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] lr : btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3728 sp : ffff800020986740 x29: ffff8000209867a0 x28: ffff0000e9307000 x27: 000000000000000d x26: ffffffffffffffe4 x25: ffff0000e930704b x24: ffff0000cfc98868 x23: 00000000ffffffe4 x22: 1fffe0001d260e0b x21: ffff0000d8db0000 x20: dfff800000000000 x19: ffff0000d4fb5000 x18: 0000000000000001 x17: 0000000000000002 x16: ffff8000083364dc x15: 00000000ffffffff x14: ffff0000e0a8d1c0 x13: 0000000000000001 x12: 0000000000080000 x11: 000000000004cabe x10: ffff8000279ad000 x9 : de0ba1e660d77b00 x8 : de0ba1e660d77b00 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800020985eb8 x4 : ffff800014c405e0 x3 : ffff800008336628 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: do_chunk_alloc fs/btrfs/block-group.c:3505 [inline] btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3728 find_free_extent_update_loop fs/btrfs/extent-tree.c:4039 [inline] find_free_extent+0x324c/0x44e8 fs/btrfs/extent-tree.c:4402 btrfs_reserve_extent+0x1b4/0x43c fs/btrfs/extent-tree.c:4483 cow_file_range+0x4f0/0xb74 fs/btrfs/inode.c:1181 btrfs_run_delalloc_range+0x314/0x12cc fs/btrfs/inode.c:2018 writepage_delalloc+0x1d4/0x434 fs/btrfs/extent_io.c:3802 __extent_writepage+0x624/0xcbc fs/btrfs/extent_io.c:4108 extent_write_cache_pages fs/btrfs/extent_io.c:5030 [inline] extent_writepages+0x9b0/0x1268 fs/btrfs/extent_io.c:5157 btrfs_writepages+0x28/0x38 fs/btrfs/inode.c:8631 do_writepages+0x39c/0x5ec mm/page-writeback.c:2386 filemap_fdatawrite_wbc+0x1c8/0x228 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] filemap_fdatawrite_range+0x140/0x1a8 mm/filemap.c:451 btrfs_fdatawrite_range fs/btrfs/file.c:3917 [inline] start_ordered_ops+0xf0/0x24c fs/btrfs/file.c:2144 btrfs_sync_file+0x358/0xfd4 fs/btrfs/file.c:2227 vfs_fsync_range+0x168/0x188 fs/sync.c:188 generic_write_sync include/linux/fs.h:2991 [inline] btrfs_file_write_iter+0x5b8/0xb6c 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+0x884/0xb44 fs/read_write.c:594 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 1560 hardirqs last enabled at (1559): [] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257 hardirqs last disabled at (1560): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:396 softirqs last enabled at (1550): [] softirq_handle_end kernel/softirq.c:401 [inline] softirqs last enabled at (1550): [] handle_softirqs+0xb88/0xdbc kernel/softirq.c:586 softirqs last disabled at (1525): [] __do_softirq kernel/softirq.c:592 [inline] softirqs last disabled at (1525): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (1525): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (1525): [] __irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641 ---[ end trace 94d6bb68bc464faf ]--- BTRFS: error (device loop4) in do_chunk_alloc:3505: errno=-28 No space left BTRFS info (device loop4): forced readonly BTRFS error (device loop4): allocation failed flags 2, wanted 4096 tree-log 0, relocation: 0 BTRFS info (device loop4): space_info 2 has 4186112 free, is not full BTRFS info (device loop4): space_info total=4194304, used=4096, pinned=0, reserved=0, may_use=4096, readonly=0 zone_unusable=0 BTRFS info (device loop4): global_block_rsv: size 851968 reserved 851968 BTRFS info (device loop4): trans_block_rsv: size 0 reserved 0 BTRFS info (device loop4): chunk_block_rsv: size 0 reserved 0 BTRFS info (device loop4): delayed_block_rsv: size 131072 reserved 131072 BTRFS info (device loop4): delayed_refs_rsv: size 589824 reserved 180224 BTRFS info (device loop4): block group 1048576 has 4194304 bytes, 4096 used 0 pinned 0 reserved 0 zone_unusable BTRFS info (device loop4): block group has cluster?: no BTRFS info (device loop4): 0 blocks of free space at or bigger than bytes is BTRFS: error (device loop4) in btrfs_create_pending_block_groups:2443: errno=-28 No space left BTRFS error (device loop4): allocation failed flags 9, wanted 65536 tree-log 0, relocation: 0 BTRFS info (device loop4): space_info 5 has 10059776 free, is full BTRFS info (device loop4): space_info total=11534336, used=61440, pinned=0, reserved=24576, may_use=1388544, readonly=0 zone_unusable=0 BTRFS info (device loop4): global_block_rsv: size 851968 reserved 847872 BTRFS info (device loop4): trans_block_rsv: size 0 reserved 0 BTRFS info (device loop4): chunk_block_rsv: size 0 reserved 0 BTRFS info (device loop4): delayed_block_rsv: size 131072 reserved 131072 BTRFS info (device loop4): delayed_refs_rsv: size 786432 reserved 180224 BTRFS info (device loop4): block group 8519680 has 8257536 bytes, 0 used 0 pinned 12288 reserved 0 zone_unusable BTRFS critical (device loop4): entry offset 8531968, bytes 8245248, bitmap no BTRFS info (device loop4): block group has cluster?: no BTRFS info (device loop4): 1 blocks of free space at or bigger than bytes is BTRFS info (device loop4): block group 5242880 has 1638400 bytes, 49152 used 0 pinned 12288 reserved 0 zone_unusable BTRFS critical (device loop4): entry offset 5275648, bytes 12288, bitmap no BTRFS critical (device loop4): entry offset 5316608, bytes 1564672, bitmap no BTRFS info (device loop4): block group has cluster?: no BTRFS info (device loop4): 1 blocks of free space at or bigger than bytes is BTRFS info (device loop4): block group 6881280 has 1638400 bytes, 12288 used 0 pinned 0 reserved 0 zone_unusable BTRFS critical (device loop4): entry offset 6893568, bytes 1626112, bitmap no BTRFS info (device loop4): block group has cluster?: no BTRFS info (device loop4): 1 blocks of free space at or bigger than bytes is