diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-02-14 18:38:52 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:16 -0400 |
commit | 768ac63924775d9fe2e76fbb254704d5ee3bcb85 (patch) | |
tree | ef815d5e731c2a1062ebb27bc1da414098c245a4 /fs/bcachefs/replicas.c | |
parent | 8fe826f90aad4ea314d0acdf7425a9bf2324e17f (diff) | |
download | lwn-768ac63924775d9fe2e76fbb254704d5ee3bcb85.tar.gz lwn-768ac63924775d9fe2e76fbb254704d5ee3bcb85.zip |
bcachefs: Add a mechanism for blocking the journal
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index 6fee8fe37688..03bb6b51d15f 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -245,14 +245,14 @@ static void __replicas_table_update(struct bch_fs_usage __percpu *dst_p, *dst = *src; for (src_idx = 0; src_idx < src_r->nr; src_idx++) { - if (!src->data[src_idx]) + if (!src->replicas[src_idx]) continue; dst_idx = __replicas_entry_idx(dst_r, cpu_replicas_entry(src_r, src_idx)); BUG_ON(dst_idx < 0); - dst->data[dst_idx] = src->data[src_idx]; + dst->replicas[dst_idx] = src->replicas[src_idx]; } } @@ -457,7 +457,7 @@ int bch2_replicas_gc_end(struct bch_fs *c, int ret) if (__replicas_has_entry(&c->replicas_gc, e)) continue; - v = percpu_u64_get(&c->usage[0]->data[i]); + v = percpu_u64_get(&c->usage[0]->replicas[i]); if (!v) continue; @@ -558,7 +558,7 @@ int bch2_replicas_set_usage(struct bch_fs *c, BUG_ON(ret < 0); } - percpu_u64_set(&c->usage[0]->data[idx], sectors); + percpu_u64_set(&c->usage[0]->replicas[idx], sectors); return 0; } |