aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-09-26 17:21:21 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:10:15 -0400
commit7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c (patch)
tree463144cf0f0b272835ecab91a73463f65b259193 /fs/bcachefs/recovery.c
parentbcachefs: Fall back to requesting passphrase directly (diff)
downloadlinux-7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c.tar.gz
linux-7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c.tar.bz2
linux-7dcf62c06d11195e8caecd7b2236aa5b07e3ef8c.zip
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.c9
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;
}
}