• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/btrfs/

Lines Matching refs:tree

36  * in the tree
63 * look for a given offset in the tree, and if it can't be found return the
140 static inline struct rb_node *tree_search(struct btrfs_ordered_inode_tree *tree,
143 struct rb_root *root = &tree->tree;
148 if (tree->last) {
149 entry = rb_entry(tree->last, struct btrfs_ordered_extent,
152 return tree->last;
158 tree->last = ret;
162 /* allocate and add a new ordered_extent into the per-inode tree.
166 * extent allocation tree
170 * The tree is given a single reference on the ordered extent that was
177 struct btrfs_ordered_inode_tree *tree;
181 tree = &BTRFS_I(inode)->ordered_tree;
198 /* one ref for the tree */
204 spin_lock(&tree->lock);
205 node = tree_insert(&tree->tree, file_offset,
208 spin_unlock(&tree->lock);
242 struct btrfs_ordered_inode_tree *tree;
244 tree = &BTRFS_I(inode)->ordered_tree;
245 spin_lock(&tree->lock);
247 spin_unlock(&tree->lock);
264 struct btrfs_ordered_inode_tree *tree;
269 tree = &BTRFS_I(inode)->ordered_tree;
270 spin_lock(&tree->lock);
271 node = tree_search(tree, file_offset);
298 spin_unlock(&tree->lock);
324 * remove an ordered extent from the tree. No references are dropped
325 * and you must wake_up entry->wait. You must hold the tree lock
331 struct btrfs_ordered_inode_tree *tree;
335 tree = &BTRFS_I(inode)->ordered_tree;
337 rb_erase(node, &tree->tree);
338 tree->last = NULL;
349 if (RB_EMPTY_ROOT(&tree->tree) &&
359 * remove an ordered extent from the tree. No references are dropped
365 struct btrfs_ordered_inode_tree *tree;
368 tree = &BTRFS_I(inode)->ordered_tree;
369 spin_lock(&tree->lock);
371 spin_unlock(&tree->lock);
592 struct btrfs_ordered_inode_tree *tree;
596 tree = &BTRFS_I(inode)->ordered_tree;
597 spin_lock(&tree->lock);
598 node = tree_search(tree, file_offset);
608 spin_unlock(&tree->lock);
619 struct btrfs_ordered_inode_tree *tree;
623 tree = &BTRFS_I(inode)->ordered_tree;
624 spin_lock(&tree->lock);
625 node = tree_search(tree, file_offset);
627 node = tree_search(tree, file_offset + len);
649 spin_unlock(&tree->lock);
660 struct btrfs_ordered_inode_tree *tree;
664 tree = &BTRFS_I(inode)->ordered_tree;
665 spin_lock(&tree->lock);
666 node = tree_search(tree, file_offset);
673 spin_unlock(&tree->lock);
684 struct btrfs_ordered_inode_tree *tree = &BTRFS_I(inode)->ordered_tree;
700 spin_lock(&tree->lock);
734 prev = tree_search(tree, offset);
770 node = rb_first(&tree->tree);
800 * we need to remove the ordered extent with the tree lock held
806 spin_unlock(&tree->lock);
823 struct btrfs_ordered_inode_tree *tree = &BTRFS_I(inode)->ordered_tree;
833 spin_lock(&tree->lock);
848 spin_unlock(&tree->lock);