bcachefs: Improve trans->extra_journal_entries
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Dec 2023 21:48:22 +0000 (16:48 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:41 +0000 (11:47 -0500)
commit24de63dacbffbfa069b44a1da1750eb5382275e7
treee907442a4e66b636d3f956dd795de70fb51e4da7
parente4e49375a8e4d9c9b65e79070ef6cff2433a7d5f
bcachefs: Improve trans->extra_journal_entries

Instead of using a darray, we now allocate journal entries for the
transaction commit path with our normal bump allocator - with an inlined
fastpath, and using btree_transaction_stats to remember how much to
initially allocate so as to avoid transaction restarts.

This is prep work for converting write buffer updates to use this
mechanism.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_trans_commit.c
fs/bcachefs/btree_types.h
fs/bcachefs/btree_update.c
fs/bcachefs/btree_update.h
fs/bcachefs/btree_update_interior.c