summaryrefslogtreecommitdiff
path: root/libbcachefs/btree_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/btree_io.c')
-rw-r--r--libbcachefs/btree_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbcachefs/btree_io.c b/libbcachefs/btree_io.c
index fa1229eb..71fe6921 100644
--- a/libbcachefs/btree_io.c
+++ b/libbcachefs/btree_io.c
@@ -612,7 +612,7 @@ static int __btree_err(enum btree_err_type type,
case BTREE_ERR_BAD_NODE:
bch2_print_string_as_lines(KERN_ERR, out.buf);
bch2_topology_error(c);
- ret = -BCH_ERR_need_topology_repair;
+ ret = bch2_run_explicit_recovery_pass(c, BCH_RECOVERY_PASS_check_topology);
break;
case BTREE_ERR_INCOMPATIBLE:
bch2_print_string_as_lines(KERN_ERR, out.buf);
@@ -1568,7 +1568,8 @@ void bch2_btree_node_read(struct bch_fs *c, struct btree *b,
btree_pos_to_text(&buf, c, b);
bch_err(c, "%s", buf.buf);
- if (test_bit(BCH_FS_TOPOLOGY_REPAIR_DONE, &c->flags))
+ if (c->recovery_passes_explicit & BIT_ULL(BCH_RECOVERY_PASS_check_topology) &&
+ c->curr_recovery_pass > BCH_RECOVERY_PASS_check_topology)
bch2_fatal_error(c);
set_btree_node_read_error(b);