• Home
  • Raw
  • Download

Lines Matching refs:rb_node

30 	struct rb_node rb_node;  member
38 struct rb_node rb_node; member
118 struct rb_node rb_node; member
132 struct rb_node rb_node; member
248 RB_CLEAR_NODE(&node->rb_node); in alloc_backref_node()
282 static struct rb_node *tree_insert(struct rb_root *root, u64 bytenr, in tree_insert()
283 struct rb_node *node) in tree_insert()
285 struct rb_node **p = &root->rb_node; in tree_insert()
286 struct rb_node *parent = NULL; in tree_insert()
291 entry = rb_entry(parent, struct tree_entry, rb_node); in tree_insert()
306 static struct rb_node *tree_search(struct rb_root *root, u64 bytenr) in tree_search()
308 struct rb_node *n = root->rb_node; in tree_search()
312 entry = rb_entry(n, struct tree_entry, rb_node); in tree_search()
324 static void backref_tree_panic(struct rb_node *rb_node, int errno, u64 bytenr) in backref_tree_panic() argument
328 struct backref_node *bnode = rb_entry(rb_node, struct backref_node, in backref_tree_panic()
329 rb_node); in backref_tree_panic()
410 if (!RB_EMPTY_NODE(&node->rb_node)) in drop_backref_node()
411 rb_erase(&node->rb_node, &tree->rb_root); in drop_backref_node()
436 if (RB_EMPTY_NODE(&upper->rb_node)) { in remove_backref_node()
459 struct rb_node *rb_node; in update_backref_node() local
460 rb_erase(&node->rb_node, &cache->rb_root); in update_backref_node()
462 rb_node = tree_insert(&cache->rb_root, node->bytenr, &node->rb_node); in update_backref_node()
463 if (rb_node) in update_backref_node()
464 backref_tree_panic(rb_node, -EEXIST, bytenr); in update_backref_node()
581 struct rb_node *rb_node; in find_reloc_root() local
586 rb_node = tree_search(&rc->reloc_root_tree.rb_root, bytenr); in find_reloc_root()
587 if (rb_node) { in find_reloc_root()
588 node = rb_entry(rb_node, struct mapping_node, rb_node); in find_reloc_root()
697 struct rb_node *rb_node; in build_backref_tree() local
848 rb_node = tree_search(&cache->rb_root, key.offset); in build_backref_tree()
849 if (!rb_node) { in build_backref_tree()
864 upper = rb_entry(rb_node, struct backref_node, in build_backref_tree()
865 rb_node); in build_backref_tree()
958 rb_node = tree_search(&cache->rb_root, eb->start); in build_backref_tree()
959 if (!rb_node) { in build_backref_tree()
998 upper = rb_entry(rb_node, struct backref_node, in build_backref_tree()
999 rb_node); in build_backref_tree()
1009 if (rb_node) in build_backref_tree()
1047 rb_node = tree_insert(&cache->rb_root, node->bytenr, in build_backref_tree()
1048 &node->rb_node); in build_backref_tree()
1049 if (rb_node) in build_backref_tree()
1050 backref_tree_panic(rb_node, -EEXIST, node->bytenr); in build_backref_tree()
1070 if (!RB_EMPTY_NODE(&upper->rb_node)) { in build_backref_tree()
1096 rb_node = tree_insert(&cache->rb_root, upper->bytenr, in build_backref_tree()
1097 &upper->rb_node); in build_backref_tree()
1098 if (rb_node) in build_backref_tree()
1099 backref_tree_panic(rb_node, -EEXIST, in build_backref_tree()
1140 rb_erase(&upper->rb_node, &cache->rb_root); in build_backref_tree()
1167 RB_EMPTY_NODE(&lower->rb_node)) in build_backref_tree()
1170 if (!RB_EMPTY_NODE(&upper->rb_node)) in build_backref_tree()
1212 struct rb_node *rb_node; in clone_backref_node() local
1217 rb_node = tree_search(&cache->rb_root, src->commit_root->start); in clone_backref_node()
1218 if (rb_node) { in clone_backref_node()
1219 node = rb_entry(rb_node, struct backref_node, rb_node); in clone_backref_node()
1227 rb_node = tree_search(&cache->rb_root, in clone_backref_node()
1229 if (rb_node) { in clone_backref_node()
1230 node = rb_entry(rb_node, struct backref_node, in clone_backref_node()
1231 rb_node); in clone_backref_node()
1264 rb_node = tree_insert(&cache->rb_root, new_node->bytenr, in clone_backref_node()
1265 &new_node->rb_node); in clone_backref_node()
1266 if (rb_node) in clone_backref_node()
1267 backref_tree_panic(rb_node, -EEXIST, new_node->bytenr); in clone_backref_node()
1293 struct rb_node *rb_node; in __add_reloc_root() local
1305 rb_node = tree_insert(&rc->reloc_root_tree.rb_root, in __add_reloc_root()
1306 node->bytenr, &node->rb_node); in __add_reloc_root()
1308 if (rb_node) { in __add_reloc_root()
1325 struct rb_node *rb_node; in __del_reloc_root() local
1331 rb_node = tree_search(&rc->reloc_root_tree.rb_root, in __del_reloc_root()
1333 if (rb_node) { in __del_reloc_root()
1334 node = rb_entry(rb_node, struct mapping_node, rb_node); in __del_reloc_root()
1335 rb_erase(&node->rb_node, &rc->reloc_root_tree.rb_root); in __del_reloc_root()
1336 RB_CLEAR_NODE(&node->rb_node); in __del_reloc_root()
1355 struct rb_node *rb_node; in __update_reloc_root() local
1360 rb_node = tree_search(&rc->reloc_root_tree.rb_root, in __update_reloc_root()
1362 if (rb_node) { in __update_reloc_root()
1363 node = rb_entry(rb_node, struct mapping_node, rb_node); in __update_reloc_root()
1364 rb_erase(&node->rb_node, &rc->reloc_root_tree.rb_root); in __update_reloc_root()
1374 rb_node = tree_insert(&rc->reloc_root_tree.rb_root, in __update_reloc_root()
1375 node->bytenr, &node->rb_node); in __update_reloc_root()
1377 if (rb_node) in __update_reloc_root()
1378 backref_tree_panic(rb_node, -EEXIST, node->bytenr); in __update_reloc_root()
1566 struct rb_node *node; in find_next_inode()
1567 struct rb_node *prev; in find_next_inode()
1573 node = root->inode_tree.rb_node; in find_next_inode()
1577 entry = rb_entry(node, struct btrfs_inode, rb_node); in find_next_inode()
1588 entry = rb_entry(prev, struct btrfs_inode, rb_node); in find_next_inode()
1597 entry = rb_entry(node, struct btrfs_inode, rb_node); in find_next_inode()
2627 struct rb_node *rb_node; in free_block_list() local
2628 while ((rb_node = rb_first(blocks))) { in free_block_list()
2629 block = rb_entry(rb_node, struct tree_block, rb_node); in free_block_list()
2630 rb_erase(rb_node, blocks); in free_block_list()
3195 rbtree_postorder_for_each_entry_safe(block, next, blocks, rb_node) { in relocate_tree_blocks()
3201 rbtree_postorder_for_each_entry_safe(block, next, blocks, rb_node) { in relocate_tree_blocks()
3210 rbtree_postorder_for_each_entry_safe(block, next, blocks, rb_node) { in relocate_tree_blocks()
3496 struct rb_node *rb_node; in add_tree_block() local
3537 rb_node = tree_insert(blocks, block->bytenr, &block->rb_node); in add_tree_block()
3538 if (rb_node) in add_tree_block()
3539 backref_tree_panic(rb_node, -EEXIST, block->bytenr); in add_tree_block()
3699 struct rb_node *rb_node; in find_data_references() local
3764 rb_node = tree_search(blocks, leaf->start); in find_data_references()
3765 if (rb_node) { in find_data_references()
3790 rb_node = tree_search(blocks, leaf->start); in find_data_references()
3791 if (rb_node) { in find_data_references()
3834 rb_node = tree_insert(blocks, block->bytenr, in find_data_references()
3835 &block->rb_node); in find_data_references()
3836 if (rb_node) in find_data_references()
3837 backref_tree_panic(rb_node, -EEXIST, in find_data_references()
4384 &rc->reloc_root_tree.rb_root, rb_node) in free_reloc_control()