loop0: detected capacity change from 0 to 32768 BTRFS: device fsid 395ef67a-297e-477c-816d-cd80a5b93e5d devid 1 transid 8 /dev/loop0 (7:0) scanned by syz.0.0 (5328) BTRFS info (device loop0): first mount of filesystem 395ef67a-297e-477c-816d-cd80a5b93e5d BTRFS info (device loop0): using sha256 checksum algorithm BTRFS warning (device loop0): space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2 BTRFS info (device loop0): rebuilding free space tree BTRFS info (device loop0): disabling free space tree BTRFS info (device loop0): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1) BTRFS info (device loop0): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2) BTRFS info (device loop0): enabling ssd optimizations BTRFS info (device loop0): disabling tree log BTRFS info (device loop0): enabling disk space caching BTRFS info (device loop0): force clearing of disk cache BTRFS info (device loop0): enabling auto defrag ------------[ cut here ]------------ btrfs_abort_should_print_stack(__error) WARNING: fs/btrfs/block-group.c:2939 at btrfs_create_pending_block_groups+0x13d8/0x15e0 fs/btrfs/block-group.c:2939, CPU#0: syz.0.0/5328 Modules linked in: CPU: 0 UID: 0 PID: 5328 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+0x13d8/0x15e0 fs/btrfs/block-group.c:2939 Code: 83 fb f4 75 63 e8 08 1f 8d fd eb 65 e8 01 1f 8d fd eb 1a e8 fa 1e 8d fd 49 be 00 00 00 00 00 fc ff df eb 09 e8 e9 1e 8d fd 90 <0f> 0b 90 f7 db e9 47 fd ff ff e8 d9 1e 8d fd eb 10 e8 d2 1e 8d fd RSP: 0018:ffffc9000f2ee640 EFLAGS: 00010283 RAX: ffffffff8439f6e7 RBX: 00000000ffffffe4 RCX: 0000000000100000 RDX: ffffc9000e9a2000 RSI: 0000000000006312 RDI: 0000000000006313 RBP: ffffc9000f2ee8c0 R08: ffff888000f82580 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000002 R12: ffff88801296e190 R13: fffff52001e5dce4 R14: dffffc0000000000 R15: ffff88801296e358 FS: 00007f33cc02a6c0(0000) GS:ffff88808c526000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa66927ae00 CR3: 000000001fddc000 CR4: 0000000000352ef0 Call Trace: __btrfs_end_transaction+0x140/0x640 fs/btrfs/transaction.c:1092 __cow_file_range_inline+0xbe2/0x1000 fs/btrfs/inode.c:681 run_delalloc_inline fs/btrfs/inode.c:2351 [inline] btrfs_run_delalloc_range+0x1a84/0x1fd0 fs/btrfs/inode.c:2407 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 fs/btrfs/file.c:3884 [inline] start_ordered_ops fs/btrfs/file.c:1507 [inline] btrfs_sync_file+0x3d0/0x1400 fs/btrfs/file.c:1589 generic_write_sync include/linux/fs.h:2672 [inline] btrfs_do_write_iter+0x640/0x790 fs/btrfs/file.c:1459 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:0x7f33cb19e0d9 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:00007f33cc029fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f33cb425fa0 RCX: 00007f33cb19e0d9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 00007f33cb235024 R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201005 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f33cb426038 R14: 00007f33cb425fa0 R15: 00007ffecc326ca8