Lines Matching refs:cur_level

2083 	int cur_level = root_level;
2109 while (cur_level >= dst_level) {
2113 if (src_path->nodes[cur_level] == NULL) {
2117 eb = src_path->nodes[cur_level + 1];
2118 parent_slot = src_path->slots[cur_level + 1];
2126 src_path->nodes[cur_level] = eb;
2129 src_path->locks[cur_level] = BTRFS_READ_LOCK;
2132 src_path->slots[cur_level] = dst_path->slots[cur_level];
2133 if (cur_level) {
2134 btrfs_node_key_to_cpu(dst_path->nodes[cur_level],
2135 &dst_key, dst_path->slots[cur_level]);
2136 btrfs_node_key_to_cpu(src_path->nodes[cur_level],
2137 &src_key, src_path->slots[cur_level]);
2139 btrfs_item_key_to_cpu(dst_path->nodes[cur_level],
2140 &dst_key, dst_path->slots[cur_level]);
2141 btrfs_item_key_to_cpu(src_path->nodes[cur_level],
2142 &src_key, src_path->slots[cur_level]);
2149 cur_level--;
2191 * @cur_level = 1
2202 int cur_level, int root_level,
2212 if (cur_level < 0 || cur_level >= BTRFS_MAX_LEVEL - 1 ||
2214 root_level < cur_level) {
2216 "%s: bad levels, cur_level=%d root_level=%d",
2217 __func__, cur_level, root_level);
2222 if (dst_path->nodes[cur_level] == NULL) {
2230 if (cur_level == root_level) {
2232 "%s: dst_path->nodes[%d] not initialized, root_level=%d cur_level=%d",
2233 __func__, root_level, root_level, cur_level);
2241 eb = dst_path->nodes[cur_level + 1];
2242 parent_slot = dst_path->slots[cur_level + 1];
2255 dst_path->nodes[cur_level] = eb;
2256 dst_path->slots[cur_level] = 0;
2259 dst_path->locks[cur_level] = BTRFS_READ_LOCK;
2264 ret = qgroup_trace_extent_swap(trans, src_eb, dst_path, cur_level,
2269 eb = dst_path->nodes[cur_level];
2271 if (cur_level > 0) {
2277 dst_path->slots[cur_level] = i;
2281 dst_path, cur_level - 1, root_level,
2291 btrfs_tree_unlock_rw(dst_path->nodes[cur_level],
2292 dst_path->locks[cur_level]);
2293 free_extent_buffer(dst_path->nodes[cur_level]);
2294 dst_path->nodes[cur_level] = NULL;
2295 dst_path->slots[cur_level] = 0;
2296 dst_path->locks[cur_level] = 0;