Lines Matching refs:push_items

3194 	int push_items = 0;  in push_node_left()  local
3201 push_items = BTRFS_NODEPTRS_PER_BLOCK(fs_info) - dst_nritems; in push_node_left()
3208 if (push_items <= 0) in push_node_left()
3212 push_items = min(src_nritems, push_items); in push_node_left()
3213 if (push_items < src_nritems) { in push_node_left()
3217 if (src_nritems - push_items < 8) { in push_node_left()
3218 if (push_items <= 8) in push_node_left()
3220 push_items -= 8; in push_node_left()
3224 push_items = min(src_nritems - 8, push_items); in push_node_left()
3227 push_items); in push_node_left()
3235 push_items * sizeof(struct btrfs_key_ptr)); in push_node_left()
3237 if (push_items < src_nritems) { in push_node_left()
3243 btrfs_node_key_ptr_offset(push_items), in push_node_left()
3244 (src_nritems - push_items) * in push_node_left()
3247 btrfs_set_header_nritems(src, src_nritems - push_items); in push_node_left()
3248 btrfs_set_header_nritems(dst, dst_nritems + push_items); in push_node_left()
3269 int push_items = 0; in balance_node_right() local
3280 push_items = BTRFS_NODEPTRS_PER_BLOCK(fs_info) - dst_nritems; in balance_node_right()
3281 if (push_items <= 0) in balance_node_right()
3292 if (max_push < push_items) in balance_node_right()
3293 push_items = max_push; in balance_node_right()
3295 ret = tree_mod_log_insert_move(dst, push_items, 0, dst_nritems); in balance_node_right()
3297 memmove_extent_buffer(dst, btrfs_node_key_ptr_offset(push_items), in balance_node_right()
3303 src_nritems - push_items, push_items); in balance_node_right()
3310 btrfs_node_key_ptr_offset(src_nritems - push_items), in balance_node_right()
3311 push_items * sizeof(struct btrfs_key_ptr)); in balance_node_right()
3313 btrfs_set_header_nritems(src, src_nritems - push_items); in balance_node_right()
3314 btrfs_set_header_nritems(dst, dst_nritems + push_items); in balance_node_right()
3587 int push_items = 0; in __push_leaf_right() local
3609 if (!empty && push_items > 0) { in __push_leaf_right()
3626 push_items++; in __push_leaf_right()
3633 if (push_items == 0) in __push_leaf_right()
3636 WARN_ON(!empty && push_items == left_nritems); in __push_leaf_right()
3641 push_space = btrfs_item_end_nr(left, left_nritems - push_items); in __push_leaf_right()
3657 memmove_extent_buffer(right, btrfs_item_nr_offset(push_items), in __push_leaf_right()
3663 btrfs_item_nr_offset(left_nritems - push_items), in __push_leaf_right()
3664 push_items * sizeof(struct btrfs_item)); in __push_leaf_right()
3667 right_nritems += push_items; in __push_leaf_right()
3676 left_nritems -= push_items; in __push_leaf_right()
3813 int push_items = 0; in __push_leaf_left() local
3832 if (!empty && push_items > 0) { in __push_leaf_left()
3849 push_items++; in __push_leaf_left()
3853 if (push_items == 0) { in __push_leaf_left()
3857 WARN_ON(!empty && push_items == btrfs_header_nritems(right)); in __push_leaf_left()
3863 push_items * sizeof(struct btrfs_item)); in __push_leaf_left()
3866 btrfs_item_offset_nr(right, push_items - 1); in __push_leaf_left()
3871 btrfs_item_offset_nr(right, push_items - 1), in __push_leaf_left()
3877 for (i = old_left_nritems; i < old_left_nritems + push_items; i++) { in __push_leaf_left()
3887 btrfs_set_header_nritems(left, old_left_nritems + push_items); in __push_leaf_left()
3890 if (push_items > right_nritems) in __push_leaf_left()
3891 WARN(1, KERN_CRIT "push items %d nr %u\n", push_items, in __push_leaf_left()
3894 if (push_items < right_nritems) { in __push_leaf_left()
3895 push_space = btrfs_item_offset_nr(right, push_items - 1) - in __push_leaf_left()
3903 btrfs_item_nr_offset(push_items), in __push_leaf_left()
3904 (btrfs_header_nritems(right) - push_items) * in __push_leaf_left()
3907 right_nritems -= push_items; in __push_leaf_left()
3928 if (path->slots[0] < push_items) { in __push_leaf_left()
3937 path->slots[0] -= push_items; in __push_leaf_left()