]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/btree_io.c
Update bcachefs sources to 1e3ca87f7b bcachefs: bcachefs_metadata_version_major_minor
[bcachefs-tools-debian] / libbcachefs / btree_io.c
index 1face387dc25512b32103334048aabf776f16171..fa1229eb15ec757be3df85ebc7828aec6eccbfe9 100644 (file)
@@ -703,7 +703,9 @@ static int validate_bset(struct bch_fs *c, struct bch_dev *ca,
 
        btree_err_on(!bch2_version_compatible(version),
                     BTREE_ERR_INCOMPATIBLE, c, ca, b, i,
-                    "unsupported bset version %u", version);
+                    "unsupported bset version %u.%u",
+                    BCH_VERSION_MAJOR(version),
+                    BCH_VERSION_MINOR(version));
 
        if (btree_err_on(version < c->sb.version_min,
                         BTREE_ERR_FIXABLE, c, NULL, b, i,
@@ -715,7 +717,8 @@ static int validate_bset(struct bch_fs *c, struct bch_dev *ca,
                mutex_unlock(&c->sb_lock);
        }
 
-       if (btree_err_on(version > c->sb.version,
+       if (btree_err_on(BCH_VERSION_MAJOR(version) >
+                        BCH_VERSION_MAJOR(c->sb.version),
                         BTREE_ERR_FIXABLE, c, NULL, b, i,
                         "bset version %u newer than superblock version %u",
                         version, c->sb.version)) {