bcachefs: Fix check_version_upgrade()
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 12 Aug 2023 02:22:31 +0000 (22:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:10 +0000 (17:10 -0400)
We were failing to upgrade to the latest compatible version - whoops.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c

index bd4a99c0d21f49187416a2088a39bf3a411e0ef7..33a68a335be6ab5ad2e3548284fe91fbc260b7ec 100644 (file)
@@ -507,7 +507,7 @@ static struct recovery_pass_fn recovery_pass_fns[] = {
 
 static void check_version_upgrade(struct bch_fs *c)
 {
-       unsigned latest_compatible = bch2_version_compatible(c->sb.version);
+       unsigned latest_compatible = bch2_latest_compatible_version(c->sb.version);
        unsigned latest_version = bcachefs_metadata_version_current;
        unsigned old_version = c->sb.version_upgrade_complete ?: c->sb.version;
        unsigned new_version = 0;