summaryrefslogtreecommitdiff
path: root/libbcachefs/btree_gc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/btree_gc.h')
-rw-r--r--libbcachefs/btree_gc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libbcachefs/btree_gc.h b/libbcachefs/btree_gc.h
index 27dcc06c..4d1ab9db 100644
--- a/libbcachefs/btree_gc.h
+++ b/libbcachefs/btree_gc.h
@@ -13,7 +13,7 @@ int bch2_initial_gc(struct bch_fs *, struct list_head *);
u8 bch2_btree_key_recalc_oldest_gen(struct bch_fs *, struct bkey_s_c);
int bch2_btree_mark_key_initial(struct bch_fs *, enum bkey_type,
struct bkey_s_c);
-void bch2_mark_dev_metadata(struct bch_fs *, struct bch_dev *);
+void bch2_mark_dev_superblock(struct bch_fs *, struct bch_dev *, unsigned);
/*
* For concurrent mark and sweep (with other index updates), we define a total
@@ -88,6 +88,14 @@ static inline struct gc_pos gc_pos_btree_root(enum btree_id id)
};
}
+static inline struct gc_pos gc_pos_alloc(struct bch_fs *c, struct open_bucket *ob)
+{
+ return (struct gc_pos) {
+ .phase = GC_PHASE_ALLOC,
+ .pos = POS(ob ? ob - c->open_buckets : 0, 0),
+ };
+}
+
static inline bool gc_will_visit(struct bch_fs *c, struct gc_pos pos)
{
unsigned seq;