diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-21 06:34:11 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:28 +0300 |
commit | 74b33393db54dd321c807c621fad966eb9ec54e5 (patch) | |
tree | 598e0c8ae9467a2b7629670e09db36b66979ae1c /fs/bcachefs/opts.c | |
parent | 3a306f3c2c303febffefea4caf09b2326107507a (diff) | |
download | linux-74b33393db54dd321c807c621fad966eb9ec54e5.tar.xz |
bcachefs: x-macro metadata version enum
Now we've got strings for metadata versions - this changes
bch2_sb_to_text() and our mount log message to use it.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r-- | fs/bcachefs/opts.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index e78d3b75f6fb..ce5cb7edcbd3 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -9,7 +9,12 @@ #include "super-io.h" #include "util.h" -#define x(t, n) #t, +#define x(t, n) [n] = #t, + +const char * const bch2_metadata_versions[] = { + BCH_METADATA_VERSIONS() + NULL +}; const char * const bch2_error_actions[] = { BCH_ERROR_ACTIONS() |