summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-12-21 17:40:35 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-05-22 00:44:18 -0400
commita72dcd47d1e220ddb67369d3cef0d9dbd4fc0dd4 (patch)
tree486e96aa6c596bb0f14c27abe9ea6b67be9c7e40
parentd702a0fbf13db24afbb31869bb762ad859ec3175 (diff)
bcachefs: better ifdef
-rw-r--r--fs/bcachefs/bkey.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/bcachefs/bkey.h b/fs/bcachefs/bkey.h
index 896979565c5b..42ce39c9f747 100644
--- a/fs/bcachefs/bkey.h
+++ b/fs/bcachefs/bkey.h
@@ -7,6 +7,10 @@
#include "util.h"
#include "vstructs.h"
+#ifdef CONFIG_X86_64
+#define HAVE_BCACHEFS_COMPILED_UNPACK 1
+#endif
+
void bch2_to_binary(char *, const u64 *, unsigned);
#define BKEY_PADDED(key) __BKEY_PADDED(key, BKEY_EXTENT_VAL_U64s_MAX)
@@ -381,8 +385,7 @@ static inline u64 bkey_field_max(const struct bkey_format *f,
: U64_MAX;
}
-#ifdef CONFIG_X86_64
-#define HAVE_BCACHEFS_COMPILED_UNPACK 1
+#ifdef HAVE_BCACHEFS_COMPILED_UNPACK
int bch2_compile_bkey_format(const struct bkey_format *, void *);