Lines Matching full:insert

96 					       struct bkey_i *insert)  in trace_move_extent_finish2()  argument
110 prt_str_indented(&buf, "insert:\t"); in trace_move_extent_finish2()
111 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in trace_move_extent_finish2()
121 struct bkey_i *insert, in trace_move_extent_fail2() argument
134 if (insert) { in trace_move_extent_fail2()
142 (ptr = bch2_extent_has_ptr(old, p, bkey_i_to_s(insert))) && in trace_move_extent_fail2()
164 if (insert) { in trace_move_extent_fail2()
166 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in trace_move_extent_fail2()
195 struct bkey_i *insert = NULL; in __bch2_data_update_index_update() local
223 insert = _insert.k; in __bch2_data_update_index_update()
229 bch2_cut_front(iter.pos, insert); in __bch2_data_update_index_update()
230 bch2_cut_back(new->k.p, insert); in __bch2_data_update_index_update()
231 bch2_cut_back(insert->k.p, &new->k_i); in __bch2_data_update_index_update()
235 * @insert: key that we're going to update, initialized from in __bch2_data_update_index_update()
238 * @new: extent with new pointers that we'll be adding to @insert in __bch2_data_update_index_update()
245 (ptr = bch2_extent_has_ptr(old, p, bkey_i_to_s(insert))) && in __bch2_data_update_index_update()
248 bkey_i_to_s(insert), ptr); in __bch2_data_update_index_update()
257 trace_move_extent_fail2(m, k, bkey_i_to_s_c(&new->k_i), insert, "no rewrites found:"); in __bch2_data_update_index_update()
267 if ((ptr_c = bch2_bkey_has_device_c(bkey_i_to_s_c(insert), ptr->dev)) && in __bch2_data_update_index_update()
274 trace_move_extent_fail2(m, k, bkey_i_to_s_c(&new->k_i), insert, "new replicas conflicted:"); in __bch2_data_update_index_update()
280 if ((ptr = bch2_bkey_has_device(bkey_i_to_s(insert), p.ptr.dev))) in __bch2_data_update_index_update()
281 bch2_bkey_drop_ptr_noerror(bkey_i_to_s(insert), ptr); in __bch2_data_update_index_update()
283 durability = bch2_bkey_durability(c, bkey_i_to_s_c(insert)) + in __bch2_data_update_index_update()
289 bkey_for_each_ptr_decode(old.k, bch2_bkey_ptrs(bkey_i_to_s(insert)), p, entry) { in __bch2_data_update_index_update()
297 bkey_i_to_s(insert), &entry->ptr); in __bch2_data_update_index_update()
305 bch2_extent_ptr_decoded_append(insert, &p); in __bch2_data_update_index_update()
307 bch2_bkey_narrow_crcs(insert, (struct bch_extent_crc_unpacked) { 0 }); in __bch2_data_update_index_update()
308 bch2_extent_normalize_by_opts(c, &m->op.opts, bkey_i_to_s(insert)); in __bch2_data_update_index_update()
310 ret = bch2_sum_sector_overwrites(trans, &iter, insert, in __bch2_data_update_index_update()
326 next_pos = insert->k.p; in __bch2_data_update_index_update()
334 int invalid = bch2_bkey_validate(c, bkey_i_to_s_c(insert), in __bch2_data_update_index_update()
342 prt_str(&buf, "about to insert invalid key in data update path"); in __bch2_data_update_index_update()
349 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in __bch2_data_update_index_update()
367 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in __bch2_data_update_index_update()
374 k.k->p, bkey_start_pos(&insert->k)) ?: in __bch2_data_update_index_update()
376 k.k->p, insert->k.p) ?: in __bch2_data_update_index_update()
377 bch2_bkey_set_needs_rebalance(c, &op->opts, insert) ?: in __bch2_data_update_index_update()
378 bch2_trans_update(trans, &iter, insert, in __bch2_data_update_index_update()
390 trace_move_extent_finish2(m, &new->k_i, insert); in __bch2_data_update_index_update()