diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-26 17:21:21 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:15 -0400 |
commit | 7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c (patch) | |
tree | 463144cf0f0b272835ecab91a73463f65b259193 /fs/bcachefs/recovery.c | |
parent | 1ee608c65d652af30cf69eaca425d8a5c06712d7 (diff) |
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: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 1dceb7eeb205..9dbaf080dcdd 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.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); if (ret) { - __fsck_err(c, - btree_id_is_alloc(i) - ? FSCK_CAN_IGNORE : 0, - "error reading btree root %s", - bch2_btree_ids[i]); + fsck_err(c, + "error reading btree root %s", + bch2_btree_ids[i]); if (btree_id_is_alloc(i)) c->sb.compat &= ~(1ULL << BCH_COMPAT_alloc_info); + ret = 0; } } |