Lines Matching full:paths

261 		bch2_btree_path_verify(trans, &trans->paths[iter->update_path]);  in bch2_btree_iter_verify()
650 i->old_v = bch2_btree_path_peek_slot(trans->paths + i->path, &i->old_k).v; in bch2_trans_revalidate_updates_in_node()
1025 if (trans->paths[idx].uptodate) { in bch2_btree_path_traverse_all()
1026 __btree_path_get(trans, &trans->paths[idx], false); in bch2_btree_path_traverse_all()
1028 __btree_path_put(trans, &trans->paths[idx], false); in bch2_btree_path_traverse_all()
1041 * We used to assert that all paths had been traversed here in bch2_btree_path_traverse_all()
1137 struct btree_path *path = &trans->paths[path_idx]; in bch2_btree_path_traverse_one()
1163 path = &trans->paths[path_idx]; in bch2_btree_path_traverse_one()
1243 btree_path_copy(trans, trans->paths + new, trans->paths + src); in btree_path_clone()
1244 __btree_path_get(trans, trans->paths + new, intent); in btree_path_clone()
1246 trans->paths[new].ip_allocated = ip; in btree_path_clone()
1255 struct btree_path *old = trans->paths + path; in __bch2_btree_path_make_mut()
1256 __btree_path_put(trans, trans->paths + path, intent); in __bch2_btree_path_make_mut()
1258 trace_btree_path_clone(trans, old, trans->paths + path); in __bch2_btree_path_make_mut()
1259 trans->paths[path].preserve = false; in __bch2_btree_path_make_mut()
1268 int cmp = bpos_cmp(new_pos, trans->paths[path_idx].pos); in __bch2_btree_path_set_pos()
1271 EBUG_ON(!trans->paths[path_idx].ref); in __bch2_btree_path_set_pos()
1273 trace_btree_path_set_pos(trans, trans->paths + path_idx, &new_pos); in __bch2_btree_path_set_pos()
1277 struct btree_path *path = trans->paths + path_idx; in __bch2_btree_path_set_pos()
1355 __bch2_btree_path_unlock(trans, trans->paths + path); in __bch2_path_free()
1356 btree_path_list_remove(trans, trans->paths + path); in __bch2_path_free()
1382 struct btree_path *path = trans->paths + path_idx, *dup; in bch2_path_put()
1417 if (!__btree_path_put(trans, trans->paths + path, intent)) in bch2_path_put_nokeep()
1487 struct btree_path *path = trans->paths + path_idx; in bch2_btree_path_to_text_short()
1531 struct btree_path *path = trans->paths + path_idx; in bch2_btree_path_to_text()
1651 struct btree_path *paths = p; in btree_paths_realloc() local
1652 *trans_paths_nr(paths) = nr; in btree_paths_realloc()
1653 memcpy(paths, trans->paths, trans->nr_paths * sizeof(struct btree_path)); in btree_paths_realloc()
1666 rcu_assign_pointer(trans->paths, paths); in btree_paths_realloc()
1699 struct btree_path *path = &trans->paths[idx]; in btree_path_alloc()
1738 trans->paths[path_pos].cached == cached && in bch2_path_get()
1739 trans->paths[path_pos].btree_id == btree_id && in bch2_path_get()
1740 trans->paths[path_pos].level == level) { in bch2_path_get()
1741 trace_btree_path_get(trans, trans->paths + path_pos, &pos); in bch2_path_get()
1743 __btree_path_get(trans, trans->paths + path_pos, intent); in bch2_path_get()
1745 path = trans->paths + path_idx; in bch2_path_get()
1748 path = trans->paths + path_idx; in bch2_path_get()
1800 struct btree_path *path = trans->paths + path_idx; in bch2_path_get_unlocked_mut()
1898 EBUG_ON(trans->paths[iter->path].cached); in bch2_btree_iter_peek_node()
1947 EBUG_ON(trans->paths[iter->path].cached); in bch2_btree_iter_next_node()
2184 btree_path_set_should_be_locked(trans, trans->paths + iter->key_cache_path); in btree_trans_peek_key_cache()
2186 k = bch2_btree_path_peek_slot(trans->paths + iter->key_cache_path, &u); in btree_trans_peek_key_cache()
2332 !bkey_eq(trans->paths[iter->update_path].pos, k.k->p)) { in bch2_btree_iter_peek_upto()
2355 __btree_path_get(trans, trans->paths + iter->path, iter->flags & BTREE_ITER_intent); in bch2_btree_iter_peek_upto()
2414 ret = bch2_btree_path_relock(trans, trans->paths + iter->update_path, _THIS_IP_); in bch2_btree_iter_peek_upto()
2418 btree_path_set_should_be_locked(trans, trans->paths + iter->update_path); in bch2_btree_iter_peek_upto()
2540 trace_btree_path_save_pos(trans, path, trans->paths + saved_path); in bch2_btree_iter_peek_prev()
2658 k = bch2_btree_path_peek_slot(trans->paths + iter->path, &iter->k); in bch2_btree_iter_peek_slot()
2774 BUG_ON(trans->paths[idx].sorted_idx != i); in btree_trans_verify_sorted_refs()
2789 panic("trans paths out of order!\n"); in btree_trans_verify_sorted()
2819 if (btree_path_cmp(trans->paths + trans->sorted[i], in __bch2_btree_trans_sort_paths()
2820 trans->paths + trans->sorted[i + 1]) > 0) { in __bch2_btree_trans_sort_paths()
2822 trans->paths[trans->sorted[i]].sorted_idx = i; in __bch2_btree_trans_sort_paths()
2823 trans->paths[trans->sorted[i + 1]].sorted_idx = i + 1; in __bch2_btree_trans_sort_paths()
2854 trans->paths[trans->sorted[i]].sorted_idx = i; in btree_path_list_remove()
2861 struct btree_path *path = trans->paths + path_idx; in btree_path_list_add()
2863 path->sorted_idx = pos ? trans->paths[pos].sorted_idx + 1 : trans->nr_sorted; in btree_path_list_add()
2877 trans->paths[trans->sorted[i]].sorted_idx = i; in btree_path_list_add()
2942 __btree_path_get(trans, trans->paths + src->path, src->flags & BTREE_ITER_intent); in bch2_trans_copy_iter()
2944 __btree_path_get(trans, trans->paths + src->update_path, src->flags & BTREE_ITER_intent); in bch2_trans_copy_iter()
3201 trans->paths = trans->_paths; in __bch2_trans_get()
3204 *trans_paths_nr(trans->paths) = BTREE_ITER_INITIAL; in __bch2_trans_get()
3249 bch_err(c, "btree paths leaked from %s!", trans->fn); in check_btree_paths_leaked()
3268 __btree_path_put(trans, trans->paths + i->path, true); in bch2_trans_put()
3290 trans->paths = NULL; in bch2_trans_put()
3366 /* trans->paths is rcu protected vs. freeing */ in bch2_btree_trans_to_text()
3370 struct btree_path *paths = rcu_dereference(trans->paths); in bch2_btree_trans_to_text() local
3371 if (!paths) in bch2_btree_trans_to_text()
3374 unsigned long *paths_allocated = trans_paths_allocated(paths); in bch2_btree_trans_to_text()
3376 trans_for_each_path_idx_from(paths_allocated, *trans_paths_nr(paths), idx, 1) { in bch2_btree_trans_to_text()
3377 struct btree_path *path = paths + idx; in bch2_btree_trans_to_text()