device 0 buckets 34-35, fixing bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 36-37, fixing bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 40-41, fixing bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 43-44, fixing bcachefs (loop0): hole in alloc btree missing in freespace btree device 0 buckets 45-120, fixing done bcachefs (loop0): check_lrus... bcachefs (loop0): incorrect lru entry: lru fragmentation time 281474976710655 u64s 5 type set U64_MAX:18302628885633695778:0 len 0 ver 0 for u64s 5 type deleted 65024:34:0 len 0 ver 0, fixing done bcachefs (loop0): check_btree_backpointers... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 5/128 buckets done bcachefs (loop0): check_alloc_to_lru_refs... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): check_snapshot_trees... done bcachefs (loop0): check_snapshots... bcachefs (loop0): snapshot points to missing/incorrect tree: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1 tree 0, fixing bcachefs (loop0): snapshot points to missing/incorrect tree: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1 tree 0, fixing done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_subvol_children... done bcachefs (loop0): delete_dead_snapshots... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_extents... done bcachefs (loop0): check_indirect_extents... done bcachefs (loop0): check_dirents... bcachefs (loop0): dirent points to missing inode: u64s 7 type dirent 4098:5675548428000973578:U32_MAX len 0 ver 0: file1 -> 4100 type lnk, fixing done bcachefs (loop0): check_xattrs... done bcachefs (loop0): check_root... done bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... bcachefs (loop0): inode 536870914 type reg has wrong i_nlink (2780562353, should be 1), fixing done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_iter.c:266! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5333 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_btree_iter_verify_entry_exit+0xb20/0xb60 fs/bcachefs/btree_iter.c:265 Code: 51 fa ff ff 44 89 f1 80 e1 07 38 c1 0f 8c 56 fa ff ff be 08 00 00 00 4c 89 f7 e8 db e0 d4 fd e9 44 fa ff ff e8 61 b6 6a fd 90 <0f> 0b e8 59 b6 6a fd 90 0f 0b e8 51 b6 6a fd 90 0f 0b e8 49 b6 6a RSP: 0018:ffffc9000345eb38 EFLAGS: 00010246 RAX: ffffffff84589ebf RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000f5e9000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: dffffc0000000000 R08: ffffffff84589428 R09: 0000000000000000 R10: ffffc9000345e980 R11: fffff5200068bd35 R12: 0000000000000820 R13: dffffc0000000000 R14: ffffc9000345f060 R15: 1ffff1100a5be808 FS: 00007f2366fed6c0(0000) GS:ffff88808c596000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a21bd42088 CR3: 0000000044074000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_btree_iter_peek_slot+0x16f/0x27e0 fs/bcachefs/btree_iter.c:2737 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:591 [inline] bch2_bkey_get_iter fs/bcachefs/btree_iter.h:605 [inline] may_delete_deleted_inode fs/bcachefs/inode.c:1321 [inline] bch2_delete_dead_inodes+0x976/0x2340 fs/bcachefs/inode.c:1421 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:226 bch2_run_recovery_passes+0x2ad/0xa90 fs/bcachefs/recovery_passes.c:285 bch2_fs_recovery+0x292a/0x3e20 fs/bcachefs/recovery.c:936 bch2_fs_start+0x310/0x620 fs/bcachefs/super.c:1069 bch2_fs_get_tree+0x113e/0x18f0 fs/bcachefs/fs.c:2253 vfs_get_tree+0x90/0x2b0 fs/super.c:1759 do_new_mount+0x2cf/0xb70 fs/namespace.c:3879 do_mount fs/namespace.c:4219 [inline] __do_sys_mount fs/namespace.c:4430 [inline] __se_sys_mount+0x38c/0x400 fs/namespace.c:4407 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:0x7f236ab8e90a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f2366fece68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2366fecef0 RCX: 00007f236ab8e90a RDX: 0000200000005c80 RSI: 0000200000000000 RDI: 00007f2366feceb0 RBP: 0000200000005c80 R08: 00007f2366fecef0 R09: 0000000000800000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000000 R13: 00007f2366feceb0 R14: 0000000000005aca R15: 0000200000005e00 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_btree_iter_verify_entry_exit+0xb20/0xb60 fs/bcachefs/btree_iter.c:265 Code: 51 fa ff ff 44 89 f1 80 e1 07 38 c1 0f 8c 56 fa ff ff be 08 00 00 00 4c 89 f7 e8 db e0 d4 fd e9 44 fa ff ff e8 61 b6 6a fd 90 <0f> 0b e8 59 b6 6a fd 90 0f 0b e8 51 b6 6a fd 90 0f 0b e8 49 b6 6a RSP: 0018:ffffc9000345eb38 EFLAGS: 00010246 RAX: ffffffff84589ebf RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000f5e9000 RSI: 00000000000fffff RDI: 0000000000100000 RBP: dffffc0000000000 R08: ffffffff84589428 R09: 0000000000000000 R10: ffffc9000345e980 R11: fffff5200068bd35 R12: 0000000000000820 R13: dffffc0000000000 R14: ffffc9000345f060 R15: 1ffff1100a5be808 FS: 00007f2366fed6c0(0000) GS:ffff88808c596000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a21bd42088 CR3: 0000000044074000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400