Lines Matching refs:push_items

3197 	int push_items = 0;  in push_node_left()  local
3204 push_items = BTRFS_NODEPTRS_PER_BLOCK(root) - dst_nritems; in push_node_left()
3211 if (push_items <= 0) in push_node_left()
3215 push_items = min(src_nritems, push_items); in push_node_left()
3216 if (push_items < src_nritems) { in push_node_left()
3220 if (src_nritems - push_items < 8) { in push_node_left()
3221 if (push_items <= 8) in push_node_left()
3223 push_items -= 8; in push_node_left()
3227 push_items = min(src_nritems - 8, push_items); in push_node_left()
3230 push_items); in push_node_left()
3238 push_items * sizeof(struct btrfs_key_ptr)); in push_node_left()
3240 if (push_items < src_nritems) { in push_node_left()
3246 btrfs_node_key_ptr_offset(push_items), in push_node_left()
3247 (src_nritems - push_items) * in push_node_left()
3250 btrfs_set_header_nritems(src, src_nritems - push_items); in push_node_left()
3251 btrfs_set_header_nritems(dst, dst_nritems + push_items); in push_node_left()
3272 int push_items = 0; in balance_node_right() local
3283 push_items = BTRFS_NODEPTRS_PER_BLOCK(root) - dst_nritems; in balance_node_right()
3284 if (push_items <= 0) in balance_node_right()
3295 if (max_push < push_items) in balance_node_right()
3296 push_items = max_push; in balance_node_right()
3298 tree_mod_log_eb_move(root->fs_info, dst, push_items, 0, dst_nritems); in balance_node_right()
3299 memmove_extent_buffer(dst, btrfs_node_key_ptr_offset(push_items), in balance_node_right()
3305 src_nritems - push_items, push_items); in balance_node_right()
3312 btrfs_node_key_ptr_offset(src_nritems - push_items), in balance_node_right()
3313 push_items * sizeof(struct btrfs_key_ptr)); in balance_node_right()
3315 btrfs_set_header_nritems(src, src_nritems - push_items); in balance_node_right()
3316 btrfs_set_header_nritems(dst, dst_nritems + push_items); in balance_node_right()
3607 int push_items = 0; in __push_leaf_right() local
3629 if (!empty && push_items > 0) { in __push_leaf_right()
3646 push_items++; in __push_leaf_right()
3653 if (push_items == 0) in __push_leaf_right()
3656 WARN_ON(!empty && push_items == left_nritems); in __push_leaf_right()
3661 push_space = btrfs_item_end_nr(left, left_nritems - push_items); in __push_leaf_right()
3677 memmove_extent_buffer(right, btrfs_item_nr_offset(push_items), in __push_leaf_right()
3683 btrfs_item_nr_offset(left_nritems - push_items), in __push_leaf_right()
3684 push_items * sizeof(struct btrfs_item)); in __push_leaf_right()
3687 right_nritems += push_items; in __push_leaf_right()
3696 left_nritems -= push_items; in __push_leaf_right()
3829 int push_items = 0; in __push_leaf_left() local
3848 if (!empty && push_items > 0) { in __push_leaf_left()
3865 push_items++; in __push_leaf_left()
3869 if (push_items == 0) { in __push_leaf_left()
3873 WARN_ON(!empty && push_items == btrfs_header_nritems(right)); in __push_leaf_left()
3879 push_items * sizeof(struct btrfs_item)); in __push_leaf_left()
3882 btrfs_item_offset_nr(right, push_items - 1); in __push_leaf_left()
3887 btrfs_item_offset_nr(right, push_items - 1), in __push_leaf_left()
3893 for (i = old_left_nritems; i < old_left_nritems + push_items; i++) { in __push_leaf_left()
3903 btrfs_set_header_nritems(left, old_left_nritems + push_items); in __push_leaf_left()
3906 if (push_items > right_nritems) in __push_leaf_left()
3907 WARN(1, KERN_CRIT "push items %d nr %u\n", push_items, in __push_leaf_left()
3910 if (push_items < right_nritems) { in __push_leaf_left()
3911 push_space = btrfs_item_offset_nr(right, push_items - 1) - in __push_leaf_left()
3919 btrfs_item_nr_offset(push_items), in __push_leaf_left()
3920 (btrfs_header_nritems(right) - push_items) * in __push_leaf_left()
3923 right_nritems -= push_items; in __push_leaf_left()
3944 if (path->slots[0] < push_items) { in __push_leaf_left()
3953 path->slots[0] -= push_items; in __push_leaf_left()