summaryrefslogtreecommitdiff
path: root/libbcachefs/opts.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-28 20:20:17 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2019-12-28 20:31:39 -0500
commitf0d907189f1545333efe9b101fc4ce4c07421c8a (patch)
tree1aa658bcc2a7ffa9de96c430627d627deb0e0f82 /libbcachefs/opts.c
parentff2b85e039b2dc164477c1ac57844a6f456526aa (diff)
Update bcachefs sources to 86a99a7b7f bcachefs: Convert some enums to x-macros
Diffstat (limited to 'libbcachefs/opts.c')
-rw-r--r--libbcachefs/opts.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/libbcachefs/opts.c b/libbcachefs/opts.c
index cbacd2f3..94d6c044 100644
--- a/libbcachefs/opts.c
+++ b/libbcachefs/opts.c
@@ -16,18 +16,24 @@ const char * const bch2_error_actions[] = {
NULL
};
-const char * const bch2_csum_types[] = {
+const char * const bch2_sb_features[] = {
+#define x(f, n) #f,
+ BCH_SB_FEATURES()
+#undef x
+ NULL
+};
+
+const char * const bch2_csum_opts[] = {
"none",
"crc32c",
"crc64",
NULL
};
-const char * const bch2_compression_types[] = {
- "none",
- "lz4",
- "gzip",
- "zstd",
+const char * const bch2_compression_opts[] = {
+#define x(t, n) #t,
+ BCH_COMPRESSION_OPTS()
+#undef x
NULL
};
@@ -300,7 +306,7 @@ int bch2_opt_check_may_set(struct bch_fs *c, int id, u64 v)
break;
case Opt_erasure_code:
if (v)
- bch2_check_set_feature(c, BCH_FEATURE_EC);
+ bch2_check_set_feature(c, BCH_FEATURE_ec);
break;
}