summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bcachefs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-02 01:42:37 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 01:00:13 +0200
commitf5095b9f85a1674a92d00e7ab466499a8ba49ce1 (patch)
tree1234e2887dcf2294b767416157500296cbd8ac3f /fs/bcachefs/bcachefs.h
parentbcachefs: Coalesce accounting keys before journal replay (diff)
downloadlinux-f5095b9f85a1674a92d00e7ab466499a8ba49ce1.tar.xz
linux-f5095b9f85a1674a92d00e7ab466499a8ba49ce1.zip
bcachefs: dev_usage updated by new accounting
Reading disk accounting now requires an eytzinger lookup (see: bch2_accounting_mem_read()), but the per-device counters are used frequently enough that we'd like to still be able to read them with just a percpu sum, as in the old code. This patch special cases the device counters; when we update in-memory accounting we also update the old style percpu counters if it's a deice counter update. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r--fs/bcachefs/bcachefs.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index 03e4f15f34f5..8ffb683c368a 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -545,8 +545,7 @@ struct bch_dev {
unsigned long *buckets_nouse;
struct rw_semaphore bucket_lock;
- struct bch_dev_usage *usage_base;
- struct bch_dev_usage __percpu *usage[JOURNAL_BUF_NR];
+ struct bch_dev_usage __percpu *usage;
struct bch_dev_usage __percpu *usage_gc;
/* Allocator: */