Commit 9ba68f6c authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Switch to macro for bkey_ops

Older versions of gcc refuse to compile it the other way
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 5934a0ca
...@@ -75,10 +75,10 @@ static void key_type_inline_data_to_text(struct printbuf *out, struct bch_fs *c, ...@@ -75,10 +75,10 @@ static void key_type_inline_data_to_text(struct printbuf *out, struct bch_fs *c,
pr_buf(out, "(%zu bytes)", bkey_val_bytes(k.k)); pr_buf(out, "(%zu bytes)", bkey_val_bytes(k.k));
} }
static const struct bkey_ops bch2_bkey_ops_inline_data = { #define bch2_bkey_ops_inline_data (struct bkey_ops) { \
.key_invalid = key_type_inline_data_invalid, .key_invalid = key_type_inline_data_invalid, \
.val_to_text = key_type_inline_data_to_text, .val_to_text = key_type_inline_data_to_text, \
}; }
static const struct bkey_ops bch2_bkey_ops[] = { static const struct bkey_ops bch2_bkey_ops[] = {
#define x(name, nr) [KEY_TYPE_##name] = bch2_bkey_ops_##name, #define x(name, nr) [KEY_TYPE_##name] = bch2_bkey_ops_##name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment