Lines Matching defs:extent
35 #include "extent-tree.h"
111 * If an extent intersects the range but is not entirely inside the range
234 * Don't skip extent items representing 0 byte lengths. They
237 * delete it, otherwise we would insert a new file extent item
239 * extent item in the call to setup_items_for_insert() later
262 * | -------- extent -------- |
328 * | -------- extent -------- |
352 * | -------- extent -------- |
378 * | ------ extent ------ |
526 * Mark extent in the range start - end as written.
528 * This changes extent type from 'pre-allocated' to 'regular'. If only
529 * part of extent is marked as written, the extent will be split into
877 * Locks the extent and properly waits for data=ordered extents to finish
881 * 1 - the extent is locked
882 * 0 - the extent is not locked, and everything is OK
1004 * any extent against which we can NOCOW, so unlock the
1058 * extent we are going to write, so we will enospc out there. We don't
1315 * If we have not locked the extent range, because the range's start
1316 * offset is >= i_size, we might still have a non-NULL cached extent
1317 * state, acquired while marking the extent range as delalloc through
1318 * btrfs_dirty_page(). Therefore free any possible cached extent state
1525 * update the last_trans of the inode during ordered extent completion,
1541 * It needs to call filemap_fdatawait so that all ordered extent updates are
1573 * several problems, from missing file extent items to represent holes
1607 * 1) We log an extent after its writeback finishes but before its
1609 * when attempting to read the extent after a log replay.
1611 * 2) We can end up logging an extent before its writeback finishes.
1612 * Therefore after the log replay we will have a file extent item
1613 * pointing to an unwritten extent (and no data checksums as well).
1633 * extra extent map ranges due to temporary memory allocation failures.
1649 * logical address recorded in the ordered extent may change. We need
1672 * extents to complete so that any extent maps that point to
1766 * something like fallocate() that is holding the extent lock trying to
1831 * holes and correct delalloc and unwritten extent mapping on filesystems that
2173 * Find a hole extent on given inode and change start/len to the end of hole
2174 * extent.(hole/vacuum extent whose em->start <= start &&
2176 * When a hole extent is found, return 1 and modify start/len.
2190 /* Hole or vacuum extent(only exists in no-hole mode) */
2303 struct btrfs_file_extent_item *extent;
2330 extent = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);
2331 ASSERT(btrfs_file_extent_type(leaf, extent) != BTRFS_FILE_EXTENT_INLINE);
2332 btrfs_set_file_extent_offset(leaf, extent, extent_info->data_offset);
2333 btrfs_set_file_extent_num_bytes(leaf, extent, replace_len);
2335 btrfs_set_file_extent_generation(leaf, extent, trans->transid);
2384 * the file range with an extent.
2417 * 1 - adding the hole extent if no_holes isn't set or if we are
2418 * replacing the range with a new extent
2452 * attempting to clone a partial inline extent, in which
2486 * file extent is inserted here.
2524 * transaction we used to replace/drop file extent items. So
2529 * file extent items we need.
2573 * NO_HOLES is enabled) file extent items and did not setup new extent
2586 * ends at (or beyond) lockend. Since we have no file extent items to
2588 * make sure we have an extent map representing the existing hole (the
2589 * call to __btrfs_drop_extents() might have dropped the existing extent
2597 * Don't insert file hole extent item if it's for a range beyond eof
2819 * Caller should have locked the larger range of extent containing
2937 * Avoid hole punching and extent allocation for some cases. More cases
2942 * new prealloc extent, so that we get a larger contiguous disk extent.
2949 * The whole range is already a prealloc extent,
2959 * Part of the range is already a prealloc extent, so operate
3005 * map to an extent, in which case we need to partially zero them, or
3340 * Now also check if there's any ordered extent in the range.
3344 * EXTENT_DELALLOC bit from the io tree and create an extent map and
3345 * an ordered extent for the write. So we might just have been called
3346 * after delalloc is flushed and before the ordered extent completes
3347 * and inserts the new file extent item in the subvolume's btree;
3349 * 2) We may have an ordered extent created by flushing delalloc for a
3353 * We could also use the extent map tree to find such delalloc that is
3356 * the tree once they complete. With the extent maps, we may have them
3357 * in the extent map tree for a very long time, and they were either
3364 /* The ordered extent may span beyond our search range. */
3370 /* Don't have unflushed delalloc, return the ordered extent range. */
3378 * We have both unflushed delalloc (io_tree) and an ordered extent.
3457 * prealloc extent) found in the inode's subvolume btree.
3519 * to iterate to the next extent item in the subvolume btree.
3635 struct btrfs_file_extent_item *extent;
3657 * extent that ends before our start offset, so skip it.
3687 * implicit hole range, so need to analyze the extent.
3691 extent = btrfs_item_ptr(leaf, path->slots[0],
3693 type = btrfs_file_extent_type(leaf, extent);
3696 * Can't access the extent's disk_bytenr field if this is an
3697 * inline extent, since at that offset, it's where the extent
3702 btrfs_file_extent_disk_bytenr(leaf, extent) == 0)) {
3704 * Explicit hole or prealloc extent, search for delalloc.
3705 * A prealloc extent is treated like a hole.
3729 * extent item.
3733 * Found a regular or inline extent.
3744 * extent item.
3758 /* We have an implicit hole from the last extent found up to i_size. */
3872 * first one as dirty, setup an async extent, and immediately return