Lines Matching refs:cur_level
2007 int cur_level = root_level;
2033 while (cur_level >= dst_level) {
2037 if (src_path->nodes[cur_level] == NULL) {
2044 eb = src_path->nodes[cur_level + 1];
2045 parent_slot = src_path->slots[cur_level + 1];
2051 cur_level, &first_key);
2061 src_path->nodes[cur_level] = eb;
2065 src_path->locks[cur_level] = BTRFS_READ_LOCK_BLOCKING;
2068 src_path->slots[cur_level] = dst_path->slots[cur_level];
2069 if (cur_level) {
2070 btrfs_node_key_to_cpu(dst_path->nodes[cur_level],
2071 &dst_key, dst_path->slots[cur_level]);
2072 btrfs_node_key_to_cpu(src_path->nodes[cur_level],
2073 &src_key, src_path->slots[cur_level]);
2075 btrfs_item_key_to_cpu(dst_path->nodes[cur_level],
2076 &dst_key, dst_path->slots[cur_level]);
2077 btrfs_item_key_to_cpu(src_path->nodes[cur_level],
2078 &src_key, src_path->slots[cur_level]);
2085 cur_level--;
2128 * @cur_level = 1
2139 int cur_level, int root_level,
2149 if (cur_level < 0 || cur_level >= BTRFS_MAX_LEVEL - 1 ||
2151 root_level < cur_level) {
2153 "%s: bad levels, cur_level=%d root_level=%d",
2154 __func__, cur_level, root_level);
2159 if (dst_path->nodes[cur_level] == NULL) {
2169 if (cur_level == root_level) {
2171 "%s: dst_path->nodes[%d] not initialized, root_level=%d cur_level=%d",
2172 __func__, root_level, root_level, cur_level);
2180 eb = dst_path->nodes[cur_level + 1];
2181 parent_slot = dst_path->slots[cur_level + 1];
2191 cur_level, &first_key);
2201 dst_path->nodes[cur_level] = eb;
2202 dst_path->slots[cur_level] = 0;
2206 dst_path->locks[cur_level] = BTRFS_READ_LOCK_BLOCKING;
2211 ret = qgroup_trace_extent_swap(trans, src_eb, dst_path, cur_level,
2216 eb = dst_path->nodes[cur_level];
2218 if (cur_level > 0) {
2224 dst_path->slots[cur_level] = i;
2228 dst_path, cur_level - 1, root_level,
2238 btrfs_tree_unlock_rw(dst_path->nodes[cur_level],
2239 dst_path->locks[cur_level]);
2240 free_extent_buffer(dst_path->nodes[cur_level]);
2241 dst_path->nodes[cur_level] = NULL;
2242 dst_path->slots[cur_level] = 0;
2243 dst_path->locks[cur_level] = 0;