Lines Matching refs:left_path
2051 struct ocfs2_path *left_path, in ocfs2_complete_edge_insert() argument
2072 left_el = path_leaf_el(left_path); in ocfs2_complete_edge_insert()
2074 for(i = left_path->p_tree_depth - 1; i > subtree_index; i--) { in ocfs2_complete_edge_insert()
2083 el = left_path->p_node[i].el; in ocfs2_complete_edge_insert()
2092 ocfs2_journal_dirty(handle, left_path->p_node[i].bh); in ocfs2_complete_edge_insert()
2099 left_el = left_path->p_node[i].el; in ocfs2_complete_edge_insert()
2108 el = left_path->p_node[subtree_index].el; in ocfs2_complete_edge_insert()
2109 left_el = left_path->p_node[subtree_index + 1].el; in ocfs2_complete_edge_insert()
2113 left_path->p_node[subtree_index + 1].bh->b_blocknr); in ocfs2_complete_edge_insert()
2115 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_complete_edge_insert()
2122 struct ocfs2_path *left_path, in ocfs2_rotate_subtree_right() argument
2133 left_leaf_bh = path_leaf_bh(left_path); in ocfs2_rotate_subtree_right()
2134 left_el = path_leaf_el(left_path); in ocfs2_rotate_subtree_right()
2152 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_rotate_subtree_right()
2171 left_path, i); in ocfs2_rotate_subtree_right()
2210 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_right()
2320 static int ocfs2_rotate_requires_path_adjustment(struct ocfs2_path *left_path, in ocfs2_rotate_requires_path_adjustment() argument
2327 left_el = path_leaf_el(left_path); in ocfs2_rotate_requires_path_adjustment()
2384 struct ocfs2_path *left_path = NULL; in ocfs2_rotate_tree_right() local
2389 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_rotate_tree_right()
2390 if (!left_path) { in ocfs2_rotate_tree_right()
2438 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_rotate_tree_right()
2444 mlog_bug_on_msg(path_leaf_bh(left_path) == in ocfs2_rotate_tree_right()
2452 path_leaf_bh(left_path)->b_blocknr); in ocfs2_rotate_tree_right()
2455 ocfs2_rotate_requires_path_adjustment(left_path, in ocfs2_rotate_tree_right()
2472 *ret_left_path = left_path; in ocfs2_rotate_tree_right()
2476 start = ocfs2_find_subtree_root(et, left_path, right_path); in ocfs2_rotate_tree_right()
2490 ret = ocfs2_rotate_subtree_right(handle, et, left_path, in ocfs2_rotate_tree_right()
2511 *ret_left_path = left_path; in ocfs2_rotate_tree_right()
2520 ocfs2_mv_path(right_path, left_path); in ocfs2_rotate_tree_right()
2530 ocfs2_free_path(left_path); in ocfs2_rotate_tree_right()
2623 struct ocfs2_path *left_path, in ocfs2_unlink_subtree() argument
2629 struct buffer_head *root_bh = left_path->p_node[subtree_index].bh; in ocfs2_unlink_subtree()
2630 struct ocfs2_extent_list *root_el = left_path->p_node[subtree_index].el; in ocfs2_unlink_subtree()
2644 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_unlink_subtree()
2648 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_unlink_subtree()
2656 struct ocfs2_path *left_path, in ocfs2_rotate_subtree_left() argument
2670 left_leaf_el = path_leaf_el(left_path); in ocfs2_rotate_subtree_left()
2671 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_rotate_subtree_left()
2747 left_path, i); in ocfs2_rotate_subtree_left()
2775 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_rotate_subtree_left()
2779 ocfs2_unlink_subtree(handle, et, left_path, right_path, in ocfs2_rotate_subtree_left()
2781 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_rotate_subtree_left()
2787 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_rotate_subtree_left()
2802 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_left()
2921 struct ocfs2_path *left_path = NULL; in __ocfs2_rotate_tree_left() local
2936 left_path = ocfs2_new_path_from_path(path); in __ocfs2_rotate_tree_left()
2937 if (!left_path) { in __ocfs2_rotate_tree_left()
2943 ocfs2_cp_path(left_path, path); in __ocfs2_rotate_tree_left()
2959 subtree_root = ocfs2_find_subtree_root(et, left_path, in __ocfs2_rotate_tree_left()
2968 orig_credits, left_path); in __ocfs2_rotate_tree_left()
2979 left_path, 0); in __ocfs2_rotate_tree_left()
2985 ret = ocfs2_rotate_subtree_left(handle, et, left_path, in __ocfs2_rotate_tree_left()
3012 ocfs2_mv_path(left_path, right_path); in __ocfs2_rotate_tree_left()
3014 ret = ocfs2_find_cpos_for_right_leaf(sb, left_path, in __ocfs2_rotate_tree_left()
3024 ocfs2_free_path(left_path); in __ocfs2_rotate_tree_left()
3036 struct ocfs2_path *left_path = NULL; in ocfs2_remove_rightmost_path() local
3062 left_path = ocfs2_new_path_from_path(path); in ocfs2_remove_rightmost_path()
3063 if (!left_path) { in ocfs2_remove_rightmost_path()
3069 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_remove_rightmost_path()
3075 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_remove_rightmost_path()
3081 subtree_index = ocfs2_find_subtree_root(et, left_path, path); in ocfs2_remove_rightmost_path()
3083 ocfs2_unlink_subtree(handle, et, left_path, path, in ocfs2_remove_rightmost_path()
3085 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_remove_rightmost_path()
3091 eb = (struct ocfs2_extent_block *)path_leaf_bh(left_path)->b_data; in ocfs2_remove_rightmost_path()
3114 ocfs2_free_path(left_path); in ocfs2_remove_rightmost_path()
3302 struct ocfs2_path *left_path, in ocfs2_get_right_path() argument
3313 BUG_ON(left_path->p_tree_depth == 0); in ocfs2_get_right_path()
3315 left_el = path_leaf_el(left_path); in ocfs2_get_right_path()
3319 left_path, &right_cpos); in ocfs2_get_right_path()
3328 right_path = ocfs2_new_path_from_path(left_path); in ocfs2_get_right_path()
3355 static int ocfs2_merge_rec_right(struct ocfs2_path *left_path, in ocfs2_merge_rec_right() argument
3368 struct ocfs2_extent_list *el = path_leaf_el(left_path); in ocfs2_merge_rec_right()
3369 struct buffer_head *bh = path_leaf_bh(left_path); in ocfs2_merge_rec_right()
3378 ret = ocfs2_get_right_path(et, left_path, &right_path); in ocfs2_merge_rec_right()
3397 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_merge_rec_right()
3408 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_merge_rec_right()
3428 left_path, i); in ocfs2_merge_rec_right()
3440 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, left_path, in ocfs2_merge_rec_right()
3441 path_num_items(left_path) - 1); in ocfs2_merge_rec_right()
3460 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_merge_rec_right()
3474 struct ocfs2_path *left_path = NULL; in ocfs2_get_left_path() local
3491 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_get_left_path()
3492 if (!left_path) { in ocfs2_get_left_path()
3498 ret = ocfs2_find_path(et->et_ci, left_path, left_cpos); in ocfs2_get_left_path()
3504 *ret_left_path = left_path; in ocfs2_get_left_path()
3507 ocfs2_free_path(left_path); in ocfs2_get_left_path()
3535 struct ocfs2_path *left_path = NULL; in ocfs2_merge_rec_left() local
3543 ret = ocfs2_get_left_path(et, right_path, &left_path); in ocfs2_merge_rec_left()
3549 left_el = path_leaf_el(left_path); in ocfs2_merge_rec_left()
3559 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_merge_rec_left()
3564 left_path); in ocfs2_merge_rec_left()
3570 root_bh = left_path->p_node[subtree_index].bh; in ocfs2_merge_rec_left()
3590 left_path, i); in ocfs2_merge_rec_left()
3626 if (left_path) { in ocfs2_merge_rec_left()
3627 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_merge_rec_left()
3656 ocfs2_mv_path(right_path, left_path); in ocfs2_merge_rec_left()
3657 left_path = NULL; in ocfs2_merge_rec_left()
3659 ocfs2_complete_edge_insert(handle, left_path, in ocfs2_merge_rec_left()
3663 ocfs2_free_path(left_path); in ocfs2_merge_rec_left()
4007 struct ocfs2_path *left_path = NULL; in ocfs2_append_rec_to_path() local
4046 left_path = ocfs2_new_path_from_path(right_path); in ocfs2_append_rec_to_path()
4047 if (!left_path) { in ocfs2_append_rec_to_path()
4053 ret = ocfs2_find_path(et->et_ci, left_path, in ocfs2_append_rec_to_path()
4075 *ret_left_path = left_path; in ocfs2_append_rec_to_path()
4079 ocfs2_free_path(left_path); in ocfs2_append_rec_to_path()
4085 struct ocfs2_path *left_path, in ocfs2_split_record() argument
4096 if (left_path) in ocfs2_split_record()
4097 left_el = path_leaf_el(left_path); in ocfs2_split_record()
4103 if (index == 0 && left_path) { in ocfs2_split_record()
4144 BUG_ON(!left_path); in ocfs2_split_record()
4172 struct ocfs2_path *left_path, in ocfs2_insert_path() argument
4180 if (left_path) { in ocfs2_insert_path()
4187 ret = ocfs2_extend_trans(handle, left_path->p_tree_depth); in ocfs2_insert_path()
4193 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_insert_path()
4216 ocfs2_split_record(et, left_path, right_path, in ocfs2_insert_path()
4224 if (left_path) in ocfs2_insert_path()
4226 path_leaf_bh(left_path)); in ocfs2_insert_path()
4233 if (left_path) { in ocfs2_insert_path()
4240 subtree_index = ocfs2_find_subtree_root(et, left_path, in ocfs2_insert_path()
4242 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_insert_path()
4259 struct ocfs2_path *left_path = NULL; in ocfs2_do_insert_extent() local
4316 right_path, &left_path); in ocfs2_do_insert_extent()
4335 right_path, &left_path); in ocfs2_do_insert_extent()
4342 ret = ocfs2_insert_path(handle, et, left_path, right_path, in ocfs2_do_insert_extent()
4357 ocfs2_free_path(left_path); in ocfs2_do_insert_extent()
4374 struct ocfs2_path *left_path = NULL, *right_path = NULL; in ocfs2_figure_merge_contig_type() local
4387 left_path = ocfs2_new_path_from_path(path); in ocfs2_figure_merge_contig_type()
4388 if (!left_path) { in ocfs2_figure_merge_contig_type()
4394 status = ocfs2_find_path(et->et_ci, left_path, in ocfs2_figure_merge_contig_type()
4399 new_el = path_leaf_el(left_path); in ocfs2_figure_merge_contig_type()
4403 bh = path_leaf_bh(left_path); in ocfs2_figure_merge_contig_type()
4483 ocfs2_free_path(left_path); in ocfs2_figure_merge_contig_type()
5174 struct ocfs2_path *left_path = NULL; in ocfs2_change_extent_flag() local
5178 left_path = ocfs2_new_path_from_et(et); in ocfs2_change_extent_flag()
5179 if (!left_path) { in ocfs2_change_extent_flag()
5185 ret = ocfs2_find_path(et->et_ci, left_path, cpos); in ocfs2_change_extent_flag()
5190 el = path_leaf_el(left_path); in ocfs2_change_extent_flag()
5230 ret = ocfs2_split_extent(handle, et, left_path, in ocfs2_change_extent_flag()
5237 ocfs2_free_path(left_path); in ocfs2_change_extent_flag()
5365 struct ocfs2_path *left_path = NULL; in ocfs2_truncate_rec() local
5425 left_path = ocfs2_new_path_from_path(path); in ocfs2_truncate_rec()
5426 if (!left_path) { in ocfs2_truncate_rec()
5432 ret = ocfs2_find_path(et->et_ci, left_path, in ocfs2_truncate_rec()
5455 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_truncate_rec()
5500 if (left_path) { in ocfs2_truncate_rec()
5503 subtree_index = ocfs2_find_subtree_root(et, left_path, path); in ocfs2_truncate_rec()
5504 ocfs2_complete_edge_insert(handle, left_path, path, in ocfs2_truncate_rec()
5515 ocfs2_free_path(left_path); in ocfs2_truncate_rec()