Lines Matching defs:tree

18 #include "extent-io-tree.h"
326 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
348 found = btrfs_find_delalloc_range(tree, &delalloc_start, &delalloc_end,
394 lock_extent(tree, delalloc_start, delalloc_end, &cached_state);
397 ret = test_range_bit(tree, delalloc_start, delalloc_end,
400 unlock_extent(tree, delalloc_start, delalloc_end, &cached_state);
456 * - clear the writeback bits in the extent tree for the range
459 * Scheduling is not allowed, so the extent state tree is expected
530 struct extent_io_tree *tree;
553 tree = &processed->inode->io_tree;
558 unlock_extent(tree, processed->start, processed->end, &cached);
585 * - set the folio up to date if all extents in the tree are uptodate
586 * - clear the lock bit in the extent tree
589 * Scheduling is not allowed, so the extent state tree is expected
1018 * into the tree that are removed when the IO is done (by the end_io
1039 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
1043 unlock_extent(tree, start, end, NULL);
1067 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1073 unlock_extent(tree, cur, end, NULL);
1142 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1150 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1459 * records are inserted to lock ranges in the tree, and as dirty areas
1594 * If writeback for a btree extent that doesn't belong to a log tree
1613 * not be enough - we need to distinguish between log tree extents vs
1614 * non-log tree extents, and the next filemap_fdatawait_range() call
2014 * - Bad extent tree
2015 * Allowing existing tree block to be allocated for other trees.
2017 * - Log tree operations
2018 * Exiting tree blocks get allocated to log tree, bumps its
2019 * generation, then get cleaned in tree re-balance.
2020 * Such tree block will not be written back, since it's clean,
2022 * And after log writes back, this tree block is not traced by
2025 * - Offending tree block gets re-dirtied from its original owner
2027 * reused without COWing. This tree block will not be traced
2030 * Now such dirty tree block will not be cleaned by any dirty
2031 * extent io tree. Thus we don't want to submit such wild eb
2324 * records from the tree
2326 int extent_invalidate_folio(struct extent_io_tree *tree,
2335 ASSERT(tree->owner == IO_TREE_BTREE_INODE_IO);
2341 lock_extent(tree, start, end, &cached_state);
2345 * Currently for btree io tree, only EXTENT_LOCKED is utilized,
2349 unlock_extent(tree, start, end, &cached_state);
2358 static bool try_release_extent_state(struct extent_io_tree *tree,
2365 if (test_range_bit_exists(tree, start, end, EXTENT_LOCKED)) {
2379 ret2 = __clear_extent_bit(tree, start, end, clear_bits, NULL, NULL);
2450 /* Once for the inode's extent map tree. */
2482 * range from the inode's io tree, unlock the subvolume tree search path, flush
2483 * the fiemap cache and relock the file range and research the subvolume tree.
2518 * tree after unlocking the extent range in the inode's io tree and
2620 * We cached a dealloc range (found in the io tree) for
2649 * have found delalloc ranges (in the io tree), so what
2872 * the file range in the inode's io tree, so we know none of our file
2874 * want to insert items for other inodes in the same leaf or b+tree
2879 * extent buffer of the subvolume's b+tree will make lockdep unhappy
3051 /* No file extent items in the subvolume tree. */
3396 * removed the eb from the radix tree, so we could race
3574 * to the radix tree. It is also reset, if unset, when a new reference
3577 * It is only cleared in two cases: freeing the last non-tree
3579 * calling release_folio when the tree reference is the only reference.
3587 * The actual lifetime of the extent_buffer in the radix tree is
3628 * writeback flags not set) and it's still in the tree (flag
3693 * For subpage case, we completely rely on radix tree to ensure we
3722 btrfs_err(fs_info, "bad tree block start %llu", start);
3729 "tree block crosses page boundary, start %llu nodesize %u",
3736 "tree block is not page aligned, start %llu nodesize %u",
3743 "tree block not nodesize aligned, start %llu nodesize %u, can be resolved by a full metadata balance",
3858 * just like any other fs tree WRT lockdep.
3939 * when the eb hasn't yet been inserted into radix tree.
3964 * hasn't been properly inserted in the radix tree, this
3993 /* add one reference for the tree */
5014 * to grab buffer, for subpage case we rely on radix tree, thus
5015 * we need to ensure radix tree consistency.
5017 * We also want an atomic snapshot of the radix tree, thus go
5042 * If tree ref isn't set then we know the ref on this eb is a
5107 * If tree ref isn't set then we know the ref on this eb is a real ref,
5127 * Attempt to readahead a tree block at @bytenr. If @gen is 0 then we do a