summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-28 09:34:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:19 -0400
commit0bc166ff564f9e2b0bfc7a0c1a92472a600f901d (patch)
tree97f1f8e59b45eae01dc412ca55ff432b2a0feb48 /fs/bcachefs/recovery.c
parenta6d90385e6915429a891408824b8c72219a139f2 (diff)
downloadlwn-0bc166ff564f9e2b0bfc7a0c1a92472a600f901d.tar.gz
lwn-0bc166ff564f9e2b0bfc7a0c1a92472a600f901d.zip
bcachefs: Track whether filesystem has errors in superblock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 93c4d5887e8b..68415df8565b 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -365,8 +365,11 @@ int bch2_fs_recovery(struct bch_fs *c)
c->disk_sb.sb->version = le16_to_cpu(bcachefs_metadata_version_current);
}
- if (!test_bit(BCH_FS_FSCK_UNFIXED_ERRORS, &c->flags))
+ if (c->opts.fsck &&
+ !test_bit(BCH_FS_ERROR, &c->flags)) {
c->disk_sb.sb->features[0] |= 1ULL << BCH_FEATURE_ATOMIC_NLINK;
+ SET_BCH_SB_HAS_ERRORS(c->disk_sb.sb, 0);
+ }
mutex_unlock(&c->sb_lock);
if (enabled_qtypes(c)) {