Lines Matching full:trans
28 "pin journal entry referred to by trans->journal_res.seq") \
70 static inline int bch2_btree_delete_at_buffered(struct btree_trans *trans, in bch2_btree_delete_at_buffered() argument
73 return bch2_btree_bit_mod_buffered(trans, btree, pos, false); in bch2_btree_delete_at_buffered()
86 static inline int bch2_insert_snapshot_whiteouts(struct btree_trans *trans, in bch2_insert_snapshot_whiteouts() argument
95 return __bch2_insert_snapshot_whiteouts(trans, btree, old_pos, new_pos); in bch2_insert_snapshot_whiteouts()
110 static inline struct jset_entry *btree_trans_journal_entries_top(struct btree_trans *trans) in btree_trans_journal_entries_top() argument
112 return (void *) ((u64 *) trans->journal_entries + trans->journal_entries_u64s); in btree_trans_journal_entries_top()
116 bch2_trans_jset_entry_alloc(struct btree_trans *trans, unsigned u64s) in bch2_trans_jset_entry_alloc() argument
118 if (!trans->journal_entries || in bch2_trans_jset_entry_alloc()
119 trans->journal_entries_u64s + u64s > trans->journal_entries_size) in bch2_trans_jset_entry_alloc()
120 return __bch2_trans_jset_entry_alloc(trans, u64s); in bch2_trans_jset_entry_alloc()
122 struct jset_entry *e = btree_trans_journal_entries_top(trans); in bch2_trans_jset_entry_alloc()
123 trans->journal_entries_u64s += u64s; in bch2_trans_jset_entry_alloc()
132 static inline int __must_check bch2_trans_update_buffered(struct btree_trans *trans, in bch2_trans_update_buffered() argument
137 int ret = bch2_btree_write_buffer_insert_err(trans, btree, k); in bch2_trans_update_buffered()
153 unlikely(trans->journal_replay_not_finished)) in bch2_trans_update_buffered()
154 return bch2_btree_insert_clone_trans(trans, btree, k); in bch2_trans_update_buffered()
156 struct jset_entry *e = bch2_trans_jset_entry_alloc(trans, jset_u64s(k->k.u64s)); in bch2_trans_update_buffered()
183 static inline int bch2_trans_commit(struct btree_trans *trans, in bch2_trans_commit() argument
188 trans->disk_res = disk_res; in bch2_trans_commit()
189 trans->journal_seq = journal_seq; in bch2_trans_commit()
191 return __bch2_trans_commit(trans, flags); in bch2_trans_commit()
203 bch2_trans_run(_c, commit_do(trans, _disk_res, _journal_seq, _flags, _do))
210 static inline void bch2_trans_reset_updates(struct btree_trans *trans) in bch2_trans_reset_updates() argument
212 trans_for_each_update(trans, i) in bch2_trans_reset_updates()
213 bch2_path_put(trans, i->path, true); in bch2_trans_reset_updates()
215 trans->nr_updates = 0; in bch2_trans_reset_updates()
216 trans->journal_entries_u64s = 0; in bch2_trans_reset_updates()
217 trans->hooks = NULL; in bch2_trans_reset_updates()
218 trans->extra_disk_res = 0; in bch2_trans_reset_updates()
221 static inline struct bkey_i *__bch2_bkey_make_mut_noupdate(struct btree_trans *trans, struct bkey_s… in __bch2_bkey_make_mut_noupdate() argument
231 mut = bch2_trans_kmalloc_nomemzero(trans, bytes + 8); in __bch2_bkey_make_mut_noupdate()
244 static inline struct bkey_i *bch2_bkey_make_mut_noupdate(struct btree_trans *trans, struct bkey_s_c… in bch2_bkey_make_mut_noupdate() argument
246 return __bch2_bkey_make_mut_noupdate(trans, k, 0, 0); in bch2_bkey_make_mut_noupdate()
253 static inline struct bkey_i *__bch2_bkey_make_mut(struct btree_trans *trans, struct btree_iter *ite… in __bch2_bkey_make_mut() argument
258 struct bkey_i *mut = __bch2_bkey_make_mut_noupdate(trans, *k, type, min_bytes); in __bch2_bkey_make_mut()
264 ret = bch2_trans_update(trans, iter, mut, flags); in __bch2_bkey_make_mut()
272 static inline struct bkey_i *bch2_bkey_make_mut(struct btree_trans *trans, in bch2_bkey_make_mut() argument
276 return __bch2_bkey_make_mut(trans, iter, k, flags, 0, 0); in bch2_bkey_make_mut()
283 static inline struct bkey_i *__bch2_bkey_get_mut_noupdate(struct btree_trans *trans, in __bch2_bkey_get_mut_noupdate() argument
289 struct bkey_s_c k = __bch2_bkey_get_iter(trans, iter, in __bch2_bkey_get_mut_noupdate()
293 : __bch2_bkey_make_mut_noupdate(trans, k, 0, min_bytes); in __bch2_bkey_get_mut_noupdate()
295 bch2_trans_iter_exit(trans, iter); in __bch2_bkey_get_mut_noupdate()
299 static inline struct bkey_i *bch2_bkey_get_mut_noupdate(struct btree_trans *trans, in bch2_bkey_get_mut_noupdate() argument
304 return __bch2_bkey_get_mut_noupdate(trans, iter, btree_id, pos, flags, 0, 0); in bch2_bkey_get_mut_noupdate()
307 static inline struct bkey_i *__bch2_bkey_get_mut(struct btree_trans *trans, in __bch2_bkey_get_mut() argument
313 struct bkey_i *mut = __bch2_bkey_get_mut_noupdate(trans, iter, in __bch2_bkey_get_mut()
320 ret = bch2_trans_update(trans, iter, mut, flags); in __bch2_bkey_get_mut()
322 bch2_trans_iter_exit(trans, iter); in __bch2_bkey_get_mut()
329 static inline struct bkey_i *bch2_bkey_get_mut_minsize(struct btree_trans *trans, in bch2_bkey_get_mut_minsize() argument
335 return __bch2_bkey_get_mut(trans, iter, btree_id, pos, flags, 0, min_bytes); in bch2_bkey_get_mut_minsize()
338 static inline struct bkey_i *bch2_bkey_get_mut(struct btree_trans *trans, in bch2_bkey_get_mut() argument
343 return __bch2_bkey_get_mut(trans, iter, btree_id, pos, flags, 0, 0); in bch2_bkey_get_mut()
351 static inline struct bkey_i *__bch2_bkey_alloc(struct btree_trans *trans, struct btree_iter *iter, in __bch2_bkey_alloc() argument
355 struct bkey_i *k = bch2_trans_kmalloc(trans, sizeof(*k) + val_size); in __bch2_bkey_alloc()
366 ret = bch2_trans_update(trans, iter, k, flags); in __bch2_bkey_alloc()