Commit 7dcf62c0 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Make btree root read errors recoverable

The entire btree will be lost, but that is better than the entire
filesystem not being recoverable.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 1ee608c6
...@@ -374,13 +374,12 @@ static int read_btree_roots(struct bch_fs *c) ...@@ -374,13 +374,12 @@ static int read_btree_roots(struct bch_fs *c)
ret = bch2_btree_root_read(c, i, &r->key, r->level); ret = bch2_btree_root_read(c, i, &r->key, r->level);
if (ret) { if (ret) {
__fsck_err(c, fsck_err(c,
btree_id_is_alloc(i) "error reading btree root %s",
? FSCK_CAN_IGNORE : 0, bch2_btree_ids[i]);
"error reading btree root %s",
bch2_btree_ids[i]);
if (btree_id_is_alloc(i)) if (btree_id_is_alloc(i))
c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info); c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info);
ret = 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment