loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,journal_flush_disabled,fsck,recovery_pass_last=set_may_go_rw,reconstruct_alloc,no_data_io bcachefs (loop0): recovering from clean shutdown, journal seq 10 bcachefs (loop0): Version upgrade required: Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.24: unwritten_extents to 1.25: extent_flags running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_unreachable_inodes,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance bcachefs (loop0): dropping and reconstructing all alloc info bcachefs (loop0): invalid bkey in btree_node btree=inodes level=0: u64s 18 type error 0:4099:U32_MAX len 0 ver 0: incorrect value size (104 != 0), deleting bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... done bcachefs (loop0): going read-write bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): done starting filesystem ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_journal_iter.c:83! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted 6.15.0-rc1-syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:bch2_journal_keys_peek_max+0x166a/0x1680 fs/bcachefs/btree_journal_iter.c:83 Code: 1c 08 48 83 c3 18 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 34 61 d2 fd 4c 8b 33 e9 d2 fe ff ff e8 07 38 68 fd 90 <0f> 0b e8 df 63 d5 07 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 RSP: 0018:ffffc9000d1ce6a0 EFLAGS: 00010293 RAX: ffffffff845b1d19 RBX: 000000000000003b RCX: ffff888000f52440 RDX: 0000000000000000 RSI: 000000000000003b RDI: ffffffffffffffff RBP: ffffc9000d1ce860 R08: ffffffff845b07f7 R09: 0000000000000000 R10: 00000001ffffffff R11: 2000000000000000 R12: dffffc0000000000 R13: ffff888054800000 R14: ffffffffffffffff R15: ffffc9000d1cf070 FS: 00007f6847d166c0(0000) GS:ffff88808c596000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000004328c000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_journal_peek fs/bcachefs/btree_iter.c:2110 [inline] btree_trans_peek_journal+0x34b/0x5c0 fs/bcachefs/btree_iter.c:2139 __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2276 [inline] bch2_btree_iter_peek_max+0x14f4/0x61a0 fs/bcachefs/btree_iter.c:2347 bch2_btree_iter_peek_slot+0xde9/0x27e0 fs/bcachefs/btree_iter.c:2814 bch2_btree_iter_peek_prev_min+0x201/0x6230 fs/bcachefs/btree_iter.c:2589 __bch2_resume_logged_op_finsert+0xd8b/0x3790 fs/bcachefs/io_misc.c:432 bch2_fcollapse_finsert+0x289/0x3c0 fs/bcachefs/io_misc.c:536 bchfs_fcollapse_finsert+0x3ac/0x600 fs/bcachefs/fs-io.c:595 bch2_fallocate_dispatch+0x3f7/0x580 fs/bcachefs/fs-io.c:-1 vfs_fallocate+0x627/0x7a0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbc/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6846f8d169 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:00007f6847d16038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f68471a5fa0 RCX: 00007f6846f8d169 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000004 RBP: 00007f684700e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000007000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f68471a5fa0 R15: 00007ffde2c6bed8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_journal_keys_peek_max+0x166a/0x1680 fs/bcachefs/btree_journal_iter.c:83 Code: 1c 08 48 83 c3 18 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 34 61 d2 fd 4c 8b 33 e9 d2 fe ff ff e8 07 38 68 fd 90 <0f> 0b e8 df 63 d5 07 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 RSP: 0018:ffffc9000d1ce6a0 EFLAGS: 00010293 RAX: ffffffff845b1d19 RBX: 000000000000003b RCX: ffff888000f52440 RDX: 0000000000000000 RSI: 000000000000003b RDI: ffffffffffffffff RBP: ffffc9000d1ce860 R08: ffffffff845b07f7 R09: 0000000000000000 R10: 00000001ffffffff R11: 2000000000000000 R12: dffffc0000000000 R13: ffff888054800000 R14: ffffffffffffffff R15: ffffc9000d1cf070 FS: 00007f6847d166c0(0000) GS:ffff88808c596000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000004328c000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400