loop0: detected capacity change from 0 to 32768 BTRFS: device fsid c9fe44da-de57-406a-8241-57ec7d4412cf devid 1 transid 8 /dev/loop0 (7:0) scanned by syz.0.0 (5314) BTRFS info (device loop0): first mount of filesystem c9fe44da-de57-406a-8241-57ec7d4412cf BTRFS info (device loop0): using crc32c checksum algorithm BTRFS info (device loop0): enabling ssd optimizations BTRFS info (device loop0): turning on async discard BTRFS info (device loop0): enabling free space tree ------------[ cut here ]------------ btrfs_abort_should_print_stack(__error) WARNING: fs/btrfs/block-group.c:2951 at btrfs_create_pending_block_groups+0x13f6/0x15e0 fs/btrfs/block-group.c:2951, CPU#0: syz.0.0/5314 Modules linked in: CPU: 0 UID: 0 PID: 5314 Comm: syz.0.0 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 RIP: 0010:btrfs_create_pending_block_groups+0x13f6/0x15e0 fs/btrfs/block-group.c:2951 Code: 00 fc ff df eb 09 e8 99 a6 8b fd 90 0f 0b 90 f7 db e9 47 fd ff ff e8 89 a6 8b fd eb 10 e8 82 a6 8b fd eb 09 e8 7b a6 8b fd 90 <0f> 0b 90 48 8b 5c 24 18 44 89 e1 f7 d9 e9 47 fc ff ff e8 63 a6 8b RSP: 0018:ffffc9000f07e2c0 EFLAGS: 00010283 RAX: ffffffff843b6915 RBX: ffff888050fd0001 RCX: 0000000000100000 RDX: ffffc9000f7c1000 RSI: 000000000003d0d9 RDI: 000000000003d0da RBP: ffffc9000f07e538 R08: ffff888013692580 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000002 R12: 00000000ffffffe4 R13: fffff52001e0fc74 R14: dffffc0000000000 R15: ffff888053c1a358 FS: 00007f1dc84ce6c0(0000) GS:ffff88808c519000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1dc84aaf20 CR3: 0000000042e47000 CR4: 0000000000352ef0 Call Trace: __btrfs_end_transaction+0x140/0x640 fs/btrfs/transaction.c:1092 find_free_extent_update_loop fs/btrfs/extent-tree.c:4401 [inline] find_free_extent+0x472d/0x5c70 fs/btrfs/extent-tree.c:4810 btrfs_reserve_extent+0x349/0x850 fs/btrfs/extent-tree.c:4904 cow_one_range fs/btrfs/inode.c:1211 [inline] cow_file_range+0x4e6/0x12a0 fs/btrfs/inode.c:1403 btrfs_run_delalloc_range+0x89e/0x1fd0 fs/btrfs/inode.c:2429 writepage_delalloc+0x10a4/0x1c60 fs/btrfs/extent_io.c:1671 extent_writepage fs/btrfs/extent_io.c:2043 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2706 [inline] btrfs_writepages+0x161f/0x28b0 fs/btrfs/extent_io.c:2838 do_writepages+0x338/0x560 mm/page-writeback.c:2571 filemap_writeback mm/filemap.c:387 [inline] filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:412 btrfs_fdatawrite_range+0x54/0xf0 fs/btrfs/file.c:3884 btrfs_direct_write+0x69d/0xc20 fs/btrfs/direct-io.c:1040 btrfs_do_write_iter+0x325/0x790 fs/btrfs/file.c:1449 iter_file_splice_write+0xa31/0x1240 fs/splice.c:736 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1159 splice_direct_to_actor+0x57b/0xcb0 fs/splice.c:1103 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1228 do_sendfile+0x52e/0x7c0 fs/read_write.c:1371 __do_sys_sendfile64 fs/read_write.c:1432 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1418 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1dc759e0d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1dc84cdfe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f1dc7825fa0 RCX: 00007f1dc759e0d9 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000005 RBP: 00007f1dc7635024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1dc7826038 R14: 00007f1dc7825fa0 R15: 00007ffc9d8b0c08