no nodes found for btree snapshots, continuing done bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... bcachefs (loop0): running explicit recovery pass reconstruct_snapshots (21), currently at snapshots_read (7) done bcachefs (loop0): check_allocations... btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap 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, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bucket 0:32 gen 0 has wrong data_type: got btree, should be need_discard, fixing 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_lrus... done bcachefs (loop0): check_backpointers_to_extents... backpointer doesn't match extent it points to: u64s 9 type backpointer 0:8912896:0 len 0 ver 0: bucket=0:34:0 btree=extents level=0 suboffset=0 len=8 gen=0 pos=4099:8:U32_MAX u64s 5 type deleted 4099:8:U32_MAX len 0 ver 0, fixing backpointer doesn't match extent it points to: u64s 9 type backpointer 0:8921088:0 len 0 ver 0: bucket=0:34:8 btree=extents level=0 suboffset=0 len=8 gen=0 pos=536870913:24:U32_MAX u64s 7 type extent 536870913:24:U32_MAX len 24 ver 0: durability: 1 crc: c_size 8 size 24 offset 0 nonce 0 csum none 0:0 compress lz4 ptr: 0:34:8 gen 0 u64s 9 type backpointer 0:8921088:0 len 0 ver 0: bucket=0:34:8 btree=extents level=0 suboffset=0 len=8 gen=0 pos=536870913:24:U32_MAX, fixing done bcachefs (loop0): reconstruct_snapshots... snapshot node 4294905343 from tree 4294905343 missing, recreating snapshot node 4294967295 from tree 4294967295 missing, recreating done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... 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): reconstruct_snapshots... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): reading quotas bcachefs (loop0): quotas done bcachefs (loop0): done starting filesystem ------------[ cut here ]------------ kernel BUG at fs/bcachefs/quota.c:319! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5320 Comm: syz.0.0 Not tainted 6.14.0-rc4-syzkaller #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_quota_transfer fs/bcachefs/quota.c:319 [inline] RIP: 0010:bch2_quota_transfer+0xad0/0xae0 fs/bcachefs/quota.c:367 Code: 48 c7 c7 b0 81 17 8f 4c 89 e6 e8 bb 93 b3 00 e9 c1 fd ff ff e8 c1 6f 47 fd 90 0f 0b e8 b9 6f 47 fd 90 0f 0b e8 b1 6f 47 fd 90 <0f> 0b e8 a9 6f 47 fd 90 0f 0b e8 c1 fe 8d 07 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d1f7640 EFLAGS: 00010287 RAX: ffffffff847a4e4f RBX: ffff8880529ba590 RCX: 0000000000100000 RDX: ffffc9000e872000 RSI: 0000000000000a1d RDI: 0000000000000a1e RBP: ffffc9000d1f77e8 R08: ffffffff847a4b18 R09: 0000000000000001 R10: dffffc0000000000 R11: fffffbfff2079d8f R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff11008779d85 R15: ffff888043bcec28 FS: 00007f368fdf56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffdb38b4de8 CR3: 0000000040f98000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_fs_quota_transfer+0x282/0x4d0 fs/bcachefs/fs.c:160 bch2_setattr_nonsize+0x3c1/0x12a0 fs/bcachefs/fs.c:1080 notify_change+0xbca/0xe90 fs/attr.c:552 chown_common+0x501/0x850 fs/open.c:782 do_fchownat+0x16a/0x240 fs/open.c:813 __do_sys_fchownat fs/open.c:828 [inline] __se_sys_fchownat fs/open.c:825 [inline] __x64_sys_fchownat+0xb5/0xd0 fs/open.c:825 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:0x7f369398d169 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:00007f368fdf5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000104 RAX: ffffffffffffffda RBX: 00007f3693ba5fa0 RCX: 00007f369398d169 RDX: 00000000000041ed RSI: 0000400000000000 RDI: ffffffffffffff9c RBP: 00007f3693a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3693ba5fa0 R15: 00007ffe65967298 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__bch2_quota_transfer fs/bcachefs/quota.c:319 [inline] RIP: 0010:bch2_quota_transfer+0xad0/0xae0 fs/bcachefs/quota.c:367 Code: 48 c7 c7 b0 81 17 8f 4c 89 e6 e8 bb 93 b3 00 e9 c1 fd ff ff e8 c1 6f 47 fd 90 0f 0b e8 b9 6f 47 fd 90 0f 0b e8 b1 6f 47 fd 90 <0f> 0b e8 a9 6f 47 fd 90 0f 0b e8 c1 fe 8d 07 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d1f7640 EFLAGS: 00010287 RAX: ffffffff847a4e4f RBX: ffff8880529ba590 RCX: 0000000000100000 RDX: ffffc9000e872000 RSI: 0000000000000a1d RDI: 0000000000000a1e RBP: ffffc9000d1f77e8 R08: ffffffff847a4b18 R09: 0000000000000001 R10: dffffc0000000000 R11: fffffbfff2079d8f R12: 0000000000000000 R13: 0000000000000000 R14: 1ffff11008779d85 R15: ffff888043bcec28 FS: 00007f368fdf56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffdb38b4de8 CR3: 0000000040f98000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400