summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_gc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-04-06 00:11:01 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-05-08 17:29:18 -0400
commit68e142405cf4cf01461012ec72d675038c514b92 (patch)
treeb2d7f9e013e9122976b2c0e225a995b1a2151394 /fs/bcachefs/btree_gc.c
parent665e8b32393523f0fb4752ccd4831ae6a10b1145 (diff)
bcachefs: bch2_gc() is now private to btree_gc.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-rw-r--r--fs/bcachefs/btree_gc.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index 791470b0c654..606e1120ab7c 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -1756,7 +1756,7 @@ static void bch2_gc_stripes_reset(struct bch_fs *c, bool metadata_only)
* move around - if references move backwards in the ordering GC
* uses, GC could skip past them
*/
-int bch2_gc(struct bch_fs *c, bool initial, bool metadata_only)
+static int bch2_gc(struct bch_fs *c, bool initial, bool metadata_only)
{
unsigned iter = 0;
int ret;
@@ -1843,6 +1843,11 @@ out:
return ret;
}
+int bch2_check_allocations(struct bch_fs *c)
+{
+ return bch2_gc(c, true, false);
+}
+
static int gc_btree_gens_key(struct btree_trans *trans,
struct btree_iter *iter,
struct bkey_s_c k)
@@ -2024,14 +2029,7 @@ static int bch2_gc_thread(void *arg)
last = atomic64_read(&clock->now);
last_kick = atomic_read(&c->kick_gc);
- /*
- * Full gc is currently incompatible with btree key cache:
- */
-#if 0
- ret = bch2_gc(c, false, false);
-#else
bch2_gc_gens(c);
-#endif
debug_check_no_locks_held();
}