• Home
  • Raw
  • Download

Lines Matching refs:tree

134 static inline struct rb_node *tree_search(struct btrfs_ordered_inode_tree *tree,  in tree_search()  argument
137 struct rb_root *root = &tree->tree; in tree_search()
142 if (tree->last) { in tree_search()
143 entry = rb_entry(tree->last, struct btrfs_ordered_extent, in tree_search()
146 return tree->last; in tree_search()
152 tree->last = ret; in tree_search()
169 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; in __btrfs_add_ordered_extent() local
222 spin_lock_irq(&tree->lock); in __btrfs_add_ordered_extent()
223 node = tree_insert(&tree->tree, file_offset, in __btrfs_add_ordered_extent()
229 spin_unlock_irq(&tree->lock); in __btrfs_add_ordered_extent()
291 struct btrfs_ordered_inode_tree *tree; in btrfs_add_ordered_sum() local
293 tree = &BTRFS_I(entry->inode)->ordered_tree; in btrfs_add_ordered_sum()
294 spin_lock_irq(&tree->lock); in btrfs_add_ordered_sum()
296 spin_unlock_irq(&tree->lock); in btrfs_add_ordered_sum()
316 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; in btrfs_dec_test_first_ordered_pending() local
325 spin_lock_irqsave(&tree->lock, flags); in btrfs_dec_test_first_ordered_pending()
326 node = tree_search(tree, *file_offset); in btrfs_dec_test_first_ordered_pending()
368 spin_unlock_irqrestore(&tree->lock, flags); in btrfs_dec_test_first_ordered_pending()
385 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; in btrfs_dec_test_ordered_pending() local
391 spin_lock_irqsave(&tree->lock, flags); in btrfs_dec_test_ordered_pending()
397 node = tree_search(tree, file_offset); in btrfs_dec_test_ordered_pending()
431 spin_unlock_irqrestore(&tree->lock, flags); in btrfs_dec_test_ordered_pending()
469 struct btrfs_ordered_inode_tree *tree; in btrfs_remove_ordered_extent() local
487 tree = &btrfs_inode->ordered_tree; in btrfs_remove_ordered_extent()
488 spin_lock_irq(&tree->lock); in btrfs_remove_ordered_extent()
490 rb_erase(node, &tree->tree); in btrfs_remove_ordered_extent()
492 if (tree->last == node) in btrfs_remove_ordered_extent()
493 tree->last = NULL; in btrfs_remove_ordered_extent()
496 spin_unlock_irq(&tree->lock); in btrfs_remove_ordered_extent()
745 struct btrfs_ordered_inode_tree *tree; in btrfs_lookup_ordered_extent() local
749 tree = &inode->ordered_tree; in btrfs_lookup_ordered_extent()
750 spin_lock_irq(&tree->lock); in btrfs_lookup_ordered_extent()
751 node = tree_search(tree, file_offset); in btrfs_lookup_ordered_extent()
761 spin_unlock_irq(&tree->lock); in btrfs_lookup_ordered_extent()
771 struct btrfs_ordered_inode_tree *tree; in btrfs_lookup_ordered_range() local
775 tree = &inode->ordered_tree; in btrfs_lookup_ordered_range()
776 spin_lock_irq(&tree->lock); in btrfs_lookup_ordered_range()
777 node = tree_search(tree, file_offset); in btrfs_lookup_ordered_range()
779 node = tree_search(tree, file_offset + len); in btrfs_lookup_ordered_range()
801 spin_unlock_irq(&tree->lock); in btrfs_lookup_ordered_range()
812 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; in btrfs_get_ordered_extents_for_logging() local
817 spin_lock_irq(&tree->lock); in btrfs_get_ordered_extents_for_logging()
818 for (n = rb_first(&tree->tree); n; n = rb_next(n)) { in btrfs_get_ordered_extents_for_logging()
830 spin_unlock_irq(&tree->lock); in btrfs_get_ordered_extents_for_logging()
840 struct btrfs_ordered_inode_tree *tree; in btrfs_lookup_first_ordered_extent() local
844 tree = &inode->ordered_tree; in btrfs_lookup_first_ordered_extent()
845 spin_lock_irq(&tree->lock); in btrfs_lookup_first_ordered_extent()
846 node = tree_search(tree, file_offset); in btrfs_lookup_first_ordered_extent()
853 spin_unlock_irq(&tree->lock); in btrfs_lookup_first_ordered_extent()
868 struct btrfs_ordered_inode_tree *tree = &inode->ordered_tree; in btrfs_find_ordered_sum() local
880 spin_lock_irq(&tree->lock); in btrfs_find_ordered_sum()
897 spin_unlock_irq(&tree->lock); in btrfs_find_ordered_sum()