]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: dev_usage updated by new accounting
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 2 Jan 2024 00:42:37 +0000 (19:42 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:13 +0000 (19:00 -0400)
commitf5095b9f85a1674a92d00e7ab466499a8ba49ce1
tree1234e2887dcf2294b767416157500296cbd8ac3f
parent2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8
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>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_gc.c
fs/bcachefs/buckets.c
fs/bcachefs/buckets_types.h
fs/bcachefs/disk_accounting.c
fs/bcachefs/disk_accounting.h
fs/bcachefs/recovery.c
fs/bcachefs/sb-clean.c