------------[ cut here ]------------ BTRFS: Transaction aborted (error -28) WARNING: fs/btrfs/block-group.c:4097 at do_chunk_alloc fs/btrfs/block-group.c:4097 [inline], CPU#0: kworker/u4:6/151 WARNING: fs/btrfs/block-group.c:4097 at btrfs_chunk_alloc+0x101d/0x15e0 fs/btrfs/block-group.c:4338, CPU#0: kworker/u4:6/151 Modules linked in: CPU: 0 UID: 0 PID: 151 Comm: kworker/u4:6 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: events_unbound btrfs_async_reclaim_metadata_space RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:4097 [inline] RIP: 0010:btrfs_chunk_alloc+0x101f/0x15e0 fs/btrfs/block-group.c:4338 Code: c7 e6 b2 fd e9 6d 01 00 00 e8 5d eb 97 fd 84 c0 74 22 e8 b4 e6 b2 fd e9 5a 01 00 00 e8 aa e6 b2 fd 48 8d 3d 43 63 08 0c 89 de <67> 48 0f b9 3a e9 b3 fc ff ff e8 f2 26 9b 07 41 89 c6 31 ff 89 c6 RSP: 0018:ffffc9000172e600 EFLAGS: 00010293 RAX: ffffffff8412b0f6 RBX: ffffffffffffffe4 RCX: ffff888032ad0000 RDX: 0000000000000000 RSI: 00000000ffffffe4 RDI: ffffffff901b1440 RBP: 0000000000000000 R08: ffff888032ad0000 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000000 R12: 1ffff1100861c116 R13: ffff88801185e2b0 R14: ffff888011ad0001 R15: ffff888012a0f800 FS: 0000000000000000(0000) GS:ffff88808ca62000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd3ff1f320 CR3: 000000001f0be000 CR4: 0000000000352ef0 Call Trace: find_free_extent_update_loop fs/btrfs/extent-tree.c:4306 [inline] find_free_extent+0x52bf/0x5f60 fs/btrfs/extent-tree.c:4727 btrfs_reserve_extent+0x344/0x830 fs/btrfs/extent-tree.c:4821 cow_one_range fs/btrfs/inode.c:1320 [inline] cow_file_range+0x588/0x1310 fs/btrfs/inode.c:1522 writepage_delalloc+0x1270/0x1ee0 fs/btrfs/extent_io.c:1526 extent_writepage fs/btrfs/extent_io.c:1893 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline] btrfs_writepages+0x14df/0x2440 fs/btrfs/extent_io.c:2713 do_writepages+0x32e/0x550 mm/page-writeback.c:2554 filemap_writeback mm/filemap.c:387 [inline] filemap_flush_nr+0x20e/0x360 mm/filemap.c:462 start_delalloc_inodes+0x517/0xb00 fs/btrfs/inode.c:8892 btrfs_start_delalloc_roots+0x561/0x7f0 fs/btrfs/inode.c:8952 shrink_delalloc fs/btrfs/space-info.c:761 [inline] flush_space+0x6b5/0xd80 fs/btrfs/space-info.c:871 do_async_reclaim_metadata_space+0x3fc/0x960 fs/btrfs/space-info.c:1187 btrfs_async_reclaim_metadata_space+0x89/0xe0 fs/btrfs/space-info.c:1254 process_one_work kernel/workqueue.c:3275 [inline] process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e6 b2 out %al,$0xb2 2: fd std 3: e9 6d 01 00 00 jmp 0x175 8: e8 5d eb 97 fd call 0xfd97eb6a d: 84 c0 test %al,%al f: 74 22 je 0x33 11: e8 b4 e6 b2 fd call 0xfdb2e6ca 16: e9 5a 01 00 00 jmp 0x175 1b: e8 aa e6 b2 fd call 0xfdb2e6ca 20: 48 8d 3d 43 63 08 0c lea 0xc086343(%rip),%rdi # 0xc08636a 27: 89 de mov %ebx,%esi * 29: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2e: e9 b3 fc ff ff jmp 0xfffffce6 33: e8 f2 26 9b 07 call 0x79b272a 38: 41 89 c6 mov %eax,%r14d 3b: 31 ff xor %edi,%edi 3d: 89 c6 mov %eax,%esi