Commit f9ccc308 authored by Tim Schlueter's avatar Tim Schlueter Committed by Kent Overstreet

bcachefs: Fix bkey_method compilation on gcc 7.3.0

Signed-off-by: default avatarTim Schlueter <schlueter.tim@linux.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 06b7345c
...@@ -25,13 +25,13 @@ static const char *deleted_key_invalid(const struct bch_fs *c, ...@@ -25,13 +25,13 @@ static const char *deleted_key_invalid(const struct bch_fs *c,
return NULL; return NULL;
} }
const struct bkey_ops bch2_bkey_ops_deleted = { #define bch2_bkey_ops_deleted (struct bkey_ops) { \
.key_invalid = deleted_key_invalid, .key_invalid = deleted_key_invalid, \
}; }
const struct bkey_ops bch2_bkey_ops_discard = { #define bch2_bkey_ops_discard (struct bkey_ops) { \
.key_invalid = deleted_key_invalid, .key_invalid = deleted_key_invalid, \
}; }
static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c k) static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c k)
{ {
...@@ -41,9 +41,9 @@ static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c ...@@ -41,9 +41,9 @@ static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c
return NULL; return NULL;
} }
const struct bkey_ops bch2_bkey_ops_error = { #define bch2_bkey_ops_error (struct bkey_ops) { \
.key_invalid = empty_val_key_invalid, .key_invalid = empty_val_key_invalid, \
}; }
static const char *key_type_cookie_invalid(const struct bch_fs *c, static const char *key_type_cookie_invalid(const struct bch_fs *c,
struct bkey_s_c k) struct bkey_s_c k)
...@@ -54,13 +54,13 @@ static const char *key_type_cookie_invalid(const struct bch_fs *c, ...@@ -54,13 +54,13 @@ static const char *key_type_cookie_invalid(const struct bch_fs *c,
return NULL; return NULL;
} }
const struct bkey_ops bch2_bkey_ops_cookie = { #define bch2_bkey_ops_cookie (struct bkey_ops) { \
.key_invalid = key_type_cookie_invalid, .key_invalid = key_type_cookie_invalid, \
}; }
const struct bkey_ops bch2_bkey_ops_whiteout = { #define bch2_bkey_ops_whiteout (struct bkey_ops) { \
.key_invalid = empty_val_key_invalid, .key_invalid = empty_val_key_invalid, \
}; }
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