bcachefs (loop0): invalid bkey in btree_node btree=inodes level=0: u64s 16 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags=sync,immutable,append,nodump,noatime,i_size_dirty,i_sectors_dirty,unlinked(163000ff) journal_seq=4 hash_seed=ffffffffffff07ee hash_type=siphash bi_size=0 bi_sectors=0 bi_version=0 bi_atime=200535484 bi_ctime=2780562352 bi_mtime=2780562352 bi_otime=200535484 bi_uid=0 bi_gid=0 bi_nlink=2 bi_generation=0 bi_dev=0 bi_data_checksum=0 bi_compression=0 bi_project=0 bi_background_compression=0 bi_data_replicas=0 bi_promote_target=0 bi_foreground_target=0 bi_background_target=0 bi_erasure_code=0 bi_fields_set=0 bi_dir=0 bi_dir_offset=0 bi_subvol=1 bi_parent_subvol=0 bi_nocow=0 bi_depth=0 bi_inodes_32bit=0 bi_casefold=0 flagged as unlinked but bi_nlink != 0, deleting ------------[ cut here ]------------ kernel BUG at fs/bcachefs/bkey.c:389! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5322 Comm: read_btree_node Not tainted 6.15.0-syzkaller-10769-g7d4e49a77d99 #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:set_inc_field_lossy fs/bcachefs/bkey.c:389 [inline] RIP: 0010:bch2_bkey_pack_pos_lossy+0x13de/0x24e0 fs/bcachefs/bkey.c:518 Code: e8 f7 20 09 fe 48 ba 00 00 00 00 00 fc ff df e9 a5 f8 ff ff e8 63 96 a5 fd 90 0f 0b e8 5b 96 a5 fd 90 0f 0b e8 53 96 a5 fd 90 <0f> 0b e8 4b 96 a5 fd 90 0f 0b e8 43 96 a5 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000d38eb40 EFLAGS: 00010293 RAX: ffffffff841aa48d RBX: 0100000000000000 RCX: ffff888000300000 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0100000000000000 RBP: ffffc9000d38ed78 R08: ffffffffffffffff R09: ffffffffffffffff R10: ffffffffffffffff R11: ffffffffffffffff R12: ffff88801a0660c4 R13: ff000000ffffffff R14: 0000000000000000 R15: fffffffffffffffe FS: 0000000000000000(0000) GS:ffff88808d25f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005571c2fd3168 CR3: 0000000051917000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bkey_pack_pos fs/bcachefs/bkey.h:382 [inline] __build_ro_aux_tree+0xb21/0x1800 fs/bcachefs/bset.c:743 bch2_bset_build_aux_tree+0x3f5/0x570 fs/bcachefs/bset.c:787 bch2_btree_node_read_done+0x39e4/0x4f60 fs/bcachefs/btree_io.c:1322 btree_node_read_work+0x426/0xe30 fs/bcachefs/btree_io.c:1400 bch2_btree_node_read+0x887/0x29f0 fs/bcachefs/btree_io.c:-1 bch2_btree_node_fill+0xd12/0x14f0 fs/bcachefs/btree_cache.c:994 bch2_btree_node_get_noiter+0xa2c/0x1000 fs/bcachefs/btree_cache.c:1261 found_btree_node_is_readable fs/bcachefs/btree_node_scan.c:85 [inline] try_read_btree_node fs/bcachefs/btree_node_scan.c:220 [inline] read_btree_nodes_worker+0x1319/0x1e20 fs/bcachefs/btree_node_scan.c:269 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:set_inc_field_lossy fs/bcachefs/bkey.c:389 [inline] RIP: 0010:bch2_bkey_pack_pos_lossy+0x13de/0x24e0 fs/bcachefs/bkey.c:518 Code: e8 f7 20 09 fe 48 ba 00 00 00 00 00 fc ff df e9 a5 f8 ff ff e8 63 96 a5 fd 90 0f 0b e8 5b 96 a5 fd 90 0f 0b e8 53 96 a5 fd 90 <0f> 0b e8 4b 96 a5 fd 90 0f 0b e8 43 96 a5 fd 90 0f 0b f3 0f 1e fa RSP: 0018:ffffc9000d38eb40 EFLAGS: 00010293 RAX: ffffffff841aa48d RBX: 0100000000000000 RCX: ffff888000300000 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0100000000000000 RBP: ffffc9000d38ed78 R08: ffffffffffffffff R09: ffffffffffffffff R10: ffffffffffffffff R11: ffffffffffffffff R12: ffff88801a0660c4 R13: ff000000ffffffff R14: 0000000000000000 R15: fffffffffffffffe FS: 0000000000000000(0000) GS:ffff88808d25f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005571c2fd3168 CR3: 0000000011752000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400