Lines Matching full:extent
31 * Initialize the extent tree @tree. Should be called for each new inode or
72 /* Do the math around the end of an extent, handling wrapping. */
170 * Previous extent map found, return as in this case the caller does not in tree_search()
238 * extent maps of 2 (or more) adjacent extents merged, so factor it out. in mergeable_maps()
254 * @prev: left extent to merge
255 * @next: right extent to merge
256 * @merged: the extent we will not discard after the merge; updated with new values
258 * After this, one of the two extents is the new merged extent and the other is
263 * For now only uncompressed regular extent can be merged.
279 * 1) They are referring to the same data extent: in merge_ondisk_extents()
281 * |<----- data extent A ----->| in merge_ondisk_extents()
286 * |<-- data extent A -->|<-- data extent B -->| in merge_ondisk_extents()
292 * For case 1), the merged data extent would be the same. in merge_ondisk_extents()
361 * We can't modify an extent map that is in the tree and that is being in try_merge_map()
364 * the tree and 1 for this task (which is unpinning the extent map or in try_merge_map()
409 * Unpin an extent from the cache.
411 * @inode: the inode from which we are unpinning an extent range
413 * @len: length of the extent
414 * @gen: generation that this extent has been modified in
416 * Called after an extent has been written to disk properly. Set the generation
418 * we need to sync this extent when we call fsync().
421 * -ENOENT when the extent is not found in the tree
422 * -EUCLEAN if the found extent does not match the expected start
436 "no extent map found for inode %llu (root %lld) when unpinning extent range [%llu, %llu), generatio… in btrfs_unpin_extent_cache()
445 "found extent map for inode %llu (root %lld) with unexpected start offset %llu when unpinning exten… in btrfs_unpin_extent_cache()
488 * Add a new extent map to an inode's extent map tree.
493 * modified list, which indicates the extent needs to be logged
495 * Insert @em into the @inode's extent map tree or perform a simple
567 * Find a nearby extent map intersecting @start + @len (not an exact search).
576 * If one can't be found, any nearby extent may be returned
585 * Remove an extent_map from its inode's extent tree.
587 * @inode: the inode the extent map belongs to
588 * @em: extent map being removed
590 * Remove @em from the extent tree of @inode. No reference counts are dropped,
649 * Helper for btrfs_get_extent. Given an existing extent in the tree,
650 * the existing extent is the nearest extent to map_start,
651 * and an extent that you want to insert, deal with overlap and insert
652 * the best fitted new extent into the tree.
689 * Add extent mapping into an inode's extent map tree.
692 * @em_in: extent we are inserting
699 * Insert @em_in into the inode's extent map tree. In case there is an
701 * a) Returning the existing extent in @em_in if @start is within the
703 * b) Merge the existing extent with @em_in passed in.
716 * Tree-checker should have rejected any inline extent with non-zero in btrfs_add_extent_mapping()
723 /* it is possible that someone inserted the extent into the tree in btrfs_add_extent_mapping()
736 * extent causing the -EEXIST. in btrfs_add_extent_mapping()
748 * The existing extent map is the one nearest to in btrfs_add_extent_mapping()
756 "extent map merge error existing [%llu, %llu) with em [%llu, %llu) start %llu", in btrfs_add_extent_mapping()
769 * Drop all extent maps from a tree in the fastest possible way, rescheduling
771 * extent map, before each deletion.
798 * Drop all extent maps in a given range.
803 * @skip_pinned: Indicate if pinned extent maps should be ignored or not.
805 * This drops all the extent maps that intersect the given range [@start, @end].
806 * Extent maps that partially overlap the range and extend behind or beyond it,
833 * It's ok if we fail to allocate the extent maps, see the comment near in btrfs_drop_extent_map_range()
834 * the bottom of the loop below. We only need two spare extent maps in in btrfs_drop_extent_map_range()
835 * the worst case, where the first extent map that intersects our range in btrfs_drop_extent_map_range()
836 * starts before the range and the last extent map that intersects our in btrfs_drop_extent_map_range()
837 * range ends after our range (and they might be the same extent map), in btrfs_drop_extent_map_range()
838 * because we need to split those two extent maps at the boundaries. in btrfs_drop_extent_map_range()
871 * In case we split the extent map, we want to preserve the in btrfs_drop_extent_map_range()
872 * EXTENT_FLAG_LOGGING flag on our extent map, but we don't want in btrfs_drop_extent_map_range()
873 * it on the new extent maps. in btrfs_drop_extent_map_range()
879 * The extent map does not cross our target range, so no need to in btrfs_drop_extent_map_range()
956 * If the extent map is still in the tree it means that in btrfs_drop_extent_map_range()
963 * range, and we were not able to allocate the extent in btrfs_drop_extent_map_range()
967 * extent map - this is fine since if anyone needs it to in btrfs_drop_extent_map_range()
969 * load it again from the subvolume tree's file extent in btrfs_drop_extent_map_range()
970 * item. However if the extent map was in the list of in btrfs_drop_extent_map_range()
973 * extent if it's new and needs to be logged. in btrfs_drop_extent_map_range()
984 * extent map from the tree). in btrfs_drop_extent_map_range()
1001 * Replace a range in the inode's extent map tree with a new extent map.
1004 * @new_em: The new extent map to add to the inode's extent map tree.
1005 * @modified: Indicate if the new extent map should be added to the list of
1008 * Drops all the extent maps in the inode's extent map tree that intersect the
1009 * range of the new extent map and adds the new extent map to the tree.
1025 * tree, but getting -EEXIST when adding the new extent map can still in btrfs_replace_extent_map_range()
1027 * this is due to two tasks operating on different parts of the extent. in btrfs_replace_extent_map_range()
1147 * in case we have to remove extent maps in the tree's list of modified in btrfs_scan_inode()
1156 * we are holding the extent map tree's lock in write mode. in btrfs_scan_inode()
1231 * Skip inode if it doesn't have loaded extent maps, so we avoid in find_first_inode_to_shrink()
1234 * files with all extent maps previously released through the in find_first_inode_to_shrink()
1236 * a previous run, or directories which never have extent maps. in find_first_inode_to_shrink()
1375 * nr_to_scan extent maps (or less). In case we need to free more than in btrfs_free_extent_maps()
1377 * not doing enough work to reclaim memory from extent maps. in btrfs_free_extent_maps()