running recovery passes: check_allocations,check_extents_to_backpointers,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... bcachefs (loop0): bucket 0:32 gen 0 has wrong data_type: got btree, should be need_discard, fixing bcachefs (loop0): bucket 0:32 gen 0 data type need_discard has wrong dirty_sectors: got 256, should be 0, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 5/128 buckets done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... bcachefs (loop0): running recovery pass reconstruct_snapshots (21), currently at check_subvols (24) - rewinding bcachefs (loop0): bch2_check_subvols(): error restart_recovery bcachefs (loop0): reconstruct_snapshots... bcachefs (loop0): snapshot node 4294905343 from tree 4294905343 missing, recreating bcachefs (loop0): snapshot node 4294967295 from tree 4294967295 missing, recreating done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... bcachefs (loop0): subvolume 1 is not set as snapshot but is not master subvolume, fixing done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_dirents... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): check_extents_to_backpointers... done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_dirents... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): reading quotas bcachefs (loop0): quotas done bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 22 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 22 bcachefs (loop0): clean shutdown complete, journal seq 23 bcachefs (loop0): marking filesystem clean bcachefs (loop0): done starting filesystem bcachefs (loop0): going read-write ------------[ cut here ]------------ kernel BUG at fs/bcachefs/quota.c:232! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5343 Comm: syz.0.0 Not tainted 6.16.0-rc6-syzkaller-00002-g155a3c003e55 #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_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: d7 fd e9 19 fb ff ff 48 8b 0c 24 80 e1 07 38 c1 0f 8c 1a fb ff ff 48 8b 3c 24 e8 f7 8e d7 fd e9 0c fb ff ff e8 5d 0f 74 fd 90 <0f> 0b e8 55 0f 74 fd 90 0f 0b e8 4d 0f 74 fd 90 0f 0b e8 45 0f 74 RSP: 0018:ffffc9000d76fa98 EFLAGS: 00010287 RAX: ffffffff844c2413 RBX: ffffc9000d76fbc0 RCX: 0000000000100000 RDX: ffffc9000e382000 RSI: 0000000000005d7d RDI: 0000000000005d7e RBP: 0000000000000000 R08: 0000000000000000 R09: fffffffffffffff8 R10: dffffc0000000000 R11: fffffbfff1f43ebf R12: fffffffffffffff8 R13: fffffffffffffff8 R14: 0000000000000000 R15: ffff8880408f5c00 FS: 00007fbd2bb786c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff4cad91a0 CR3: 00000000437bf000 CR4: 0000000000352ef0 Call Trace: bch2_quota_acct+0x3ed/0x750 fs/bcachefs/quota.c:299 bch2_evict_inode+0x176/0x520 fs/bcachefs/fs.c:2178 evict+0x504/0x9c0 fs/inode.c:810 do_unlinkat+0x3a1/0x560 fs/namei.c:4666 __do_sys_unlinkat fs/namei.c:4700 [inline] __se_sys_unlinkat fs/namei.c:4693 [inline] __x64_sys_unlinkat+0xd3/0xf0 fs/namei.c:4693 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbd2ad8e929 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:00007fbd2bb78038 EFLAGS: 00000246 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 00007fbd2afb5fa0 RCX: 00007fbd2ad8e929 RDX: 0000000000000000 RSI: 00002000000005c0 RDI: 0000000000000006 RBP: 00007fbd2ae10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbd2afb5fa0 R15: 00007ffd78550378 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: d7 fd e9 19 fb ff ff 48 8b 0c 24 80 e1 07 38 c1 0f 8c 1a fb ff ff 48 8b 3c 24 e8 f7 8e d7 fd e9 0c fb ff ff e8 5d 0f 74 fd 90 <0f> 0b e8 55 0f 74 fd 90 0f 0b e8 4d 0f 74 fd 90 0f 0b e8 45 0f 74 RSP: 0018:ffffc9000d76fa98 EFLAGS: 00010287 RAX: ffffffff844c2413 RBX: ffffc9000d76fbc0 RCX: 0000000000100000 RDX: ffffc9000e382000 RSI: 0000000000005d7d RDI: 0000000000005d7e RBP: 0000000000000000 R08: 0000000000000000 R09: fffffffffffffff8 R10: dffffc0000000000 R11: fffffbfff1f43ebf R12: fffffffffffffff8 R13: fffffffffffffff8 R14: 0000000000000000 R15: ffff8880408f5c00 FS: 00007fbd2bb786c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbd2bb56fc8 CR3: 00000000437bf000 CR4: 0000000000352ef0