summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-10 16:48:22 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:41 -0500
commit24de63dacbffbfa069b44a1da1750eb5382275e7 (patch)
treee907442a4e66b636d3f956dd795de70fb51e4da7 /fs/bcachefs/btree_types.h
parente4e49375a8e4d9c9b65e79070ef6cff2433a7d5f (diff)
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>
Diffstat (limited to 'fs/bcachefs/btree_types.h')
-rw-r--r--fs/bcachefs/btree_types.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
index 78de9569ff14..40e5a004e5c1 100644
--- a/fs/bcachefs/btree_types.h
+++ b/fs/bcachefs/btree_types.h
@@ -410,7 +410,9 @@ struct btree_trans {
* extent:
*/
unsigned extra_journal_res;
- unsigned nr_max_paths;
+ u8 nr_max_paths;
+ u16 journal_entries_u64s;
+ u16 journal_entries_size;
unsigned long paths_allocated[BITS_TO_LONGS(BTREE_ITER_MAX)];
@@ -426,7 +428,7 @@ struct btree_trans {
/* update path: */
struct btree_trans_commit_hook *hooks;
- darray_u64 extra_journal_entries;
+ struct jset_entry *journal_entries;
struct journal_entry_pin *journal_pin;
struct journal_res journal_res;