- version = le16_to_cpu(sb->sb->version);
- version_min = version >= bcachefs_metadata_version_bkey_renumber
- ? le16_to_cpu(sb->sb->version_min)
- : version;
-
- if (version >= bcachefs_metadata_version_max) {
- prt_printf(err, "Unsupported superblock version %u (min %u, max %u)",
- version, bcachefs_metadata_version_min, bcachefs_metadata_version_max);
- return -BCH_ERR_invalid_sb_version;
- }
-
- if (version_min < bcachefs_metadata_version_min) {
- prt_printf(err, "Unsupported superblock version %u (min %u, max %u)",
- version_min, bcachefs_metadata_version_min, bcachefs_metadata_version_max);
- return -BCH_ERR_invalid_sb_version;
- }