Lines Matching refs:slots
216 p->slots[i] = 0; in btrfs_release_path()
931 int orig_slot = path->slots[level]; in balance_level()
945 pslot = path->slots[level + 1]; in balance_level()
1157 path->slots[level + 1] -= 1; in balance_level()
1158 path->slots[level] = orig_slot; in balance_level()
1165 path->slots[level] = orig_slot; in balance_level()
1170 btrfs_node_blockptr(path->nodes[level], path->slots[level])) in balance_level()
1201 int orig_slot = path->slots[level]; in push_nodes_for_insert()
1211 pslot = path->slots[level + 1]; in push_nodes_for_insert()
1258 path->slots[level + 1] -= 1; in push_nodes_for_insert()
1259 path->slots[level] = orig_slot; in push_nodes_for_insert()
1265 path->slots[level] = orig_slot; in push_nodes_for_insert()
1319 path->slots[level + 1] += 1; in push_nodes_for_insert()
1320 path->slots[level] = orig_slot - in push_nodes_for_insert()
1434 slot = path->slots[level + 1]; in reada_for_balance()
1471 if (path->slots[i] == 0) { in unlock_up()
1480 if (nritems < 1 || path->slots[i] >= nritems - 1) { in unlock_up()
1731 if (ret && path->slots[0] >= btrfs_header_nritems(eb)) { in btrfs_find_item()
1738 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item()
1843 const int slot = path->slots[i]; in finish_need_commit_sem_search()
1860 path->slots[i] = slot; in finish_need_commit_sem_search()
1969 path->slots[0] = 0; in search_leaf()
1976 prev_cmp, &path->slots[0]); in search_leaf()
2158 p->slots[level + 1], &b, in btrfs_search_slot()
2208 p->slots[level] = slot; in btrfs_search_slot()
2218 slot = p->slots[level]; in btrfs_search_slot()
2236 p->slots[level]++; in btrfs_search_slot()
2349 p->slots[level] = slot; in btrfs_search_old_slot()
2358 p->slots[level] = slot; in btrfs_search_old_slot()
2363 p->slots[level]++; in btrfs_search_old_slot()
2441 if (path->slots[0] < btrfs_header_nritems(path->nodes[0])) { in btrfs_prev_leaf()
2442 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf()
2445 if (path->slots[0] > 0) { in btrfs_prev_leaf()
2446 path->slots[0]--; in btrfs_prev_leaf()
2508 if (p->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_search_slot_for_read()
2524 if (p->slots[0] == 0) { in btrfs_search_slot_for_read()
2530 if (p->slots[0] == btrfs_header_nritems(leaf)) in btrfs_search_slot_for_read()
2531 p->slots[0]--; in btrfs_search_slot_for_read()
2545 --p->slots[0]; in btrfs_search_slot_for_read()
2567 btrfs_item_key_to_cpu(path->nodes[0], key, path->slots[0]); in btrfs_search_backwards()
2586 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { in btrfs_get_next_valid_item()
2594 btrfs_item_key_to_cpu(path->nodes[0], key, path->slots[0]); in btrfs_get_next_valid_item()
2615 int tslot = path->slots[i]; in fixup_low_keys()
2646 slot = path->slots[0]; in btrfs_set_item_key_safe()
2959 path->slots[level] = 0; in insert_new_root()
3095 path->slots[level + 1] + 1, level + 1); in split_node()
3102 if (path->slots[level] >= mid) { in split_node()
3103 path->slots[level] -= mid; in split_node()
3107 path->slots[level + 1] += 1; in split_node()
3187 if (path->slots[0] >= left_nritems) in __push_leaf_right()
3190 slot = path->slots[1]; in __push_leaf_right()
3194 if (path->slots[0] > i) in __push_leaf_right()
3196 if (path->slots[0] == i) { in __push_leaf_right()
3204 if (path->slots[0] == i) in __push_leaf_right()
3269 if (path->slots[0] >= left_nritems) { in __push_leaf_right()
3270 path->slots[0] -= left_nritems; in __push_leaf_right()
3276 path->slots[1] += 1; in __push_leaf_right()
3315 slot = path->slots[1]; in push_leaf_right()
3348 if (path->slots[0] == left_nritems && !empty) { in push_leaf_right()
3356 path->slots[0] = 0; in push_leaf_right()
3357 path->slots[1]++; in push_leaf_right()
3403 if (path->slots[0] < i) in __push_leaf_left()
3405 if (path->slots[0] == i) { in __push_leaf_left()
3413 if (path->slots[0] == i) in __push_leaf_left()
3488 if (path->slots[0] < push_items) { in __push_leaf_left()
3489 path->slots[0] += old_left_nritems; in __push_leaf_left()
3493 path->slots[1] -= 1; in __push_leaf_left()
3497 path->slots[0] -= push_items; in __push_leaf_left()
3499 BUG_ON(path->slots[0] < 0); in __push_leaf_left()
3526 slot = path->slots[1]; in push_leaf_left()
3612 ret = insert_ptr(trans, path, &disk_key, right->start, path->slots[1] + 1, 1); in copy_for_split()
3618 BUG_ON(path->slots[0] != slot); in copy_for_split()
3624 path->slots[0] -= mid; in copy_for_split()
3625 path->slots[1] += 1; in copy_for_split()
3631 BUG_ON(path->slots[0] < 0); in copy_for_split()
3657 slot = path->slots[0]; in push_for_double_split()
3677 if (path->slots[0] == 0 || path->slots[0] == nritems) in push_for_double_split()
3684 slot = path->slots[0]; in push_for_double_split()
3726 slot = path->slots[0]; in split_leaf()
3766 slot = path->slots[0]; in split_leaf()
3833 right->start, path->slots[1] + 1, 1); in split_leaf()
3842 path->slots[0] = 0; in split_leaf()
3843 path->slots[1] += 1; in split_leaf()
3847 right->start, path->slots[1], 1); in split_leaf()
3856 path->slots[0] = 0; in split_leaf()
3857 if (path->slots[1] == 0) in split_leaf()
3903 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in setup_leaf_for_split()
3911 item_size = btrfs_item_size(leaf, path->slots[0]); in setup_leaf_for_split()
3913 fi = btrfs_item_ptr(leaf, path->slots[0], in setup_leaf_for_split()
3931 if (item_size != btrfs_item_size(leaf, path->slots[0])) in setup_leaf_for_split()
3939 fi = btrfs_item_ptr(leaf, path->slots[0], in setup_leaf_for_split()
3978 orig_slot = path->slots[0]; in split_item()
3979 orig_offset = btrfs_item_offset(leaf, path->slots[0]); in split_item()
3980 item_size = btrfs_item_size(leaf, path->slots[0]); in split_item()
3987 path->slots[0]), item_size); in split_item()
3989 slot = path->slots[0] + 1; in split_item()
4010 btrfs_item_ptr_offset(leaf, path->slots[0]), in split_item()
4075 slot = path->slots[0]; in btrfs_truncate_item()
4174 slot = path->slots[0]; in btrfs_extend_item()
4242 if (path->slots[0] == 0) { in setup_items_for_insert()
4249 slot = path->slots[0]; in setup_items_for_insert()
4360 slot = path->slots[0]; in btrfs_insert_empty_items()
4386 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); in btrfs_insert_item()
4412 item_size = btrfs_item_size(leaf, path->slots[0]); in btrfs_duplicate_item()
4418 path->slots[0]++; in btrfs_duplicate_item()
4422 btrfs_item_ptr_offset(leaf, path->slots[0]), in btrfs_duplicate_item()
4423 btrfs_item_ptr_offset(leaf, path->slots[0] - 1), in btrfs_duplicate_item()
4501 ret = btrfs_del_ptr(trans, root, path, 1, path->slots[1]); in btrfs_del_leaf()
4597 slot = path->slots[1]; in btrfs_del_items()
4631 path->slots[1] = slot; in btrfs_del_items()
4713 path->slots[level] = slot; in btrfs_search_forward()
4739 path->slots[level] = slot; in btrfs_search_forward()
4751 path->slots[level] = slot; in btrfs_search_forward()
4799 slot = path->slots[level] + 1; in btrfs_find_next_key()
4831 slot = path->slots[level]; in btrfs_find_next_key()
4915 if (nritems > 0 && path->slots[0] < nritems - 1) { in btrfs_next_old_leaf()
4917 path->slots[0]++; in btrfs_next_old_leaf()
4935 if (nritems > 0 && ret > 0 && path->slots[0] == nritems - 1) { in btrfs_next_old_leaf()
4946 slot = path->slots[level] + 1; in btrfs_next_old_leaf()
5006 path->slots[level] = slot; in btrfs_next_old_leaf()
5010 path->slots[level] = 0; in btrfs_next_old_leaf()
5054 path->slots[0]++; in btrfs_next_old_item()
5055 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) in btrfs_next_old_item()
5076 if (path->slots[0] == 0) { in btrfs_previous_item()
5081 path->slots[0]--; in btrfs_previous_item()
5087 if (path->slots[0] == nritems) in btrfs_previous_item()
5088 path->slots[0]--; in btrfs_previous_item()
5090 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_previous_item()
5117 if (path->slots[0] == 0) { in btrfs_previous_extent_item()
5122 path->slots[0]--; in btrfs_previous_extent_item()
5128 if (path->slots[0] == nritems) in btrfs_previous_extent_item()
5129 path->slots[0]--; in btrfs_previous_extent_item()
5131 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_previous_extent_item()