diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-15 21:03:26 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:07 -0400 |
commit | 813e0cecd1473d7328376f9ca56f9239bc5b8146 (patch) | |
tree | dbacf6ae0f08a223bbcc1c7d83b1b3827bde8095 /fs/bcachefs/super-io.c | |
parent | 6132c84cacbff39e7b060abffc4175244347885d (diff) | |
download | linux-813e0cecd1473d7328376f9ca56f9239bc5b8146.tar.gz linux-813e0cecd1473d7328376f9ca56f9239bc5b8146.tar.bz2 linux-813e0cecd1473d7328376f9ca56f9239bc5b8146.zip |
bcachefs: Upgrade path fixes
Some minor fixes to not print errors that are actually due to a verson
upgrade.
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index deef31a617c4..cea7c7caa1c0 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -422,6 +422,9 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb, struct printbuf *out, SET_BCH_SB_JOURNAL_FLUSH_DELAY(sb, 1000); if (!BCH_SB_JOURNAL_RECLAIM_DELAY(sb)) SET_BCH_SB_JOURNAL_RECLAIM_DELAY(sb, 1000); + + if (!BCH_SB_VERSION_UPGRADE_COMPLETE(sb)) + SET_BCH_SB_VERSION_UPGRADE_COMPLETE(sb, le16_to_cpu(sb->version)); } for (opt_id = 0; opt_id < bch2_opts_nr; opt_id++) { @@ -496,7 +499,7 @@ static void bch2_sb_update(struct bch_fs *c) c->sb.user_uuid = src->user_uuid; c->sb.version = le16_to_cpu(src->version); c->sb.version_min = le16_to_cpu(src->version_min); - c->sb.version_upgrade_complete = BCH_SB_VERSION_UPGRADE_COMPLETE(src) ?: c->sb.version; + c->sb.version_upgrade_complete = BCH_SB_VERSION_UPGRADE_COMPLETE(src); c->sb.nr_devices = src->nr_devices; c->sb.clean = BCH_SB_CLEAN(src); c->sb.encryption_type = BCH_SB_ENCRYPTION_TYPE(src); |