Lines Matching refs:slots
216 p->slots[i] = 0; in btrfs_release_path()
1070 int orig_slot = path->slots[level]; in balance_level()
1084 pslot = path->slots[level + 1]; in balance_level()
1296 path->slots[level + 1] -= 1; in balance_level()
1297 path->slots[level] = orig_slot; in balance_level()
1304 path->slots[level] = orig_slot; in balance_level()
1309 btrfs_node_blockptr(path->nodes[level], path->slots[level])) in balance_level()
1340 int orig_slot = path->slots[level]; in push_nodes_for_insert()
1350 pslot = path->slots[level + 1]; in push_nodes_for_insert()
1397 path->slots[level + 1] -= 1; in push_nodes_for_insert()
1398 path->slots[level] = orig_slot; in push_nodes_for_insert()
1404 path->slots[level] = orig_slot; in push_nodes_for_insert()
1458 path->slots[level + 1] += 1; in push_nodes_for_insert()
1459 path->slots[level] = orig_slot - in push_nodes_for_insert()
1573 slot = path->slots[level + 1]; in reada_for_balance()
1610 if (path->slots[i] == 0) { in unlock_up()
1619 if (nritems < 1 || path->slots[i] >= nritems - 1) { in unlock_up()
1839 if (ret && path->slots[0] >= btrfs_header_nritems(eb)) { in btrfs_find_item()
1846 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item()
1951 const int slot = path->slots[i]; in finish_need_commit_sem_search()
1968 path->slots[i] = slot; in finish_need_commit_sem_search()
2077 path->slots[0] = 0; in search_leaf()
2084 prev_cmp, &path->slots[0]); in search_leaf()
2266 p->slots[level + 1], &b, in btrfs_search_slot()
2316 p->slots[level] = slot; in btrfs_search_slot()
2326 slot = p->slots[level]; in btrfs_search_slot()
2344 p->slots[level]++; in btrfs_search_slot()
2457 p->slots[level] = slot; in btrfs_search_old_slot()
2466 p->slots[level] = slot; in btrfs_search_old_slot()
2471 p->slots[level]++; in btrfs_search_old_slot()
2549 if (path->slots[0] < btrfs_header_nritems(path->nodes[0])) { in btrfs_prev_leaf()
2550 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf()
2553 if (path->slots[0] > 0) { in btrfs_prev_leaf()
2554 path->slots[0]--; in btrfs_prev_leaf()
2616 if (p->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_search_slot_for_read()
2632 if (p->slots[0] == 0) { in btrfs_search_slot_for_read()
2638 if (p->slots[0] == btrfs_header_nritems(leaf)) in btrfs_search_slot_for_read()
2639 p->slots[0]--; in btrfs_search_slot_for_read()
2653 --p->slots[0]; in btrfs_search_slot_for_read()
2675 btrfs_item_key_to_cpu(path->nodes[0], key, path->slots[0]); in btrfs_search_backwards()
2694 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in btrfs_get_next_valid_item()
2702 btrfs_item_key_to_cpu(path->nodes[0], key, path->slots[0]); in btrfs_get_next_valid_item()
2723 int tslot = path->slots[i]; in fixup_low_keys()
2754 slot = path->slots[0]; in btrfs_set_item_key_safe()
3068 path->slots[level] = 0; in insert_new_root()
3204 path->slots[level + 1] + 1, level + 1); in split_node()
3211 if (path->slots[level] >= mid) { in split_node()
3212 path->slots[level] -= mid; in split_node()
3216 path->slots[level + 1] += 1; in split_node()
3296 if (path->slots[0] >= left_nritems) in __push_leaf_right()
3299 slot = path->slots[1]; in __push_leaf_right()
3303 if (path->slots[0] > i) in __push_leaf_right()
3305 if (path->slots[0] == i) { in __push_leaf_right()
3313 if (path->slots[0] == i) in __push_leaf_right()
3378 if (path->slots[0] >= left_nritems) { in __push_leaf_right()
3379 path->slots[0] -= left_nritems; in __push_leaf_right()
3385 path->slots[1] += 1; in __push_leaf_right()
3424 slot = path->slots[1]; in push_leaf_right()
3457 if (path->slots[0] == left_nritems && !empty) { in push_leaf_right()
3465 path->slots[0] = 0; in push_leaf_right()
3466 path->slots[1]++; in push_leaf_right()
3512 if (path->slots[0] < i) in __push_leaf_left()
3514 if (path->slots[0] == i) { in __push_leaf_left()
3522 if (path->slots[0] == i) in __push_leaf_left()
3597 if (path->slots[0] < push_items) { in __push_leaf_left()
3598 path->slots[0] += old_left_nritems; in __push_leaf_left()
3602 path->slots[1] -= 1; in __push_leaf_left()
3606 path->slots[0] -= push_items; in __push_leaf_left()
3608 BUG_ON(path->slots[0] < 0); in __push_leaf_left()
3635 slot = path->slots[1]; in push_leaf_left()
3721 ret = insert_ptr(trans, path, &disk_key, right->start, path->slots[1] + 1, 1); in copy_for_split()
3727 BUG_ON(path->slots[0] != slot); in copy_for_split()
3733 path->slots[0] -= mid; in copy_for_split()
3734 path->slots[1] += 1; in copy_for_split()
3740 BUG_ON(path->slots[0] < 0); in copy_for_split()
3766 slot = path->slots[0]; in push_for_double_split()
3786 if (path->slots[0] == 0 || path->slots[0] == nritems) in push_for_double_split()
3793 slot = path->slots[0]; in push_for_double_split()
3835 slot = path->slots[0]; in split_leaf()
3875 slot = path->slots[0]; in split_leaf()
3942 right->start, path->slots[1] + 1, 1); in split_leaf()
3951 path->slots[0] = 0; in split_leaf()
3952 path->slots[1] += 1; in split_leaf()
3956 right->start, path->slots[1], 1); in split_leaf()
3965 path->slots[0] = 0; in split_leaf()
3966 if (path->slots[1] == 0) in split_leaf()
4012 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in setup_leaf_for_split()
4020 item_size = btrfs_item_size(leaf, path->slots[0]); in setup_leaf_for_split()
4022 fi = btrfs_item_ptr(leaf, path->slots[0], in setup_leaf_for_split()
4040 if (item_size != btrfs_item_size(leaf, path->slots[0])) in setup_leaf_for_split()
4048 fi = btrfs_item_ptr(leaf, path->slots[0], in setup_leaf_for_split()
4087 orig_slot = path->slots[0]; in split_item()
4088 orig_offset = btrfs_item_offset(leaf, path->slots[0]); in split_item()
4089 item_size = btrfs_item_size(leaf, path->slots[0]); in split_item()
4096 path->slots[0]), item_size); in split_item()
4098 slot = path->slots[0] + 1; in split_item()
4119 btrfs_item_ptr_offset(leaf, path->slots[0]), in split_item()
4184 slot = path->slots[0]; in btrfs_truncate_item()
4283 slot = path->slots[0]; in btrfs_extend_item()
4351 if (path->slots[0] == 0) { in setup_items_for_insert()
4358 slot = path->slots[0]; in setup_items_for_insert()
4465 slot = path->slots[0]; in btrfs_insert_empty_items()
4491 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_insert_item()
4517 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_duplicate_item()
4523 path->slots[0]++; in btrfs_duplicate_item()
4527 btrfs_item_ptr_offset(leaf, path->slots[0]), in btrfs_duplicate_item()
4528 btrfs_item_ptr_offset(leaf, path->slots[0] - 1), in btrfs_duplicate_item()
4606 ret = btrfs_del_ptr(trans, root, path, 1, path->slots[1]); in btrfs_del_leaf()
4702 slot = path->slots[1]; in btrfs_del_items()
4736 path->slots[1] = slot; in btrfs_del_items()
4818 path->slots[level] = slot; in btrfs_search_forward()
4844 path->slots[level] = slot; in btrfs_search_forward()
4856 path->slots[level] = slot; in btrfs_search_forward()
4904 slot = path->slots[level] + 1; in btrfs_find_next_key()
4936 slot = path->slots[level]; in btrfs_find_next_key()
5020 if (nritems > 0 && path->slots[0] < nritems - 1) { in btrfs_next_old_leaf()
5022 path->slots[0]++; in btrfs_next_old_leaf()
5040 if (nritems > 0 && ret > 0 && path->slots[0] == nritems - 1) { in btrfs_next_old_leaf()
5051 slot = path->slots[level] + 1; in btrfs_next_old_leaf()
5112 path->slots[level] = slot; in btrfs_next_old_leaf()
5116 path->slots[level] = 0; in btrfs_next_old_leaf()
5161 path->slots[0]++; in btrfs_next_old_item()
5162 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) in btrfs_next_old_item()
5183 if (path->slots[0] == 0) { in btrfs_previous_item()
5188 path->slots[0]--; in btrfs_previous_item()
5194 if (path->slots[0] == nritems) in btrfs_previous_item()
5195 path->slots[0]--; in btrfs_previous_item()
5197 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_previous_item()
5224 if (path->slots[0] == 0) { in btrfs_previous_extent_item()
5229 path->slots[0]--; in btrfs_previous_extent_item()
5235 if (path->slots[0] == nritems) in btrfs_previous_extent_item()
5236 path->slots[0]--; in btrfs_previous_extent_item()
5238 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_previous_extent_item()