Lines Matching full:split

703  * are split.
710 struct extent_map *split; in btrfs_drop_extent_map_range() local
734 * because we need to split those two extent maps at the boundaries. in btrfs_drop_extent_map_range()
736 split = alloc_extent_map(); in btrfs_drop_extent_map_range()
769 * In case we split the extent map, we want to preserve the in btrfs_drop_extent_map_range()
778 * split it, we can remove it directly. in btrfs_drop_extent_map_range()
787 if (!split) { in btrfs_drop_extent_map_range()
788 split = split2; in btrfs_drop_extent_map_range()
790 if (!split) in btrfs_drop_extent_map_range()
793 split->start = em->start; in btrfs_drop_extent_map_range()
794 split->len = start - em->start; in btrfs_drop_extent_map_range()
797 split->orig_start = em->orig_start; in btrfs_drop_extent_map_range()
798 split->block_start = em->block_start; in btrfs_drop_extent_map_range()
801 split->block_len = em->block_len; in btrfs_drop_extent_map_range()
803 split->block_len = split->len; in btrfs_drop_extent_map_range()
804 split->orig_block_len = max(split->block_len, in btrfs_drop_extent_map_range()
806 split->ram_bytes = em->ram_bytes; in btrfs_drop_extent_map_range()
808 split->orig_start = split->start; in btrfs_drop_extent_map_range()
809 split->block_len = 0; in btrfs_drop_extent_map_range()
810 split->block_start = em->block_start; in btrfs_drop_extent_map_range()
811 split->orig_block_len = 0; in btrfs_drop_extent_map_range()
812 split->ram_bytes = split->len; in btrfs_drop_extent_map_range()
815 split->generation = gen; in btrfs_drop_extent_map_range()
816 split->flags = flags; in btrfs_drop_extent_map_range()
817 split->compress_type = em->compress_type; in btrfs_drop_extent_map_range()
818 replace_extent_mapping(em_tree, em, split, modified); in btrfs_drop_extent_map_range()
819 free_extent_map(split); in btrfs_drop_extent_map_range()
820 split = split2; in btrfs_drop_extent_map_range()
824 if (!split) { in btrfs_drop_extent_map_range()
825 split = split2; in btrfs_drop_extent_map_range()
827 if (!split) in btrfs_drop_extent_map_range()
830 split->start = end; in btrfs_drop_extent_map_range()
831 split->len = em_end - end; in btrfs_drop_extent_map_range()
832 split->block_start = em->block_start; in btrfs_drop_extent_map_range()
833 split->flags = flags; in btrfs_drop_extent_map_range()
834 split->compress_type = em->compress_type; in btrfs_drop_extent_map_range()
835 split->generation = gen; in btrfs_drop_extent_map_range()
838 split->orig_block_len = max(em->block_len, in btrfs_drop_extent_map_range()
841 split->ram_bytes = em->ram_bytes; in btrfs_drop_extent_map_range()
843 split->block_len = em->block_len; in btrfs_drop_extent_map_range()
844 split->orig_start = em->orig_start; in btrfs_drop_extent_map_range()
848 split->block_len = split->len; in btrfs_drop_extent_map_range()
849 split->block_start += diff; in btrfs_drop_extent_map_range()
850 split->orig_start = em->orig_start; in btrfs_drop_extent_map_range()
853 split->ram_bytes = split->len; in btrfs_drop_extent_map_range()
854 split->orig_start = split->start; in btrfs_drop_extent_map_range()
855 split->block_len = 0; in btrfs_drop_extent_map_range()
856 split->orig_block_len = 0; in btrfs_drop_extent_map_range()
860 replace_extent_mapping(em_tree, em, split, in btrfs_drop_extent_map_range()
865 ret = add_extent_mapping(em_tree, split, in btrfs_drop_extent_map_range()
872 free_extent_map(split); in btrfs_drop_extent_map_range()
873 split = NULL; in btrfs_drop_extent_map_range()
886 * maps for split operations, @split and @split2. in btrfs_drop_extent_map_range()
898 ASSERT(!split); in btrfs_drop_extent_map_range()
918 free_extent_map(split); in btrfs_drop_extent_map_range()
964 * Split off the first pre bytes from the extent_map at [start, start + len],
967 * This function is used when an ordered_extent needs to be split.