bi_foreground_target=0 bi_background_target=0 bi_erasure_code=0 bi_fields_set=0 bi_dir=4098 bi_dir_offset=2566586984702133180 bi_subvol=0 bi_parent_subvol=0 bi_nocow=0 bi_depth=0 bi_inodes_32bit=0 bi_casefold=0, fixing done bcachefs (loop0): check_dirents... bcachefs (loop0): dirent points to missing inode: u64s 7 type dirent 4096:5682031293254759865:U32_MAX len 0 ver 0: file0 -> 4098 type dir, fixing bcachefs (loop0): key in missing inode: u64s 7 type dirent 4098:2566587684781802428:U32_MAX len 0 ver 0: file0 -> 4099 type reg, fixing bcachefs (loop0): key in missing inode: u64s 7 type dirent 4098:4600437421902197670:U32_MAX len 0 ver 0: file1 -> 4100 type lnk, fixing 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_lrus... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... bcachefs (loop0): scanning for missing backpointers in 1/128 buckets done bcachefs (loop0): reconstruct_snapshots... done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_dirents... bcachefs (loop0): directory 4096:4294967295 with wrong i_nlink: got 2, should be 1, fixing bcachefs (loop0): key in missing inode: u64s 7 type dirent 4098:2566587684781802428:U32_MAX len 0 ver 0: file0 -> 4099 type reg, fixing bcachefs (loop0): key in missing inode: u64s 7 type dirent 4098:4600437421902197670:U32_MAX len 0 ver 0: file1 -> 4100 type lnk, fixing done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): Second fsck run was not clean bcachefs (loop0): reading quotas bcachefs (loop0): quotas done bcachefs (loop0): done starting filesystem syz.0.0 uses obsolete (PF_INET,SOCK_PACKET) ------------[ cut here ]------------ kernel BUG at fs/bcachefs/quota.c:232! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted 6.15.0-rc5-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_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: dd 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 57 fa dd fd e9 0c fb ff ff e8 4d 06 7c fd 90 <0f> 0b e8 45 06 7c fd 90 0f 0b e8 3d 06 7c fd 90 0f 0b e8 35 06 7c RSP: 0018:ffffc9000d517238 EFLAGS: 00010283 RAX: ffffffff8443ca03 RBX: ffffc9000d517360 RCX: 0000000000100000 RDX: ffffc9000e2d2000 RSI: 000000000001856d RDI: 000000000001856e RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffffffffe8 R10: dffffc0000000000 R11: fffffbfff1efdb2f R12: ffffffffffffffe8 R13: ffffffffffffffe8 R14: 0000000000000000 R15: ffff888000919400 FS: 00007f489d7af6c0(0000) GS:ffff88808d6cb000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000003000 CR3: 000000003fed1000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_quota_acct+0x3ed/0x750 fs/bcachefs/quota.c:299 __bch2_i_sectors_acct+0x2b9/0x4d0 fs/bcachefs/fs-io.c:178 bch2_i_sectors_acct fs/bcachefs/fs-io.h:138 [inline] bchfs_truncate+0x7ff/0xcc0 fs/bcachefs/fs-io.c:510 notify_change+0xb33/0xe40 fs/attr.c:552 do_truncate+0x19a/0x220 fs/open.c:65 handle_truncate fs/namei.c:3501 [inline] do_open fs/namei.c:3884 [inline] path_openat+0x306c/0x3830 fs/namei.c:4039 do_filp_open+0x1fa/0x410 fs/namei.c:4066 do_sys_openat2+0x121/0x1c0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_open fs/open.c:1452 [inline] __se_sys_open fs/open.c:1448 [inline] __x64_sys_open+0x11e/0x150 fs/open.c:1448 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f489c98e969 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:00007f489d7af038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f489cbb5fa0 RCX: 00007f489c98e969 RDX: 0000000000000085 RSI: 000000000000ea40 RDI: 0000200000000000 RBP: 00007f489ca10ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f489cbb5fa0 R15: 00007ffff9c50d98 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: dd 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 57 fa dd fd e9 0c fb ff ff e8 4d 06 7c fd 90 <0f> 0b e8 45 06 7c fd 90 0f 0b e8 3d 06 7c fd 90 0f 0b e8 35 06 7c RSP: 0018:ffffc9000d517238 EFLAGS: 00010283 RAX: ffffffff8443ca03 RBX: ffffc9000d517360 RCX: 0000000000100000 RDX: ffffc9000e2d2000 RSI: 000000000001856d RDI: 000000000001856e RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffffffffe8 R10: dffffc0000000000 R11: fffffbfff1efdb2f R12: ffffffffffffffe8 R13: ffffffffffffffe8 R14: 0000000000000000 R15: ffff888000919400 FS: 00007f489d7af6c0(0000) GS:ffff88808d6cb000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f489d78dfc8 CR3: 000000003fed1000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400