Lines Matching refs:insert

108 			 struct bkey_i *insert,  in trace_move_extent_fail2()  argument
124 if (insert) { in trace_move_extent_fail2()
128 (ptr = bch2_extent_has_ptr(old, p, bkey_i_to_s(insert))) && in trace_move_extent_fail2()
156 if (insert) { in trace_move_extent_fail2()
158 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in trace_move_extent_fail2()
187 struct bkey_i *insert = NULL; in __bch2_data_update_index_update() local
215 insert = _insert.k; in __bch2_data_update_index_update()
221 bch2_cut_front(iter.pos, insert); in __bch2_data_update_index_update()
222 bch2_cut_back(new->k.p, insert); in __bch2_data_update_index_update()
223 bch2_cut_back(insert->k.p, &new->k_i); in __bch2_data_update_index_update()
237 (ptr = bch2_extent_has_ptr(old, p, bkey_i_to_s(insert))) && in __bch2_data_update_index_update()
240 bkey_i_to_s(insert), ptr); in __bch2_data_update_index_update()
249 trace_move_extent_fail2(m, k, bkey_i_to_s_c(&new->k_i), insert, "no rewrites found:"); in __bch2_data_update_index_update()
259 if ((ptr_c = bch2_bkey_has_device_c(bkey_i_to_s_c(insert), ptr->dev)) && in __bch2_data_update_index_update()
266 trace_move_extent_fail2(m, k, bkey_i_to_s_c(&new->k_i), insert, "new replicas conflicted:"); in __bch2_data_update_index_update()
272 if ((ptr = bch2_bkey_has_device(bkey_i_to_s(insert), p.ptr.dev))) in __bch2_data_update_index_update()
273 bch2_bkey_drop_ptr_noerror(bkey_i_to_s(insert), ptr); in __bch2_data_update_index_update()
275 durability = bch2_bkey_durability(c, bkey_i_to_s_c(insert)) + in __bch2_data_update_index_update()
281 bkey_for_each_ptr_decode(old.k, bch2_bkey_ptrs(bkey_i_to_s(insert)), p, entry) { in __bch2_data_update_index_update()
289 bkey_i_to_s(insert), &entry->ptr); in __bch2_data_update_index_update()
297 bch2_extent_ptr_decoded_append(insert, &p); in __bch2_data_update_index_update()
299 bch2_bkey_narrow_crcs(insert, (struct bch_extent_crc_unpacked) { 0 }); in __bch2_data_update_index_update()
300 bch2_extent_normalize_by_opts(c, &m->op.opts, bkey_i_to_s(insert)); in __bch2_data_update_index_update()
302 ret = bch2_sum_sector_overwrites(trans, &iter, insert, in __bch2_data_update_index_update()
318 next_pos = insert->k.p; in __bch2_data_update_index_update()
326 int invalid = bch2_bkey_validate(c, bkey_i_to_s_c(insert), __btree_node_type(0, m->btree_id), in __bch2_data_update_index_update()
337 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in __bch2_data_update_index_update()
355 bch2_bkey_val_to_text(&buf, c, bkey_i_to_s_c(insert)); in __bch2_data_update_index_update()
362 k.k->p, bkey_start_pos(&insert->k)) ?: in __bch2_data_update_index_update()
364 k.k->p, insert->k.p) ?: in __bch2_data_update_index_update()
365 bch2_bkey_set_needs_rebalance(c, insert, &op->opts) ?: in __bch2_data_update_index_update()
366 bch2_trans_update(trans, &iter, insert, in __bch2_data_update_index_update()