mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00: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:
parent
4291a3317f
commit
53ef2c5cc9
@ -607,7 +607,11 @@ retry:
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user