summaryrefslogtreecommitdiff
path: root/libbcachefs/bkey_methods.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-12-12 06:21:55 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-12-12 06:25:37 -0500
commita10a41fa2b1a917b0f3b34d20175867f968b2d12 (patch)
treeb61aa3e0912c2a6928356aeb5273fb528b4f21ba /libbcachefs/bkey_methods.c
parent0c7db4eca3e6519043c10288cb41f8a0ee634a0b (diff)
Update bcachefs sources to f7670cba39 bcachefs: Fix for building in userspace
Diffstat (limited to 'libbcachefs/bkey_methods.c')
-rw-r--r--libbcachefs/bkey_methods.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libbcachefs/bkey_methods.c b/libbcachefs/bkey_methods.c
index 6b04bef7..48c86e52 100644
--- a/libbcachefs/bkey_methods.c
+++ b/libbcachefs/bkey_methods.c
@@ -24,13 +24,13 @@ static const char *deleted_key_invalid(const struct bch_fs *c,
return NULL;
}
-const struct bkey_ops bch2_bkey_ops_deleted = {
- .key_invalid = deleted_key_invalid,
-};
+#define bch2_bkey_ops_deleted (struct bkey_ops) { \
+ .key_invalid = deleted_key_invalid, \
+}
-const struct bkey_ops bch2_bkey_ops_discard = {
- .key_invalid = deleted_key_invalid,
-};
+#define bch2_bkey_ops_discard (struct bkey_ops) { \
+ .key_invalid = deleted_key_invalid, \
+}
static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c k)
{
@@ -40,9 +40,9 @@ static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c
return NULL;
}
-const struct bkey_ops bch2_bkey_ops_error = {
- .key_invalid = empty_val_key_invalid,
-};
+#define bch2_bkey_ops_error (struct bkey_ops) { \
+ .key_invalid = empty_val_key_invalid, \
+}
static const char *key_type_cookie_invalid(const struct bch_fs *c,
struct bkey_s_c k)
@@ -53,13 +53,13 @@ static const char *key_type_cookie_invalid(const struct bch_fs *c,
return NULL;
}
-const struct bkey_ops bch2_bkey_ops_cookie = {
- .key_invalid = key_type_cookie_invalid,
-};
+#define bch2_bkey_ops_cookie (struct bkey_ops) { \
+ .key_invalid = key_type_cookie_invalid, \
+}
-const struct bkey_ops bch2_bkey_ops_whiteout = {
- .key_invalid = empty_val_key_invalid,
-};
+#define bch2_bkey_ops_whiteout (struct bkey_ops) { \
+ .key_invalid = empty_val_key_invalid, \
+}
static const struct bkey_ops bch2_bkey_ops[] = {
#define x(name, nr) [KEY_TYPE_##name] = bch2_bkey_ops_##name,