summaryrefslogtreecommitdiff
path: root/libbcachefs/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/error.c')
-rw-r--r--libbcachefs/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbcachefs/error.c b/libbcachefs/error.c
index 3e49d72d..c2882c59 100644
--- a/libbcachefs/error.c
+++ b/libbcachefs/error.c
@@ -27,8 +27,11 @@ bool bch2_inconsistent_error(struct bch_fs *c)
void bch2_topology_error(struct bch_fs *c)
{
+ if (!test_bit(BCH_FS_TOPOLOGY_REPAIR_DONE, &c->flags))
+ return;
+
set_bit(BCH_FS_TOPOLOGY_ERROR, &c->flags);
- if (test_bit(BCH_FS_INITIAL_GC_DONE, &c->flags))
+ if (test_bit(BCH_FS_FSCK_DONE, &c->flags))
bch2_inconsistent_error(c);
}