diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-28 09:34:55 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:19 -0400 |
commit | 0bc166ff564f9e2b0bfc7a0c1a92472a600f901d (patch) | |
tree | 97f1f8e59b45eae01dc412ca55ff432b2a0feb48 /fs/bcachefs/super-io.c | |
parent | a6d90385e6915429a891408824b8c72219a139f2 (diff) |
bcachefs: Track whether filesystem has errors in superblock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.c')
-rw-r--r-- | fs/bcachefs/super-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index f504743fff4d..9fd77e57cafe 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -707,6 +707,9 @@ int bch2_write_super(struct bch_fs *c) le64_add_cpu(&c->disk_sb.sb->seq, 1); + if (test_bit(BCH_FS_ERROR, &c->flags)) + SET_BCH_SB_HAS_ERRORS(c->disk_sb.sb, 1); + for_each_online_member(ca, c, i) bch2_sb_from_fs(c, ca); @@ -719,8 +722,7 @@ int bch2_write_super(struct bch_fs *c) } } - if (c->opts.nochanges || - test_bit(BCH_FS_ERROR, &c->flags)) + if (c->opts.nochanges) goto out; for_each_online_member(ca, c, i) { |