summaryrefslogtreecommitdiff
path: root/fs/bcachefs/super-io.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/super-io.h')
-rw-r--r--fs/bcachefs/super-io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/super-io.h b/fs/bcachefs/super-io.h
index 4a193add3447..cda71ec845a5 100644
--- a/fs/bcachefs/super-io.h
+++ b/fs/bcachefs/super-io.h
@@ -9,6 +9,12 @@
#include <asm/byteorder.h>
+static inline bool bch2_version_compatible(u16 version)
+{
+ return version <= bcachefs_metadata_version_current &&
+ version >= bcachefs_metadata_version_min;
+}
+
void bch2_version_to_text(struct printbuf *, unsigned);
struct bch_sb_field *bch2_sb_field_get(struct bch_sb *, enum bch_sb_field_type);