2 #include <linux/slab.h>
3 #include <linux/module.h>
17 if (!extent_map_cache)
60 INIT_LIST_HEAD(&em->
list);
98 else if (offset >= extent_map_end(entry))
106 rb_link_node(node, parent, p);
134 else if (offset >= extent_map_end(entry))
142 while (prev && offset >= extent_map_end(prev_entry)) {
174 if (extent_map_end(prev) == next->
start &&
184 next->
block_start == extent_map_block_end(prev)))) {
195 if (em->
start != 0) {
199 if (rb && mergable_maps(merge, em)) {
212 list_del_init(&merge->
list);
221 if (rb && mergable_maps(em, merge)) {
231 list_del_init(&merge->
list);
253 bool prealloc =
false;
274 try_merge_map(tree, em);
321 try_merge_map(tree, em);
329 if (start + len < start)
335 u64 start,
u64 len,
int strict)
339 struct rb_node *prev =
NULL;
340 struct rb_node *next =
NULL;
341 u64 end = range_end(start, len);
343 rb_node = __tree_search(&tree->
map, start, &prev, &next);
355 if (strict && !(end > em->
start && start < extent_map_end(em)))
411 list_del_init(&em->
list);