bcachefs (loop0): dropping and reconstructing all alloc info bcachefs (loop0): error validating btree node on loop0 at btree inodes level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 node offset 0/24 bset u64s 0: incorrect max key 18446462598732840960:14872293344460931071:U32_MAX bcachefs (loop0): flagging btree inodes lost data error reading btree root inodes l=0: btree_node_read_error, fixing bcachefs (loop0): will run btree node scan invalid bkey u64s 7 type xattr 536870912:3798421620223919902:U32_MAX len 0 ver 0: user.: xattr name has invalid characters: delete?, fixing bcachefs (loop0): error validating btree node on loop0 at btree snapshots level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0 node offset 0/16 bset u64s 0: unknown checksum type 9, fixing bcachefs (loop0): error validating btree node on loop0 at btree snapshots level 0/0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0 node offset 8/16: btree node data missing: expected 16 sectors, found 8, fixing bcachefs (loop0): btree_node_read_work: rewriting btree node at btree=snapshots level=0 SPOS_MAX due to error bcachefs (loop0): scan_for_btree_nodes... bch2_scan_for_btree_nodes: nodes found after overwrites: extents l=0 seq=1 journal_seq=5 cookie=c6c25c03258c59c5 POS_MIN-SPOS_MAX ptr: 0:27:0 gen 0 inodes l=0 seq=1 journal_seq=5 cookie=7589ab5e0c11cc7a POS_MIN-18446462598732840960:14872293344460931071:U32_MAX ptr: 0:38:0 gen 0 dirents l=0 seq=1 journal_seq=3458764513820540929 cookie=9aa2895aefce4bdf POS_MIN-SPOS_MAX ptr: 0:41:0 gen 0 xattrs l=0 seq=1 journal_seq=4 cookie=2285c34bed0abe32 POS_MIN-SPOS_MAX ptr: 0:31:0 gen 0 subvolumes l=0 seq=1 journal_seq=1 cookie=c0bef60d07ceb940 POS_MIN-SPOS_MAX ptr: 0:35:0 gen 0 snapshots l=0 seq=1 journal_seq=0 cookie=ebb8d5a9e3463bdb POS_MIN-SPOS_MAX ptr: 0:32:0 gen 0 lru l=0 seq=1 journal_seq=5 cookie=28f61e078e70b95c POS_MIN-SPOS_MAX ptr: 0:28:0 gen 0 deleted_inodes l=0 seq=1 journal_seq=0 cookie=1db8f60c84bb244c POS_MIN-SPOS_MAX ptr: 0:42:0 gen 0 done bcachefs (loop0): check_topology... bcachefs (loop0): btree root inodes unreadable, must recover from scan bcachefs (loop0): bch2_get_scanned_nodes(): recovering inodes l=0 POS_MIN - SPOS_MAX bcachefs (loop0): bch2_get_scanned_nodes(): recovering u64s 11 type btree_ptr_v2 18446462598732840960:14872293344460931071:U32_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 btree node with incorrect max_keyat btree inodes level 1: parent: u64s 5 type btree_ptr SPOS_MAX len 0 ver 0 child: u64s 11 type btree_ptr_v2 18446462598732840960:14872293344460931071:U32_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing bcachefs (loop0): bch2_get_scanned_nodes(): recovering inodes l=0 18446462598732840960:14872293344460931072:0 - SPOS_MAX btree node with incorrect max_keyat btree inodes level 1: parent: u64s 5 type btree_ptr SPOS_MAX len 0 ver 0 child: u64s 11 type btree_ptr_v2 18446462598732840960:14872293344460931071:U32_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing bcachefs (loop0): set_node_max(): u64s 11 type btree_ptr_v2 18446462598732840960:14872293344460931071:U32_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 -> SPOS_MAX done bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... done bcachefs (loop0): going read-write bcachefs (loop0): done starting filesystem bcachefs (loop0): dirent to missing inode: u64s 7 type dirent 4096:189491840996961599:U32_MAX len 0 ver 0: file0 -> 4098 type dir ------------[ cut here ]------------ kernel BUG at fs/bcachefs/fs.c:59! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5313 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0 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_inode_update_after_write+0xbd6/0xbe0 fs/bcachefs/fs.c:59 Code: e1 07 80 c1 03 38 c1 0f 8c ea fb ff ff 48 89 f7 48 89 74 24 10 e8 2a d4 cd fd 48 8b 74 24 10 e9 d3 fb ff ff e8 7b ec 62 fd 90 <0f> 0b e8 23 c7 93 07 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d3ff8c0 EFLAGS: 00010287 RAX: ffffffff843c85a5 RBX: 0000000000001003 RCX: 0000000000100000 RDX: ffffc9000e44a000 RSI: 000000000000631c RDI: 000000000000631d RBP: ffffc9000d3ffa10 R08: ffffffff843c7aee R09: 0000000000001000 R10: 0000000000000d0c R11: 00000000ffffffff R12: ffff888052d08000 R13: ffff888045190000 R14: ffff888045191680 R15: 0000000000001002 FS: 00007fad3a9ea6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fad2d83f000 CR3: 0000000043f66000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __bch2_unlink+0x469/0x530 fs/bcachefs/fs.c:763 bch2_unlink+0xac/0xf0 fs/bcachefs/fs.c:786 vfs_unlink+0x365/0x650 fs/namei.c:4523 do_unlinkat+0x4ae/0x830 fs/namei.c:4587 __do_sys_unlink fs/namei.c:4635 [inline] __se_sys_unlink fs/namei.c:4633 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4633 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fad39b7ff19 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:00007fad3a9ea058 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007fad39d45fa0 RCX: 00007fad39b7ff19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040 RBP: 00007fad39bf3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fad39d45fa0 R15: 00007fffb9b7a3b8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_inode_update_after_write+0xbd6/0xbe0 fs/bcachefs/fs.c:59 Code: e1 07 80 c1 03 38 c1 0f 8c ea fb ff ff 48 89 f7 48 89 74 24 10 e8 2a d4 cd fd 48 8b 74 24 10 e9 d3 fb ff ff e8 7b ec 62 fd 90 <0f> 0b e8 23 c7 93 07 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d3ff8c0 EFLAGS: 00010287 RAX: ffffffff843c85a5 RBX: 0000000000001003 RCX: 0000000000100000 RDX: ffffc9000e44a000 RSI: 000000000000631c RDI: 000000000000631d RBP: ffffc9000d3ffa10 R08: ffffffff843c7aee R09: 0000000000001000 R10: 0000000000000d0c R11: 00000000ffffffff R12: ffff888052d08000 R13: ffff888045190000 R14: ffff888045191680 R15: 0000000000001002 FS: 00007fad3a9ea6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fad3a9c8fe0 CR3: 0000000043f66000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400