summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_gc.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-01-26 20:15:46 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:52 -0400
commit5b593ee172bd536a2c9fd717de7e4a16d682ef23 (patch)
tree2cc9e4d8acf85afef16a7336feebfb1c2161e72b /fs/bcachefs/btree_gc.h
parent51d2dfb82d0553c5764689d30adabbf6d0927be5 (diff)
bcachefs: Add support for doing btree updates prior to journal replay
Some errors may need to be fixed in order for GC to successfully run - walk and mark all metadata. But we can't start the allocators and do normal btree updates until after GC has completed, and allocation information is known to be consistent, so we need a different method of doing btree updates. Fortunately, we already have code for walking the btree while overlaying keys from the journal to be replayed. This patch adds an update path that adds keys to the list of keys to be replayed by journal replay, and also fixes up iterators. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.h')
-rw-r--r--fs/bcachefs/btree_gc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_gc.h b/fs/bcachefs/btree_gc.h
index f0435a58793b..fa604efc70cc 100644
--- a/fs/bcachefs/btree_gc.h
+++ b/fs/bcachefs/btree_gc.h
@@ -6,8 +6,7 @@
void bch2_coalesce(struct bch_fs *);
-struct journal_keys;
-int bch2_gc(struct bch_fs *, struct journal_keys *, bool);
+int bch2_gc(struct bch_fs *, bool);
int bch2_gc_gens(struct bch_fs *);
void bch2_gc_thread_stop(struct bch_fs *);
int bch2_gc_thread_start(struct bch_fs *);