bucket 0:125 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:126 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:126 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:127 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:127 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing done bcachefs (loop2): going read-write bcachefs (loop2): journal_replay... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_write_buffer.c:147! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 0 UID: 0 PID: 3348 Comm: syz.2.15 Not tainted 6.12.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 RIP: 0010:wb_flush_one fs/bcachefs/btree_write_buffer.c:147 [inline] RIP: 0010:bch2_btree_write_buffer_flush_locked+0x109e/0x11b0 fs/bcachefs/btree_write_buffer.c:375 Code: ff e8 06 5a fd ff 4c 89 ef 44 89 fe e8 8b 59 fd ff 48 8b 3c 24 44 89 fe e8 7f 59 fd ff 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f RSP: 0018:ffffc9000365b5f8 EFLAGS: 00010206 RAX: 000000000000000b RBX: 0000000000000000 RCX: 010000000000000b RDX: 0000000000000080 RSI: 0000000000000000 RDI: ffffc90004000000 RBP: 0000000000000000 R08: 0000000000002154 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88810d300000 R13: ffff88810374c000 R14: ffffc900040004b8 R15: ffffc900040004b0 FS: 00007fa90f3676c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd96a48868 CR3: 0000000108bb4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btree_write_buffer_flush_seq+0x5c8/0x650 fs/bcachefs/btree_write_buffer.c:510 bch2_btree_write_buffer_journal_flush+0x35/0x60 fs/bcachefs/btree_write_buffer.c:525 journal_flush_pins+0x21b/0x370 fs/bcachefs/journal_reclaim.c:565 journal_flush_done+0x4a/0xe0 fs/bcachefs/journal_reclaim.c:819 bch2_journal_flush_pins+0x14e/0x170 fs/bcachefs/journal_reclaim.c:852 bch2_journal_flush_all_pins fs/bcachefs/journal_reclaim.h:76 [inline] bch2_journal_replay+0xa35/0xbc0 fs/bcachefs/recovery.c:383 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:185 [inline] bch2_run_recovery_passes+0x14f/0x240 fs/bcachefs/recovery_passes.c:232 bch2_fs_recovery+0x8a5/0x11e0 fs/bcachefs/recovery.c:861 bch2_fs_start+0x1b9/0x270 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0x2b5/0x640 fs/bcachefs/fs.c:2080 vfs_get_tree+0x27/0xf0 fs/super.c:1800 do_new_mount+0x15a/0x3a0 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x148/0x1b0 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xe0/0x220 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa90e57feba Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fa90f366e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fa90f366ef0 RCX: 00007fa90e57feba RDX: 0000000020000340 RSI: 0000000020000000 RDI: 00007fa90f366eb0 RBP: 0000000020000340 R08: 00007fa90f366ef0 R09: 0000000000800000 R10: 0000000000800000 R11: 0000000000000246 R12: 0000000020000000 R13: 00007fa90f366eb0 R14: 000000000000592d R15: 00000000200002c0 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:wb_flush_one fs/bcachefs/btree_write_buffer.c:147 [inline] RIP: 0010:bch2_btree_write_buffer_flush_locked+0x109e/0x11b0 fs/bcachefs/btree_write_buffer.c:375 Code: ff e8 06 5a fd ff 4c 89 ef 44 89 fe e8 8b 59 fd ff 48 8b 3c 24 44 89 fe e8 7f 59 fd ff 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 <0f> 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f 0b 90 0f RSP: 0018:ffffc9000365b5f8 EFLAGS: 00010206 RAX: 000000000000000b RBX: 0000000000000000 RCX: 010000000000000b RDX: 0000000000000080 RSI: 0000000000000000 RDI: ffffc90004000000 RBP: 0000000000000000 R08: 0000000000002154 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88810d300000 R13: ffff88810374c000 R14: ffffc900040004b8 R15: ffffc900040004b0 FS: 00007fa90f3676c0(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd96a48868 CR3: 0000000108bb4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400