Lines Matching refs:left_path
2036 struct ocfs2_path *left_path, in ocfs2_complete_edge_insert() argument
2057 left_el = path_leaf_el(left_path); in ocfs2_complete_edge_insert()
2059 for(i = left_path->p_tree_depth - 1; i > subtree_index; i--) { in ocfs2_complete_edge_insert()
2068 el = left_path->p_node[i].el; in ocfs2_complete_edge_insert()
2077 ocfs2_journal_dirty(handle, left_path->p_node[i].bh); in ocfs2_complete_edge_insert()
2084 left_el = left_path->p_node[i].el; in ocfs2_complete_edge_insert()
2093 el = left_path->p_node[subtree_index].el; in ocfs2_complete_edge_insert()
2094 left_el = left_path->p_node[subtree_index + 1].el; in ocfs2_complete_edge_insert()
2098 left_path->p_node[subtree_index + 1].bh->b_blocknr); in ocfs2_complete_edge_insert()
2100 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_complete_edge_insert()
2107 struct ocfs2_path *left_path, in ocfs2_rotate_subtree_right() argument
2118 left_leaf_bh = path_leaf_bh(left_path); in ocfs2_rotate_subtree_right()
2119 left_el = path_leaf_el(left_path); in ocfs2_rotate_subtree_right()
2137 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_rotate_subtree_right()
2156 left_path, i); in ocfs2_rotate_subtree_right()
2195 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_right()
2305 static int ocfs2_rotate_requires_path_adjustment(struct ocfs2_path *left_path, in ocfs2_rotate_requires_path_adjustment() argument
2312 left_el = path_leaf_el(left_path); in ocfs2_rotate_requires_path_adjustment()
2369 struct ocfs2_path *left_path = NULL; in ocfs2_rotate_tree_right() local
2374 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_rotate_tree_right()
2375 if (!left_path) { in ocfs2_rotate_tree_right()
2423 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_rotate_tree_right()
2429 mlog_bug_on_msg(path_leaf_bh(left_path) == in ocfs2_rotate_tree_right()
2437 path_leaf_bh(left_path)->b_blocknr); in ocfs2_rotate_tree_right()
2440 ocfs2_rotate_requires_path_adjustment(left_path, in ocfs2_rotate_tree_right()
2457 *ret_left_path = left_path; in ocfs2_rotate_tree_right()
2461 start = ocfs2_find_subtree_root(et, left_path, right_path); in ocfs2_rotate_tree_right()
2475 ret = ocfs2_rotate_subtree_right(handle, et, left_path, in ocfs2_rotate_tree_right()
2496 *ret_left_path = left_path; in ocfs2_rotate_tree_right()
2505 ocfs2_mv_path(right_path, left_path); in ocfs2_rotate_tree_right()
2515 ocfs2_free_path(left_path); in ocfs2_rotate_tree_right()
2608 struct ocfs2_path *left_path, in ocfs2_unlink_subtree() argument
2614 struct buffer_head *root_bh = left_path->p_node[subtree_index].bh; in ocfs2_unlink_subtree()
2615 struct ocfs2_extent_list *root_el = left_path->p_node[subtree_index].el; in ocfs2_unlink_subtree()
2629 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_unlink_subtree()
2633 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_unlink_subtree()
2641 struct ocfs2_path *left_path, in ocfs2_rotate_subtree_left() argument
2655 left_leaf_el = path_leaf_el(left_path); in ocfs2_rotate_subtree_left()
2656 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_rotate_subtree_left()
2732 left_path, i); in ocfs2_rotate_subtree_left()
2760 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_rotate_subtree_left()
2764 ocfs2_unlink_subtree(handle, et, left_path, right_path, in ocfs2_rotate_subtree_left()
2766 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_rotate_subtree_left()
2772 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_rotate_subtree_left()
2787 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_left()
2906 struct ocfs2_path *left_path = NULL; in __ocfs2_rotate_tree_left() local
2921 left_path = ocfs2_new_path_from_path(path); in __ocfs2_rotate_tree_left()
2922 if (!left_path) { in __ocfs2_rotate_tree_left()
2928 ocfs2_cp_path(left_path, path); in __ocfs2_rotate_tree_left()
2944 subtree_root = ocfs2_find_subtree_root(et, left_path, in __ocfs2_rotate_tree_left()
2953 orig_credits, left_path); in __ocfs2_rotate_tree_left()
2964 left_path, 0); in __ocfs2_rotate_tree_left()
2970 ret = ocfs2_rotate_subtree_left(handle, et, left_path, in __ocfs2_rotate_tree_left()
2997 ocfs2_mv_path(left_path, right_path); in __ocfs2_rotate_tree_left()
2999 ret = ocfs2_find_cpos_for_right_leaf(sb, left_path, in __ocfs2_rotate_tree_left()
3009 ocfs2_free_path(left_path); in __ocfs2_rotate_tree_left()
3021 struct ocfs2_path *left_path = NULL; in ocfs2_remove_rightmost_path() local
3047 left_path = ocfs2_new_path_from_path(path); in ocfs2_remove_rightmost_path()
3048 if (!left_path) { in ocfs2_remove_rightmost_path()
3054 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_remove_rightmost_path()
3060 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_remove_rightmost_path()
3066 subtree_index = ocfs2_find_subtree_root(et, left_path, path); in ocfs2_remove_rightmost_path()
3068 ocfs2_unlink_subtree(handle, et, left_path, path, in ocfs2_remove_rightmost_path()
3070 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_remove_rightmost_path()
3076 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_remove_rightmost_path()
3099 ocfs2_free_path(left_path); in ocfs2_remove_rightmost_path()
3287 struct ocfs2_path *left_path, in ocfs2_get_right_path() argument
3298 BUG_ON(left_path->p_tree_depth == 0); in ocfs2_get_right_path()
3300 left_el = path_leaf_el(left_path); in ocfs2_get_right_path()
3304 left_path, &right_cpos); in ocfs2_get_right_path()
3313 right_path = ocfs2_new_path_from_path(left_path); in ocfs2_get_right_path()
3340 static int ocfs2_merge_rec_right(struct ocfs2_path *left_path, in ocfs2_merge_rec_right() argument
3353 struct ocfs2_extent_list *el = path_leaf_el(left_path); in ocfs2_merge_rec_right()
3354 struct buffer_head *bh = path_leaf_bh(left_path); in ocfs2_merge_rec_right()
3363 ret = ocfs2_get_right_path(et, left_path, &right_path); in ocfs2_merge_rec_right()
3382 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_merge_rec_right()
3393 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_merge_rec_right()
3413 left_path, i); in ocfs2_merge_rec_right()
3425 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, left_path, in ocfs2_merge_rec_right()
3426 path_num_items(left_path) - 1); in ocfs2_merge_rec_right()
3445 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_merge_rec_right()
3459 struct ocfs2_path *left_path = NULL; in ocfs2_get_left_path() local
3476 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_get_left_path()
3477 if (!left_path) { in ocfs2_get_left_path()
3483 ret = ocfs2_find_path(et->et_ci, left_path, left_cpos); in ocfs2_get_left_path()
3489 *ret_left_path = left_path; in ocfs2_get_left_path()
3492 ocfs2_free_path(left_path); in ocfs2_get_left_path()
3520 struct ocfs2_path *left_path = NULL; in ocfs2_merge_rec_left() local
3528 ret = ocfs2_get_left_path(et, right_path, &left_path); in ocfs2_merge_rec_left()
3534 left_el = path_leaf_el(left_path); in ocfs2_merge_rec_left()
3544 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_merge_rec_left()
3549 left_path); in ocfs2_merge_rec_left()
3555 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_merge_rec_left()
3575 left_path, i); in ocfs2_merge_rec_left()
3611 if (left_path) { in ocfs2_merge_rec_left()
3612 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_merge_rec_left()
3641 ocfs2_mv_path(right_path, left_path); in ocfs2_merge_rec_left()
3642 left_path = NULL; in ocfs2_merge_rec_left()
3644 ocfs2_complete_edge_insert(handle, left_path, in ocfs2_merge_rec_left()
3648 ocfs2_free_path(left_path); in ocfs2_merge_rec_left()
3992 struct ocfs2_path *left_path = NULL; in ocfs2_append_rec_to_path() local
4031 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_append_rec_to_path()
4032 if (!left_path) { in ocfs2_append_rec_to_path()
4038 ret = ocfs2_find_path(et->et_ci, left_path, in ocfs2_append_rec_to_path()
4060 *ret_left_path = left_path; in ocfs2_append_rec_to_path()
4064 ocfs2_free_path(left_path); in ocfs2_append_rec_to_path()
4070 struct ocfs2_path *left_path, in ocfs2_split_record() argument
4081 if (left_path) in ocfs2_split_record()
4082 left_el = path_leaf_el(left_path); in ocfs2_split_record()
4088 if (index == 0 && left_path) { in ocfs2_split_record()
4129 BUG_ON(!left_path); in ocfs2_split_record()
4157 struct ocfs2_path *left_path, in ocfs2_insert_path() argument
4165 if (left_path) { in ocfs2_insert_path()
4172 ret = ocfs2_extend_trans(handle, left_path->p_tree_depth); in ocfs2_insert_path()
4178 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_insert_path()
4201 ocfs2_split_record(et, left_path, right_path, in ocfs2_insert_path()
4209 if (left_path) in ocfs2_insert_path()
4211 path_leaf_bh(left_path)); in ocfs2_insert_path()
4218 if (left_path) { in ocfs2_insert_path()
4225 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_insert_path()
4227 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_insert_path()
4244 struct ocfs2_path *left_path = NULL; in ocfs2_do_insert_extent() local
4301 right_path, &left_path); in ocfs2_do_insert_extent()
4320 right_path, &left_path); in ocfs2_do_insert_extent()
4327 ret = ocfs2_insert_path(handle, et, left_path, right_path, in ocfs2_do_insert_extent()
4342 ocfs2_free_path(left_path); in ocfs2_do_insert_extent()
4359 struct ocfs2_path *left_path = NULL, *right_path = NULL; in ocfs2_figure_merge_contig_type() local
4372 left_path = ocfs2_new_path_from_path(path); in ocfs2_figure_merge_contig_type()
4373 if (!left_path) { in ocfs2_figure_merge_contig_type()
4379 status = ocfs2_find_path(et->et_ci, left_path, in ocfs2_figure_merge_contig_type()
4384 new_el = path_leaf_el(left_path); in ocfs2_figure_merge_contig_type()
4388 bh = path_leaf_bh(left_path); in ocfs2_figure_merge_contig_type()
4468 ocfs2_free_path(left_path); in ocfs2_figure_merge_contig_type()
5159 struct ocfs2_path *left_path = NULL; in ocfs2_change_extent_flag() local
5163 left_path = ocfs2_new_path_from_et(et); in ocfs2_change_extent_flag()
5164 if (!left_path) { in ocfs2_change_extent_flag()
5170 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_change_extent_flag()
5175 el = path_leaf_el(left_path); in ocfs2_change_extent_flag()
5215 ret = ocfs2_split_extent(handle, et, left_path, in ocfs2_change_extent_flag()
5222 ocfs2_free_path(left_path); in ocfs2_change_extent_flag()
5350 struct ocfs2_path *left_path = NULL; in ocfs2_truncate_rec() local
5410 left_path = ocfs2_new_path_from_path(path); in ocfs2_truncate_rec()
5411 if (!left_path) { in ocfs2_truncate_rec()
5417 ret = ocfs2_find_path(et->et_ci, left_path, in ocfs2_truncate_rec()
5440 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_truncate_rec()
5485 if (left_path) { in ocfs2_truncate_rec()
5488 subtree_index = ocfs2_find_subtree_root(et, left_path, path); in ocfs2_truncate_rec()
5489 ocfs2_complete_edge_insert(handle, left_path, path, in ocfs2_truncate_rec()
5500 ocfs2_free_path(left_path); in ocfs2_truncate_rec()