BTRFS critical (device loop3): entry offset 1056768, bytes 4186112, bitmap no BTRFS info (device loop3): block group has cluster?: no BTRFS info (device loop3): 0 blocks of free space at or bigger than bytes is ------------[ cut here ]------------ WARNING: CPU: 1 PID: 4198 at fs/btrfs/block-group.c:3487 do_chunk_alloc fs/btrfs/block-group.c:3487 [inline] WARNING: CPU: 1 PID: 4198 at fs/btrfs/block-group.c:3487 btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3710 Modules linked in: CPU: 1 PID: 4198 Comm: kworker/u4:7 Not tainted 5.15.161-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: events_unbound btrfs_async_reclaim_metadata_space pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : do_chunk_alloc fs/btrfs/block-group.c:3487 [inline] pc : btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3710 lr : do_chunk_alloc fs/btrfs/block-group.c:3487 [inline] lr : btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3710 sp : ffff80001ccb6660 x29: ffff80001ccb66c0 x28: ffff0000dbceff20 x27: 0000000000000005 x26: ffffffffffffffe4 x25: ffff0000dbceff6b x24: ffff0000e5998868 x23: 00000000ffffffe4 x22: 1fffe0001b79dfef x21: ffff0000d10a4000 x20: dfff800000000000 x19: ffff0000e76a9000 x18: 0000000000000001 x17: 0000000000000000 x16: ffff80001199d104 x15: 00000000ffffffff x14: ffff0000ce953680 x13: 0000000000000001 x12: 0000000000000001 x11: 0000000000000000 x10: 0000000000000000 x9 : c0c1473d37147700 x8 : c0c1473d37147700 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001ccb5dd8 x4 : ffff800014a2f7a0 x3 : ffff8000085503f4 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: do_chunk_alloc fs/btrfs/block-group.c:3487 [inline] btrfs_chunk_alloc+0x8f8/0xcdc fs/btrfs/block-group.c:3710 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:8623 do_writepages+0x39c/0x5ec mm/page-writeback.c:2364 filemap_fdatawrite_wbc+0x1c8/0x228 mm/filemap.c:400 start_delalloc_inodes+0x630/0xa30 fs/btrfs/inode.c:10119 btrfs_start_delalloc_roots+0x5e4/0x898 fs/btrfs/inode.c:10198 shrink_delalloc fs/btrfs/space-info.c:538 [inline] flush_space+0x5b0/0xc94 fs/btrfs/space-info.c:646 btrfs_async_reclaim_metadata_space+0x6c8/0x80c fs/btrfs/space-info.c:953 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 irq event stamp: 593520 hardirqs last enabled at (593519): [] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257 hardirqs last disabled at (593520): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:396 softirqs last enabled at (593468): [] softirq_handle_end kernel/softirq.c:401 [inline] softirqs last enabled at (593468): [] handle_softirqs+0xb88/0xdbc kernel/softirq.c:586 softirqs last disabled at (593313): [] __do_softirq kernel/softirq.c:592 [inline] softirqs last disabled at (593313): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (593313): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (593313): [] __irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641 ---[ end trace 3ac05cb3f4f5feec ]--- BTRFS: error (device loop3) in do_chunk_alloc:3487: errno=-28 No space left BTRFS info (device loop3): forced readonly BTRFS error (device loop3): allocation failed flags 2, wanted 4096 tree-log 0, relocation: 0 BTRFS info (device loop3): space_info 2 has -4096 free, is not full BTRFS info (device loop3): space_info total=4194304, used=4096, pinned=0, reserved=0, may_use=4096, readonly=4190208 zone_unusable=0 BTRFS info (device loop3): global_block_rsv: size 851968 reserved 851968 BTRFS info (device loop3): trans_block_rsv: size 0 reserved 0 BTRFS info (device loop3): chunk_block_rsv: size 0 reserved 0 BTRFS info (device loop3): delayed_block_rsv: size 0 reserved 0 BTRFS info (device loop3): delayed_refs_rsv: size 196608 reserved 196608 BTRFS info (device loop3): block group 1048576 has 4194304 bytes, 4096 used 0 pinned 0 reserved 0 zone_unusable BTRFS critical (device loop3): entry offset 1048576, bytes 4096, bitmap no BTRFS critical (device loop3): entry offset 1056768, bytes 4186112, bitmap no BTRFS info (device loop3): block group has cluster?: no BTRFS info (device loop3): 2 blocks of free space at or bigger than bytes is BTRFS: error (device loop3) in btrfs_create_pending_block_groups:2427: errno=-28 No space left