Loading fs/bcachefs/btree_gc.c +3 −3 Original line number Diff line number Diff line Loading @@ -540,9 +540,9 @@ int bch2_check_topology(struct bch_fs *c) if (!bch2_btree_has_scanned_nodes(c, i)) { mustfix_fsck_err(c, btree_root_unreadable_and_scan_found_nothing, "no nodes found for btree %s, continue?", bch2_btree_id_str(i)); bch2_btree_root_alloc_fake(c, i, 0); bch2_btree_root_alloc_fake_trans(trans, i, 0); } else { bch2_btree_root_alloc_fake(c, i, 1); bch2_btree_root_alloc_fake_trans(trans, i, 1); bch2_shoot_down_journal_keys(c, i, 1, BTREE_MAX_DEPTH, POS_MIN, SPOS_MAX); ret = bch2_get_scanned_nodes(c, i, 0, POS_MIN, SPOS_MAX); if (ret) Loading Loading @@ -570,7 +570,7 @@ int bch2_check_topology(struct bch_fs *c) goto reconstruct_root; bch_err(c, "empty btree root %s", bch2_btree_id_str(i)); bch2_btree_root_alloc_fake(c, i, 0); bch2_btree_root_alloc_fake_trans(trans, i, 0); r->alive = false; ret = 0; } Loading fs/bcachefs/btree_update_interior.c +2 −2 Original line number Diff line number Diff line Loading @@ -2513,7 +2513,7 @@ void bch2_btree_set_root_for_read(struct bch_fs *c, struct btree *b) bch2_btree_set_root_inmem(c, b); } static int __bch2_btree_root_alloc_fake(struct btree_trans *trans, enum btree_id id, unsigned level) int bch2_btree_root_alloc_fake_trans(struct btree_trans *trans, enum btree_id id, unsigned level) { struct bch_fs *c = trans->c; struct closure cl; Loading Loading @@ -2561,7 +2561,7 @@ static int __bch2_btree_root_alloc_fake(struct btree_trans *trans, enum btree_id void bch2_btree_root_alloc_fake(struct bch_fs *c, enum btree_id id, unsigned level) { bch2_trans_run(c, __bch2_btree_root_alloc_fake(trans, id, level)); bch2_trans_run(c, bch2_btree_root_alloc_fake_trans(trans, id, level)); } static void bch2_btree_update_to_text(struct printbuf *out, struct btree_update *as) Loading fs/bcachefs/btree_update_interior.h +2 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,8 @@ int bch2_btree_node_update_key_get_iter(struct btree_trans *, struct btree *, struct bkey_i *, unsigned, bool); void bch2_btree_set_root_for_read(struct bch_fs *, struct btree *); int bch2_btree_root_alloc_fake_trans(struct btree_trans *, enum btree_id, unsigned); void bch2_btree_root_alloc_fake(struct bch_fs *, enum btree_id, unsigned); static inline unsigned btree_update_reserve_required(struct bch_fs *c, Loading Loading
fs/bcachefs/btree_gc.c +3 −3 Original line number Diff line number Diff line Loading @@ -540,9 +540,9 @@ int bch2_check_topology(struct bch_fs *c) if (!bch2_btree_has_scanned_nodes(c, i)) { mustfix_fsck_err(c, btree_root_unreadable_and_scan_found_nothing, "no nodes found for btree %s, continue?", bch2_btree_id_str(i)); bch2_btree_root_alloc_fake(c, i, 0); bch2_btree_root_alloc_fake_trans(trans, i, 0); } else { bch2_btree_root_alloc_fake(c, i, 1); bch2_btree_root_alloc_fake_trans(trans, i, 1); bch2_shoot_down_journal_keys(c, i, 1, BTREE_MAX_DEPTH, POS_MIN, SPOS_MAX); ret = bch2_get_scanned_nodes(c, i, 0, POS_MIN, SPOS_MAX); if (ret) Loading Loading @@ -570,7 +570,7 @@ int bch2_check_topology(struct bch_fs *c) goto reconstruct_root; bch_err(c, "empty btree root %s", bch2_btree_id_str(i)); bch2_btree_root_alloc_fake(c, i, 0); bch2_btree_root_alloc_fake_trans(trans, i, 0); r->alive = false; ret = 0; } Loading
fs/bcachefs/btree_update_interior.c +2 −2 Original line number Diff line number Diff line Loading @@ -2513,7 +2513,7 @@ void bch2_btree_set_root_for_read(struct bch_fs *c, struct btree *b) bch2_btree_set_root_inmem(c, b); } static int __bch2_btree_root_alloc_fake(struct btree_trans *trans, enum btree_id id, unsigned level) int bch2_btree_root_alloc_fake_trans(struct btree_trans *trans, enum btree_id id, unsigned level) { struct bch_fs *c = trans->c; struct closure cl; Loading Loading @@ -2561,7 +2561,7 @@ static int __bch2_btree_root_alloc_fake(struct btree_trans *trans, enum btree_id void bch2_btree_root_alloc_fake(struct bch_fs *c, enum btree_id id, unsigned level) { bch2_trans_run(c, __bch2_btree_root_alloc_fake(trans, id, level)); bch2_trans_run(c, bch2_btree_root_alloc_fake_trans(trans, id, level)); } static void bch2_btree_update_to_text(struct printbuf *out, struct btree_update *as) Loading
fs/bcachefs/btree_update_interior.h +2 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,8 @@ int bch2_btree_node_update_key_get_iter(struct btree_trans *, struct btree *, struct bkey_i *, unsigned, bool); void bch2_btree_set_root_for_read(struct bch_fs *, struct btree *); int bch2_btree_root_alloc_fake_trans(struct btree_trans *, enum btree_id, unsigned); void bch2_btree_root_alloc_fake(struct bch_fs *, enum btree_id, unsigned); static inline unsigned btree_update_reserve_required(struct bch_fs *c, Loading