]> www.infradead.org Git - users/willy/xarray.git/commit
bcachefs: btree write buffer knows how to accumulate bch_accounting keys
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 17 Nov 2023 05:23:07 +0000 (00:23 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:13 +0000 (19:00 -0400)
commit5d9667d1d6eaca3f6cd3c63cd6a0f309147c7f5c
treeb63f68c017123efa8348294aa3bf53b95b5f9c94
parent9dec2a473bd1ba6a111382928e3ceaddfbb720ba
bcachefs: btree write buffer knows how to accumulate bch_accounting keys

Teach the btree write buffer how to accumulate accounting keys - instead
of having the newer key overwrite the older key as we do with other
updates, we need to add them together.

Also, add a flag so that write buffer flush knows when journal replay is
finished flushing accounting, and teach it to hold accounting keys until
that flag is set.

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