Lines Matching refs:push_items
2709 int push_items = 0; in push_node_left() local
2716 push_items = BTRFS_NODEPTRS_PER_BLOCK(fs_info) - dst_nritems; in push_node_left()
2723 if (push_items <= 0) in push_node_left()
2727 push_items = min(src_nritems, push_items); in push_node_left()
2728 if (push_items < src_nritems) { in push_node_left()
2732 if (src_nritems - push_items < 8) { in push_node_left()
2733 if (push_items <= 8) in push_node_left()
2735 push_items -= 8; in push_node_left()
2739 push_items = min(src_nritems - 8, push_items); in push_node_left()
2747 ret = btrfs_tree_mod_log_eb_copy(dst, src, dst_nritems, 0, push_items); in push_node_left()
2755 push_items * sizeof(struct btrfs_key_ptr)); in push_node_left()
2757 if (push_items < src_nritems) { in push_node_left()
2763 btrfs_node_key_ptr_offset(src, push_items), in push_node_left()
2764 (src_nritems - push_items) * in push_node_left()
2767 btrfs_set_header_nritems(src, src_nritems - push_items); in push_node_left()
2768 btrfs_set_header_nritems(dst, dst_nritems + push_items); in push_node_left()
2789 int push_items = 0; in balance_node_right() local
2800 push_items = BTRFS_NODEPTRS_PER_BLOCK(fs_info) - dst_nritems; in balance_node_right()
2801 if (push_items <= 0) in balance_node_right()
2812 if (max_push < push_items) in balance_node_right()
2813 push_items = max_push; in balance_node_right()
2826 memmove_extent_buffer(dst, btrfs_node_key_ptr_offset(dst, push_items), in balance_node_right()
2831 ret = btrfs_tree_mod_log_eb_copy(dst, src, 0, src_nritems - push_items, in balance_node_right()
2832 push_items); in balance_node_right()
2839 btrfs_node_key_ptr_offset(src, src_nritems - push_items), in balance_node_right()
2840 push_items * sizeof(struct btrfs_key_ptr)); in balance_node_right()
2842 btrfs_set_header_nritems(src, src_nritems - push_items); in balance_node_right()
2843 btrfs_set_header_nritems(dst, dst_nritems + push_items); in balance_node_right()
3134 int push_items = 0; in __push_leaf_right() local
3151 if (!empty && push_items > 0) { in __push_leaf_right()
3170 push_items++; in __push_leaf_right()
3177 if (push_items == 0) in __push_leaf_right()
3180 WARN_ON(!empty && push_items == left_nritems); in __push_leaf_right()
3185 push_space = btrfs_item_data_end(left, left_nritems - push_items); in __push_leaf_right()
3197 memmove_leaf_items(right, push_items, 0, right_nritems); in __push_leaf_right()
3200 copy_leaf_items(right, left, 0, left_nritems - push_items, push_items); in __push_leaf_right()
3203 right_nritems += push_items; in __push_leaf_right()
3211 left_nritems -= push_items; in __push_leaf_right()
3343 int push_items = 0; in __push_leaf_left() local
3356 if (!empty && push_items > 0) { in __push_leaf_left()
3375 push_items++; in __push_leaf_left()
3379 if (push_items == 0) { in __push_leaf_left()
3383 WARN_ON(!empty && push_items == btrfs_header_nritems(right)); in __push_leaf_left()
3386 copy_leaf_items(left, right, btrfs_header_nritems(left), 0, push_items); in __push_leaf_left()
3389 btrfs_item_offset(right, push_items - 1); in __push_leaf_left()
3392 btrfs_item_offset(right, push_items - 1), push_space); in __push_leaf_left()
3397 for (i = old_left_nritems; i < old_left_nritems + push_items; i++) { in __push_leaf_left()
3404 btrfs_set_header_nritems(left, old_left_nritems + push_items); in __push_leaf_left()
3407 if (unlikely(push_items > right_nritems)) { in __push_leaf_left()
3411 push_items, right_nritems); in __push_leaf_left()
3415 if (push_items < right_nritems) { in __push_leaf_left()
3416 push_space = btrfs_item_offset(right, push_items - 1) - in __push_leaf_left()
3422 memmove_leaf_items(right, 0, push_items, in __push_leaf_left()
3423 btrfs_header_nritems(right) - push_items); in __push_leaf_left()
3426 right_nritems -= push_items; in __push_leaf_left()
3444 if (path->slots[0] < push_items) { in __push_leaf_left()
3453 path->slots[0] -= push_items; in __push_leaf_left()