]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: Coalesce accounting keys before journal replay
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 4 Jun 2024 22:31:13 +0000 (18:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:13 +0000 (19:00 -0400)
commit2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8
tree512cfb292e77735c8525a58249164e8f065896c2
parent1d16c605cc55ef26f0c65b362665a6c99080ccbc
bcachefs: Coalesce accounting keys before journal replay

This fixes a performance regression in journal replay; without
colaescing accounting keys we have multiple keys at the same position,
which means journal_keys_peek_upto() has to skip past many overwritten
keys - turning journal replay into an O(n^2) algorithm.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_journal_iter.h
fs/bcachefs/disk_accounting.c