loop0: detected capacity change from 0 to 32768 bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-45ca-8265-f50d00000000) bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,gc_reserve_bytes=10.0 MiB,nojournal_transaction_names bcachefs (loop0): initializing new filesystem bcachefs (loop0): going read-write bcachefs (loop0): marking superblocks bcachefs (loop0): initializing freespace bcachefs (loop0): done initializing freespace bcachefs (loop0): bch2_initialize_subvolumes(): error ENOSPC_disk_reservation bcachefs (loop0): bch2_fs_initialize(): error ENOSPC_disk_reservation bcachefs (loop0): bch2_fs_start(): error starting filesystem ENOSPC_disk_reservation bcachefs (loop0): shutting down bcachefs (loop0): going read-only bcachefs (loop0): finished waiting for writes to stop bcachefs (loop0): flushing journal and stopping allocators, journal seq 1 bcachefs (loop0): flushing journal and stopping allocators complete, journal seq 3 bcachefs (loop0): shutdown complete, journal seq 4 bcachefs (loop0): done going read-only, filesystem not clean bcachefs (loop0): shutdown complete bcachefs: bch2_fs_get_tree() error: ENOSPC_disk_reservation loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names bcachefs (loop0): recovering from clean shutdown, journal seq 18446744073709551614 bcachefs (loop0): Version upgrade required: Version upgrade from 0.128: (unknown version) to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.128: (unknown version) to 1.13: inode_has_child_snapshots running recovery passes: check_allocations,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... 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 bucket 0:35 gen 0 has wrong data_type: got btree, should be need_discard, fixing bucket 0:35 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... ------------[ cut here ]------------ kernel BUG at fs/bcachefs/journal_reclaim.h:30! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted 6.13.0-rc7-syzkaller-00160-gad26fc09dabf #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:journal_seq_pin fs/bcachefs/journal_reclaim.h:30 [inline] RIP: 0010:bch2_journal_pin_set_locked fs/bcachefs/journal_reclaim.c:389 [inline] RIP: 0010:bch2_journal_pin_set+0x766/0x780 fs/bcachefs/journal_reclaim.c:449 Code: c1 0f 8c fe f9 ff ff 48 89 df e8 d5 85 c0 fd e9 f1 f9 ff ff e8 ab 1a 5a fd 90 0f 0b e8 a3 1a 5a fd 90 0f 0b e8 9b 1a 5a fd 90 <0f> 0b e8 93 1a 5a fd 90 0f 0b e8 8b 1a 5a fd 90 0f 0b e8 83 1a 5a RSP: 0018:ffffc9000d416ea8 EFLAGS: 00010287 RAX: ffffffff844567d5 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000e70a000 RSI: 0000000000077e8d RDI: 0000000000077e8e RBP: 0000000000000000 R08: ffffffff84456522 R09: fffff52001a82dc4 R10: dffffc0000000000 R11: fffff52001a82dc4 R12: ffff888054b22a00 R13: ffff88805414a500 R14: ffff888054b22a00 R15: ffffffffffffffff FS: 00007f74967f56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f748f1ff000 CR3: 0000000052654000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_journal_pin_add fs/bcachefs/journal_reclaim.h:48 [inline] bch2_btree_insert_key_cached+0x724/0x7f0 fs/bcachefs/btree_key_cache.c:560 bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:822 [inline] do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:900 [inline] __bch2_trans_commit+0x7193/0x93c0 fs/bcachefs/btree_trans_commit.c:1121 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline] bch2_journal_replay+0x1a3a/0x2a40 fs/bcachefs/recovery.c:317 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:191 bch2_run_recovery_passes+0x3a7/0x880 fs/bcachefs/recovery_passes.c:244 bch2_fs_recovery+0x25cc/0x39d0 fs/bcachefs/recovery.c:861 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2170 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3511 do_mount fs/namespace.c:3851 [inline] __do_sys_mount fs/namespace.c:4061 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4038 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:0x7f749a3874ca 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:00007f74967f4e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f74967f4ef0 RCX: 00007f749a3874ca RDX: 00000000200058c0 RSI: 0000000020000040 RDI: 00007f74967f4eb0 RBP: 00000000200058c0 R08: 00007f74967f4ef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000040 R13: 00007f74967f4eb0 R14: 00000000000058dd R15: 0000000020000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:journal_seq_pin fs/bcachefs/journal_reclaim.h:30 [inline] RIP: 0010:bch2_journal_pin_set_locked fs/bcachefs/journal_reclaim.c:389 [inline] RIP: 0010:bch2_journal_pin_set+0x766/0x780 fs/bcachefs/journal_reclaim.c:449 Code: c1 0f 8c fe f9 ff ff 48 89 df e8 d5 85 c0 fd e9 f1 f9 ff ff e8 ab 1a 5a fd 90 0f 0b e8 a3 1a 5a fd 90 0f 0b e8 9b 1a 5a fd 90 <0f> 0b e8 93 1a 5a fd 90 0f 0b e8 8b 1a 5a fd 90 0f 0b e8 83 1a 5a RSP: 0018:ffffc9000d416ea8 EFLAGS: 00010287 RAX: ffffffff844567d5 RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc9000e70a000 RSI: 0000000000077e8d RDI: 0000000000077e8e RBP: 0000000000000000 R08: ffffffff84456522 R09: fffff52001a82dc4 R10: dffffc0000000000 R11: fffff52001a82dc4 R12: ffff888054b22a00 R13: ffff88805414a500 R14: ffff888054b22a00 R15: ffffffffffffffff FS: 00007f74967f56c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f748f1ff000 CR3: 0000000052654000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400