summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_gc.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-01 22:10:01 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:12 +0300
commit26609b619fa2301eb7eb5855a7005d99f8a07a73 (patch)
tree40c8e4ec363aad8ede4ffa4e12f7dffb31841a39 /fs/bcachefs/btree_gc.h
parent01a0108f0139a2f6dbace54dd5d592d2d76415c1 (diff)
downloadlinux-26609b619fa2301eb7eb5855a7005d99f8a07a73.tar.xz
bcachefs: Make bkey types globally unique
this lets us get rid of a lot of extra switch statements - in a lot of places we dispatch on the btree node type, and then the key type, so this is a nice cleanup across a lot of code. Also improve the on disk format versioning stuff. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.h')
-rw-r--r--fs/bcachefs/btree_gc.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/bcachefs/btree_gc.h b/fs/bcachefs/btree_gc.h
index bb77564b9463..89ee72ac49f6 100644
--- a/fs/bcachefs/btree_gc.h
+++ b/fs/bcachefs/btree_gc.h
@@ -4,8 +4,6 @@
#include "btree_types.h"
-enum bkey_type;
-
void bch2_coalesce(struct bch_fs *);
int bch2_gc(struct bch_fs *, struct list_head *, bool);
void bch2_gc_thread_stop(struct bch_fs *);
@@ -58,9 +56,9 @@ static inline int gc_pos_cmp(struct gc_pos l, struct gc_pos r)
static inline enum gc_phase btree_id_to_gc_phase(enum btree_id id)
{
switch (id) {
-#define DEF_BTREE_ID(n, v, s) case BTREE_ID_##n: return GC_PHASE_BTREE_##n;
- DEFINE_BCH_BTREE_IDS()
-#undef DEF_BTREE_ID
+#define x(n, v, s) case BTREE_ID_##n: return GC_PHASE_BTREE_##n;
+ BCH_BTREE_IDS()
+#undef x
default:
BUG();
}