diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-01-10 21:38:09 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:50 +0300 |
commit | 53ef2c5cc991a9c5aecc7b85754695df5cc5de45 (patch) | |
tree | 0e25693e3c19b67e057af0da31994e876ef3cd92 /fs/bcachefs/replicas.c | |
parent | 4291a3317f3724283023f35802c47083a05b938d (diff) | |
download | linux-53ef2c5cc991a9c5aecc7b85754695df5cc5de45.tar.xz |
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>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index 57c2e66edad1..a0840e1c9f88 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -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); } |