Lines Matching full:merge

193 /* check to see if two extent_map structs are adjacent and safe to merge */
200 * don't merge compressed extents, we need to know their in mergable_maps()
211 * We don't want to merge stuff that hasn't been written to the log yet in mergable_maps()
241 struct extent_map *merge = NULL; in try_merge_map() local
258 merge = rb_entry(rb, struct extent_map, rb_node); in try_merge_map()
259 if (rb && mergable_maps(merge, em)) { in try_merge_map()
260 em->start = merge->start; in try_merge_map()
261 em->orig_start = merge->orig_start; in try_merge_map()
262 em->len += merge->len; in try_merge_map()
263 em->block_len += merge->block_len; in try_merge_map()
264 em->block_start = merge->block_start; in try_merge_map()
265 em->mod_len = (em->mod_len + em->mod_start) - merge->mod_start; in try_merge_map()
266 em->mod_start = merge->mod_start; in try_merge_map()
267 em->generation = max(em->generation, merge->generation); in try_merge_map()
270 rb_erase_cached(&merge->rb_node, &tree->map); in try_merge_map()
271 RB_CLEAR_NODE(&merge->rb_node); in try_merge_map()
272 free_extent_map(merge); in try_merge_map()
278 merge = rb_entry(rb, struct extent_map, rb_node); in try_merge_map()
279 if (rb && mergable_maps(em, merge)) { in try_merge_map()
280 em->len += merge->len; in try_merge_map()
281 em->block_len += merge->block_len; in try_merge_map()
282 rb_erase_cached(&merge->rb_node, &tree->map); in try_merge_map()
283 RB_CLEAR_NODE(&merge->rb_node); in try_merge_map()
284 em->mod_len = (merge->mod_start + merge->mod_len) - em->mod_start; in try_merge_map()
285 em->generation = max(em->generation, merge->generation); in try_merge_map()
287 free_extent_map(merge); in try_merge_map()
403 * Insert @em into @tree or perform a simple forward/backward merge with
406 * reference dropped if the merge attempt was successful.
604 * b) Merge the existing extent with @em_in passed in.
653 "unexpected error %d: merge existing(start %llu len %llu) with em(start %llu len %llu)\n", in btrfs_add_extent_mapping()