summaryrefslogtreecommitdiff
path: root/libbcachefs/replicas.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-07 20:01:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-05-08 03:43:26 -0400
commitc08971632cf3133545259ec5fa008201ca169582 (patch)
tree185ce5f2cc14c54dd3a28ef90403ae6ffda6687c /libbcachefs/replicas.c
parent6b1f79d5df9f2735192ed1a40c711cf131d4f43e (diff)
Update bcachefs sources to e990c131de fixup! bcachefs: BTREE_ID_snapshot_tree
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/replicas.c')
-rw-r--r--libbcachefs/replicas.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbcachefs/replicas.c b/libbcachefs/replicas.c
index 8935ff58..8ae50dfd 100644
--- a/libbcachefs/replicas.c
+++ b/libbcachefs/replicas.c
@@ -550,8 +550,14 @@ int bch2_replicas_gc_start(struct bch_fs *c, unsigned typemask)
return 0;
}
-/* New much simpler mechanism for clearing out unneeded replicas entries: */
-
+/*
+ * New much simpler mechanism for clearing out unneeded replicas entries - drop
+ * replicas entries that have 0 sectors used.
+ *
+ * However, we don't track sector counts for journal usage, so this doesn't drop
+ * any BCH_DATA_journal entries; the old bch2_replicas_gc_(start|end) mechanism
+ * is retained for that.
+ */
int bch2_replicas_gc2(struct bch_fs *c)
{
struct bch_replicas_cpu new = { 0 };