19 #include <linux/sched.h>
47 if (root->
fs_info->extent_root == root) {
55 if (root->
ref_cows == 0 && !is_extent)
65 level = btrfs_header_level(root->
node);
75 btrfs_set_lock_blocking(root_node);
76 nritems = btrfs_header_nritems(root_node);
79 btrfs_node_key_to_cpu(root_node, &root->
defrag_max,
83 memset(&key, 0,
sizeof(key));
93 cache_only, min_trans);
107 if (!path->
nodes[1]) {
111 path->
slots[1] = btrfs_header_nritems(path->
nodes[1]);
116 cache_only, &last_ret,
122 if (next_key_ret == 0) {