Lines Matching full:update

38 	struct bkey_i *update;  in extent_front_merge()  local
44 update = bch2_bkey_make_mut_noupdate(trans, k); in extent_front_merge()
45 ret = PTR_ERR_OR_ZERO(update); in extent_front_merge()
49 if (!bch2_bkey_merge(c, bkey_i_to_s(update), bkey_i_to_s_c(*insert))) in extent_front_merge()
63 *insert = update; in extent_front_merge()
132 struct bkey_i *update; in __bch2_insert_snapshot_whiteouts() local
161 update = bch2_trans_kmalloc(trans, sizeof(struct bkey_i)); in __bch2_insert_snapshot_whiteouts()
162 ret = PTR_ERR_OR_ZERO(update); in __bch2_insert_snapshot_whiteouts()
166 bkey_init(&update->k); in __bch2_insert_snapshot_whiteouts()
167 update->k.p = whiteout_pos; in __bch2_insert_snapshot_whiteouts()
168 update->k.type = KEY_TYPE_whiteout; in __bch2_insert_snapshot_whiteouts()
170 ret = bch2_trans_update(trans, &new_iter, update, in __bch2_insert_snapshot_whiteouts()
193 struct bkey_i *update; in bch2_trans_update_extent_overwrite() local
212 update = bch2_bkey_make_mut_noupdate(trans, old); in bch2_trans_update_extent_overwrite()
213 if ((ret = PTR_ERR_OR_ZERO(update))) in bch2_trans_update_extent_overwrite()
216 bch2_cut_back(new_start, update); in bch2_trans_update_extent_overwrite()
219 old.k->p, update->k.p) ?: in bch2_trans_update_extent_overwrite()
220 bch2_btree_insert_nonextent(trans, btree_id, update, in bch2_trans_update_extent_overwrite()
228 update = bch2_bkey_make_mut_noupdate(trans, old); in bch2_trans_update_extent_overwrite()
229 if ((ret = PTR_ERR_OR_ZERO(update))) in bch2_trans_update_extent_overwrite()
232 bch2_cut_front(new_start, update); in bch2_trans_update_extent_overwrite()
233 bch2_cut_back(new.k->p, update); in bch2_trans_update_extent_overwrite()
236 old.k->p, update->k.p) ?: in bch2_trans_update_extent_overwrite()
237 bch2_btree_insert_nonextent(trans, btree_id, update, in bch2_trans_update_extent_overwrite()
244 update = bch2_trans_kmalloc(trans, sizeof(*update)); in bch2_trans_update_extent_overwrite()
245 if ((ret = PTR_ERR_OR_ZERO(update))) in bch2_trans_update_extent_overwrite()
248 bkey_init(&update->k); in bch2_trans_update_extent_overwrite()
249 update->k.p = old.k->p; in bch2_trans_update_extent_overwrite()
250 update->k.p.snapshot = new.k->p.snapshot; in bch2_trans_update_extent_overwrite()
253 update->k.type = KEY_TYPE_whiteout; in bch2_trans_update_extent_overwrite()
255 ret = need_whiteout_for_snapshot(trans, btree_id, update->k.p); in bch2_trans_update_extent_overwrite()
259 update->k.type = KEY_TYPE_whiteout; in bch2_trans_update_extent_overwrite()
262 ret = bch2_btree_insert_nonextent(trans, btree_id, update, in bch2_trans_update_extent_overwrite()
269 update = bch2_bkey_make_mut_noupdate(trans, old); in bch2_trans_update_extent_overwrite()
270 if ((ret = PTR_ERR_OR_ZERO(update))) in bch2_trans_update_extent_overwrite()
273 bch2_cut_front(new.k->p, update); in bch2_trans_update_extent_overwrite()
275 ret = bch2_trans_update_by_path(trans, iter->path, update, in bch2_trans_update_extent_overwrite()
416 * Pending updates are kept sorted: first, find position of new update, in bch2_trans_update_by_path()
417 * then delete/trim any updates the new update overwrites: in bch2_trans_update_by_path()
663 * @iter_flags: btree iter update trigger flags