diff options
Diffstat (limited to 'fs/bcachefs/btree_types.h')
-rw-r--r-- | fs/bcachefs/btree_types.h | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index 54156a05ebf5..c1baece14120 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -374,21 +374,22 @@ struct btree_trans_commit_hook { struct btree_trans { struct bch_fs *c; - const char *fn; - struct closure ref; - struct list_head list; - u64 last_begin_time; - u8 lock_may_not_fail; - u8 lock_must_abort; - struct btree_bkey_cached_common *locking; - struct six_lock_waiter locking_wait; + unsigned long *paths_allocated; + u8 *sorted; + struct btree_path *paths; - int srcu_idx; + void *mem; + unsigned mem_top; + unsigned mem_max; + unsigned mem_bytes; + btree_path_idx_t nr_sorted; + btree_path_idx_t nr_paths_max; u8 fn_idx; - u8 nr_sorted; u8 nr_updates; + u8 lock_must_abort; + bool lock_may_not_fail:1; bool srcu_held:1; bool used_mempool:1; bool in_traverse_all:1; @@ -400,40 +401,38 @@ struct btree_trans { bool write_locked:1; enum bch_errcode restarted:16; u32 restart_count; + + u64 last_begin_time; unsigned long last_begin_ip; unsigned long last_restarted_ip; unsigned long srcu_lock_time; - /* - * For when bch2_trans_update notices we'll be splitting a compressed - * extent: - */ - unsigned extra_journal_res; - btree_path_idx_t nr_max_paths; + const char *fn; + struct closure ref; + struct list_head list; + struct btree_bkey_cached_common *locking; + struct six_lock_waiter locking_wait; + int srcu_idx; + + /* update path: */ u16 journal_entries_u64s; u16 journal_entries_size; + struct jset_entry *journal_entries; - unsigned long paths_allocated[BITS_TO_LONGS(BTREE_ITER_MAX)]; - - unsigned mem_top; - unsigned mem_max; - unsigned mem_bytes; - void *mem; - - u8 sorted[BTREE_ITER_MAX + 8]; - struct btree_path paths[BTREE_ITER_MAX]; struct btree_insert_entry updates[BTREE_ITER_MAX]; - - /* update path: */ struct btree_trans_commit_hook *hooks; - struct jset_entry *journal_entries; struct journal_entry_pin *journal_pin; struct journal_res journal_res; u64 *journal_seq; struct disk_reservation *disk_res; unsigned journal_u64s; + unsigned extra_disk_res; /* XXX kill */ struct replicas_delta_list *fs_usage_deltas; + + unsigned long _paths_allocated[BITS_TO_LONGS(BTREE_ITER_MAX)]; + u8 _sorted[BTREE_ITER_MAX + 8]; + struct btree_path _paths[BTREE_ITER_MAX]; }; static inline struct btree_path *btree_iter_path(struct btree_trans *trans, struct btree_iter *iter) |