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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/super-io.h b/fs/bcachefs/super-io.h
index ab0ad3248e8f..a5a80c481242 100644
--- a/fs/bcachefs/super-io.h
+++ b/fs/bcachefs/super-io.h
@@ -9,6 +9,14 @@
#include <asm/byteorder.h>
+static inline bool bch2_version_compatible(u16 version)
+{
+ return BCH_VERSION_MAJOR(version) <= BCH_VERSION_MAJOR(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);
struct bch_sb_field *bch2_sb_field_resize(struct bch_sb_handle *,
enum bch_sb_field_type, unsigned);