diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-29 23:08:58 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-06 05:24:19 +0100 |
commit | eff1f728bedc014c783752af5d2a88c46586f654 (patch) | |
tree | 6eb6850f01f40dc4f673f6d7fd678ecfbef7d8b3 /fs | |
parent | bcachefs: factor out thread_with_file, thread_with_stdio (diff) | |
download | linux-eff1f728bedc014c783752af5d2a88c46586f654.tar.xz linux-eff1f728bedc014c783752af5d2a88c46586f654.zip |
bcachefs: Upgrading uses bch_sb.recovery_passes_required
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/recovery.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index d2914e911461..066aef6f3c74 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -575,7 +575,7 @@ u64 bch2_recovery_passes_from_stable(u64 v) return ret; } -static bool check_version_upgrade(struct bch_fs *c) +static u64 check_version_upgrade(struct bch_fs *c) { unsigned latest_compatible = bch2_latest_compatible_version(c->sb.version); unsigned latest_version = bcachefs_metadata_version_current; @@ -626,14 +626,12 @@ static bool check_version_upgrade(struct bch_fs *c) u64 recovery_passes = bch2_upgrade_recovery_passes(c, old_version, new_version); if (recovery_passes) { - if ((recovery_passes & RECOVERY_PASS_ALL_FSCK) == RECOVERY_PASS_ALL_FSCK) - prt_str(&buf, "fsck required"); - else { - prt_str(&buf, "running recovery passes: "); - prt_bitflags(&buf, bch2_recovery_passes, recovery_passes); - } + prt_str(&buf, " running recovery passes: "); + prt_bitflags(&buf, bch2_recovery_passes, recovery_passes); - c->recovery_passes_explicit |= recovery_passes; + struct bch_sb_field_ext *ext = bch2_sb_field_get(c->disk_sb.sb, ext); + ext->recovery_passes_required[0] |= + cpu_to_le64(bch2_recovery_passes_to_stable(recovery_passes)); c->opts.fix_errors = FSCK_FIX_yes; } |