BTRFS error (device loop0): allocation failed flags 2, wanted 4096 tree-log 0, relocation: 0 BTRFS info (device loop0): space_info SYSTEM has -98304 free, is not full BTRFS info (device loop0): space_info total=4194304, used=4096, pinned=0, reserved=0, may_use=98304, readonly=4190208 zone_unusable=0 BTRFS info (device loop0): global_block_rsv: size 1441792 reserved 1441792 BTRFS info (device loop0): trans_block_rsv: size 0 reserved 0 BTRFS info (device loop0): chunk_block_rsv: size 98304 reserved 94208 BTRFS info (device loop0): delayed_block_rsv: size 131072 reserved 131072 BTRFS info (device loop0): delayed_refs_rsv: size 851968 reserved 786432 BTRFS info (device loop0): block group 1048576 has 4194304 bytes, 4096 used 0 pinned 0 reserved 0 delalloc 0 super 0 zone_unusable (4190208 bytes available) [readonly] BTRFS info (device loop0): block group has cluster?: no BTRFS info (device loop0): 0 free space entries at or bigger than 4096 bytes BTRFS info (device loop0): 4190208 bytes available across all block groups ------------[ cut here ]------------ BTRFS: Transaction aborted (error -28) WARNING: CPU: 0 PID: 5317 at fs/btrfs/block-group.c:3945 do_chunk_alloc fs/btrfs/block-group.c:3945 [inline] WARNING: CPU: 0 PID: 5317 at fs/btrfs/block-group.c:3945 btrfs_chunk_alloc+0xebe/0xf80 fs/btrfs/block-group.c:4187 Modules linked in: CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted 6.13.0-rc2-syzkaller-00018-g7cb1b4663150 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3945 [inline] RIP: 0010:btrfs_chunk_alloc+0xebe/0xf80 fs/btrfs/block-group.c:4187 Code: 80 8b 4d 8c 89 de e8 21 ef 7e fd 90 0f 0b 90 90 e9 23 fe ff ff e8 a2 45 be fd 90 48 c7 c7 80 8b 4d 8c 89 de e8 03 ef 7e fd 90 <0f> 0b 90 90 e9 25 fe ff ff e8 84 45 be fd 90 48 c7 c7 80 8b 4d 8c RSP: 0018:ffffc9000d11e820 EFLAGS: 00010246 RAX: 1fe879a95b266200 RBX: ffffffffffffffe4 RCX: 0000000000100000 RDX: ffffc9000f181000 RSI: 0000000000007e72 RDI: 0000000000007e73 RBP: ffff8880528d0b90 R08: ffffffff81600a42 R09: fffffbfff1cfa210 R10: dffffc0000000000 R11: fffffbfff1cfa210 R12: ffff8880442aa800 R13: dffffc0000000000 R14: ffff88803e300001 R15: 0000000000000000 FS: 00007fbec24066c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbeb53ffe00 CR3: 0000000043356000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: find_free_extent_update_loop fs/btrfs/extent-tree.c:4166 [inline] find_free_extent+0x42d1/0x5810 fs/btrfs/extent-tree.c:4579 btrfs_reserve_extent+0x422/0x810 fs/btrfs/extent-tree.c:4672 cow_file_range+0x5c8/0x11f0 fs/btrfs/inode.c:1395 btrfs_run_delalloc_range+0x722/0xff0 fs/btrfs/inode.c:2303 writepage_delalloc+0x9b9/0xd50 fs/btrfs/extent_io.c:1239 extent_writepage fs/btrfs/extent_io.c:1499 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2194 [inline] btrfs_writepages+0x1389/0x20e0 fs/btrfs/extent_io.c:2325 do_writepages+0x35f/0x880 mm/page-writeback.c:2702 filemap_fdatawrite_wbc mm/filemap.c:397 [inline] __filemap_fdatawrite_range mm/filemap.c:430 [inline] filemap_fdatawrite_range+0x215/0x2c0 mm/filemap.c:448 btrfs_fdatawrite_range+0x53/0xe0 fs/btrfs/file.c:3719 btrfs_wait_ordered_range+0x59/0x260 fs/btrfs/ordered-data.c:898 btrfs_clone_files+0x2af/0x3a0 fs/btrfs/reflink.c:759 btrfs_remap_file_range+0x615/0x1210 fs/btrfs/reflink.c:889 vfs_copy_file_range+0xc07/0x1510 fs/read_write.c:1584 __do_sys_copy_file_range fs/read_write.c:1670 [inline] __se_sys_copy_file_range+0x3fa/0x600 fs/read_write.c:1637 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbec157ff19 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:00007fbec2406058 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007fbec1746080 RCX: 00007fbec157ff19 RDX: 0000000000000007 RSI: 0000000000000000 RDI: 0000000000000009 RBP: 00007fbec15f3cc8 R08: 0000000000000006 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbec1746080 R15: 00007ffc543d1ab8