summaryrefslogtreecommitdiff
path: root/fs/bcachefs/opts.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-28 20:17:06 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:33 -0400
commit1c3ff72c0fa94651a226d3351d9df89d5eafd2d7 (patch)
treeb1aad6c4a0debf71af1479be7fc2a0a574b42db1 /fs/bcachefs/opts.h
parent27b3e52388e1e6b2babb71ec17efa029139e1511 (diff)
bcachefs: Convert some enums to x-macros
Helps for preventing things from getting out of sync. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r--fs/bcachefs/opts.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h
index 92a9b7e0f47f..59c7b3685745 100644
--- a/fs/bcachefs/opts.h
+++ b/fs/bcachefs/opts.h
@@ -9,8 +9,9 @@
#include "bcachefs_format.h"
extern const char * const bch2_error_actions[];
-extern const char * const bch2_csum_types[];
-extern const char * const bch2_compression_types[];
+extern const char * const bch2_sb_features[];
+extern const char * const bch2_csum_opts[];
+extern const char * const bch2_compression_opts[];
extern const char * const bch2_str_hash_types[];
extern const char * const bch2_data_types[];
extern const char * const bch2_cache_replacement_policies[];
@@ -112,23 +113,23 @@ enum opt_type {
"#", NULL) \
x(metadata_checksum, u8, \
OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \
- OPT_STR(bch2_csum_types), \
+ OPT_STR(bch2_csum_opts), \
BCH_SB_META_CSUM_TYPE, BCH_CSUM_OPT_CRC32C, \
NULL, NULL) \
x(data_checksum, u8, \
OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME|OPT_INODE, \
- OPT_STR(bch2_csum_types), \
+ OPT_STR(bch2_csum_opts), \
BCH_SB_DATA_CSUM_TYPE, BCH_CSUM_OPT_CRC32C, \
NULL, NULL) \
x(compression, u8, \
OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME|OPT_INODE, \
- OPT_STR(bch2_compression_types), \
- BCH_SB_COMPRESSION_TYPE, BCH_COMPRESSION_OPT_NONE, \
+ OPT_STR(bch2_compression_opts), \
+ BCH_SB_COMPRESSION_TYPE, BCH_COMPRESSION_OPT_none, \
NULL, NULL) \
x(background_compression, u8, \
OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME|OPT_INODE, \
- OPT_STR(bch2_compression_types), \
- BCH_SB_BACKGROUND_COMPRESSION_TYPE,BCH_COMPRESSION_OPT_NONE, \
+ OPT_STR(bch2_compression_opts), \
+ BCH_SB_BACKGROUND_COMPRESSION_TYPE,BCH_COMPRESSION_OPT_none, \
NULL, NULL) \
x(str_hash, u8, \
OPT_FORMAT|OPT_MOUNT|OPT_RUNTIME, \