Lines Matching defs:tree
19 #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,
454 * clear the writeback bits in the extent tree for this IO
457 * Scheduling is not allowed, so the extent state tree is expected
526 struct extent_io_tree *tree;
549 tree = &processed->inode->io_tree;
554 unlock_extent(tree, processed->start, processed->end, &cached);
578 * set the page up to date if all extents in the tree are uptodate
579 * clear the lock bit in the extent tree
582 * Scheduling is not allowed, so the extent state tree is expected
967 * into the tree that are removed when the IO is done (by the end_io
988 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
992 unlock_extent(tree, start, end, NULL);
1016 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1023 unlock_extent(tree, cur, end, NULL);
1093 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1101 unlock_extent(tree, cur, cur + iosize - 1, NULL);
1404 * records are inserted to lock ranges in the tree, and as dirty areas
1539 * If writeback for a btree extent that doesn't belong to a log tree
1558 * not be enough - we need to distinguish between log tree extents vs
1559 * non-log tree extents, and the next filemap_fdatawait_range() call
1950 * - Bad extent tree
1951 * Allowing existing tree block to be allocated for other trees.
1953 * - Log tree operations
1954 * Exiting tree blocks get allocated to log tree, bumps its
1955 * generation, then get cleaned in tree re-balance.
1956 * Such tree block will not be written back, since it's clean,
1958 * And after log writes back, this tree block is not traced by
1961 * - Offending tree block gets re-dirtied from its original owner
1963 * reused without COWing. This tree block will not be traced
1966 * Now such dirty tree block will not be cleaned by any dirty
1967 * extent io tree. Thus we don't want to submit such wild eb
2261 * records from the tree
2263 int extent_invalidate_folio(struct extent_io_tree *tree,
2272 ASSERT(tree->owner == IO_TREE_BTREE_INODE_IO);
2278 lock_extent(tree, start, end, &cached_state);
2282 * Currently for btree io tree, only EXTENT_LOCKED is utilized,
2286 unlock_extent(tree, start, end, &cached_state);
2295 static int try_release_extent_state(struct extent_io_tree *tree,
2302 if (test_range_bit(tree, start, end, EXTENT_LOCKED, 0, NULL)) {
2315 ret = __clear_extent_bit(tree, start, end, clear_bits, NULL, NULL);
2339 struct extent_io_tree *tree = &btrfs_inode->io_tree;
2362 if (test_range_bit(tree, em->start,
2398 /* once for the rb tree */
2410 return try_release_extent_state(tree, page, mask);
2483 * We cached a dealloc range (found in the io tree) for
2512 * have found delalloc ranges (in the io tree), so what
2689 * the file range in the inode's io tree, so we know none of our file
2691 * want to insert items for other inodes in the same leaf or b+tree
2696 * extent buffer of the subvolume's b+tree will make lockdep unhappy
2868 /* No file extent items in the subvolume tree. */
3192 * removed the eb from the radix tree, so we could race
3382 * to the radix tree. It is also reset, if unset, when a new reference
3385 * It is only cleared in two cases: freeing the last non-tree
3387 * calling release_folio when the tree reference is the only reference.
3395 * The actual lifetime of the extent_buffer in the radix tree is
3442 * writeback flags not set) and it's still in the tree (flag
3506 * For subpage case, we completely rely on radix tree to ensure we
3535 btrfs_err(fs_info, "bad tree block start %llu", start);
3542 "tree block crosses page boundary, start %llu nodesize %u",
3549 "tree block is not page aligned, start %llu nodesize %u",
3596 * just like any other fs tree WRT lockdep.
3644 * when the eb hasn't yet been inserted into radix tree.
3660 * hasn't been properly inserted in the radix tree, this
3687 /* add one reference for the tree */
4608 * to grab buffer, for subpage case we rely on radix tree, thus
4609 * we need to ensure radix tree consistency.
4611 * We also want an atomic snapshot of the radix tree, thus go
4636 * If tree ref isn't set then we know the ref on this eb is a
4700 * If tree ref isn't set then we know the ref on this eb is a real ref,
4719 * Attempt to readahead a tree block at @bytenr. If @gen is 0 then we do a