Lines Matching full:merge
209 /* Don't merge compressed extents, we need to know their actual size. */ in can_merge_extent_map()
217 * We don't want to merge stuff that hasn't been written to the log yet in can_merge_extent_map()
227 /* Check to see if two extent_map structs are adjacent and safe to merge. */
249 * Handle the on-disk data extents merge for @prev and @next.
251 * @prev: left extent to merge
252 * @next: right extent to merge
253 * @merged: the extent we will not discard after the merge; updated with new values
290 * For case 2), we just merge the two data extents into one. in merge_ondisk_extents()
343 struct extent_map *merge = NULL; in try_merge_map() local
363 merge = rb_entry(rb, struct extent_map, rb_node); in try_merge_map()
364 if (rb && can_merge_extent_map(merge) && mergeable_maps(merge, em)) { in try_merge_map()
365 em->start = merge->start; in try_merge_map()
366 em->len += merge->len; in try_merge_map()
367 em->generation = max(em->generation, merge->generation); in try_merge_map()
370 merge_ondisk_extents(merge, em, em); in try_merge_map()
374 rb_erase(&merge->rb_node, &tree->root); in try_merge_map()
375 RB_CLEAR_NODE(&merge->rb_node); in try_merge_map()
376 free_extent_map(merge); in try_merge_map()
383 merge = rb_entry(rb, struct extent_map, rb_node); in try_merge_map()
384 if (rb && can_merge_extent_map(merge) && mergeable_maps(em, merge)) { in try_merge_map()
385 em->len += merge->len; in try_merge_map()
387 merge_ondisk_extents(em, merge, em); in try_merge_map()
389 rb_erase(&merge->rb_node, &tree->root); in try_merge_map()
390 RB_CLEAR_NODE(&merge->rb_node); in try_merge_map()
391 em->generation = max(em->generation, merge->generation); in try_merge_map()
393 free_extent_map(merge); in try_merge_map()
486 * forward/backward merge with existing mappings. The extent_map struct passed
488 * taken, or a reference dropped if the merge attempt was successful.
696 * b) Merge the existing extent with @em_in passed in.
749 "extent map merge error existing [%llu, %llu) with em [%llu, %llu) start %llu", in btrfs_add_extent_mapping()