Lines Matching refs:right

547 static void redistribute2(struct btree_node *left, struct btree_node *right)  in redistribute2()  argument
550 unsigned nr_right = le32_to_cpu(right->header.nr_entries); in redistribute2()
557 copy_entries(left, nr_left, right, 0, delta); in redistribute2()
558 shift_down(right, delta); in redistribute2()
562 shift_up(right, delta); in redistribute2()
563 copy_entries(right, 0, left, target_left, delta); in redistribute2()
567 right->header.nr_entries = cpu_to_le32(target_right); in redistribute2()
575 struct btree_node *right) in redistribute3() argument
579 unsigned nr_right = le32_to_cpu(right->header.nr_entries); in redistribute3()
591 copy_entries(left, nr_left, right, 0, left_short); in redistribute3()
592 copy_entries(center, 0, right, left_short, target_center); in redistribute3()
593 shift_down(right, nr_right - target_right); in redistribute3()
598 copy_entries(center, left_to_center, right, 0, target_center - left_to_center); in redistribute3()
599 shift_down(right, nr_right - target_right); in redistribute3()
603 shift_up(right, right_short); in redistribute3()
604 copy_entries(right, 0, left, nr_left - right_short, right_short); in redistribute3()
610 right->header.nr_entries = cpu_to_le32(target_right); in redistribute3()
647 struct dm_block *left, *right, *parent; in split_one_into_two() local
653 r = new_block(s->info, &right); in split_one_into_two()
658 rn = dm_block_data(right); in split_one_into_two()
670 location = cpu_to_le64(dm_block_location(right)); in split_one_into_two()
675 unlock_block(s->info, right); in split_one_into_two()
681 unlock_block(s->info, right); in split_one_into_two()
685 s->nodes[1] = right; in split_one_into_two()
731 struct dm_block *left, *middle, *right, *parent; in split_two_into_three() local
741 r = shadow_child(s->info, vt, pn, parent_index + 1, &right); in split_two_into_three()
746 right = shadow_current(s); in split_two_into_three()
758 rn = dm_block_data(right); in split_two_into_three()
779 if (shadow_current(s) != right) in split_two_into_three()
780 unlock_block(s->info, right); in split_two_into_three()
789 unlock_block(s->info, right); in split_two_into_three()
793 unlock_block(s->info, right); in split_two_into_three()
798 s->nodes[1] = right; in split_two_into_three()
832 struct dm_block *left, *right, *new_parent; in btree_split_beneath() local
858 r = new_block(s->info, &right); in btree_split_beneath()
864 rn = dm_block_data(right); in btree_split_beneath()
889 val = cpu_to_le64(dm_block_location(right)); in btree_split_beneath()
895 unlock_block(s->info, right); in btree_split_beneath()
909 struct btree_node *left, *right, *parent = dm_block_data(shadow_parent(s)); in rebalance_left() local
916 right = dm_block_data(shadow_current(s)); in rebalance_left()
917 redistribute2(left, right); in rebalance_left()
918 *key_ptr(parent, parent_index) = right->keys[0]; in rebalance_left()
920 if (key < le64_to_cpu(right->keys[0])) { in rebalance_left()
938 struct btree_node *left, *right, *parent = dm_block_data(shadow_parent(s)); in rebalance_right() local
945 right = dm_block_data(sib); in rebalance_right()
946 redistribute2(left, right); in rebalance_right()
947 *key_ptr(parent, parent_index + 1) = right->keys[0]; in rebalance_right()
949 if (key < le64_to_cpu(right->keys[0])) { in rebalance_right()