mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 07:34:03 -04:00
bcachefs: Fix bch2_replicas_gc2
This fixes a regression introduced by "bcachefs: Refactor filesystem usage accounting". We have to include all the replicas entries that have any of the entries for different journal entries nonzero, we can't skip them if they sum to zero. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
4291a3317f
commit
53ef2c5cc9
@@ -607,7 +607,11 @@ int bch2_replicas_gc2(struct bch_fs *c)
|
||||
cpu_replicas_entry(&c->replicas, i);
|
||||
|
||||
if (e->data_type == BCH_DATA_journal ||
|
||||
bch2_fs_usage_read_one(c, &c->usage_base->replicas[i]))
|
||||
c->usage_base->replicas[i] ||
|
||||
percpu_u64_get(&c->usage[0]->replicas[i]) ||
|
||||
percpu_u64_get(&c->usage[1]->replicas[i]) ||
|
||||
percpu_u64_get(&c->usage[2]->replicas[i]) ||
|
||||
percpu_u64_get(&c->usage[3]->replicas[i]))
|
||||
memcpy(cpu_replicas_entry(&new, new.nr++),
|
||||
e, new.entry_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user