Lines Matching refs:upper
2505 INIT_LIST_HEAD(&node->upper);
2536 struct btrfs_backref_node *upper; local
2543 while (!list_empty(&node->upper)) {
2544 edge = list_entry(node->upper.next, struct btrfs_backref_edge,
2546 upper = edge->node[UPPER];
2555 if (list_empty(&upper->lower)) {
2556 list_add_tail(&upper->lower, &cache->leaves);
2557 upper->lowest = 1;
2614 struct btrfs_backref_node *upper; local
2647 upper = btrfs_backref_alloc_node(cache, ref_key->offset,
2649 if (!upper) {
2661 upper = rb_entry(rb_node, struct btrfs_backref_node, rb_node);
2662 ASSERT(upper->checked);
2665 btrfs_backref_link_edge(edge, cur, upper, LINK_LOWER);
2688 struct btrfs_backref_node *upper; local
2779 upper = btrfs_backref_alloc_node(cache, eb->start,
2781 if (!upper) {
2787 upper->owner = btrfs_header_owner(eb);
2789 upper->cowonly = 1;
2796 upper->checked = 0;
2798 upper->checked = 1;
2805 if (!upper->checked && need_check) {
2810 if (upper->checked)
2815 upper = rb_entry(rb_node, struct btrfs_backref_node,
2817 ASSERT(upper->checked);
2819 if (!upper->owner)
2820 upper->owner = btrfs_header_owner(eb);
2822 btrfs_backref_link_edge(edge, lower, upper, LINK_LOWER);
2828 lower = upper;
2829 upper = NULL;
2876 if (!list_empty(&cur->upper)) {
2881 ASSERT(list_is_singular(&cur->upper));
2882 edge = list_entry(cur->upper.next, struct btrfs_backref_edge,
2998 list_for_each_entry(edge, &start->upper, list[LOWER])
3002 struct btrfs_backref_node *upper; local
3008 upper = edge->node[UPPER];
3012 if (upper->detached) {
3017 if (list_empty(&lower->upper))
3029 if (!RB_EMPTY_NODE(&upper->rb_node)) {
3030 if (upper->lowest) {
3031 list_del_init(&upper->lower);
3032 upper->lowest = 0;
3035 list_add_tail(&edge->list[UPPER], &upper->lower);
3040 if (!upper->checked) {
3046 if (start->cowonly != upper->cowonly) {
3052 if (!upper->cowonly) {
3053 rb_node = rb_simple_insert(&cache->rb_root, upper->bytenr,
3054 &upper->rb_node);
3057 upper->bytenr, -EEXIST);
3062 list_add_tail(&edge->list[UPPER], &upper->lower);
3068 list_for_each_entry(edge, &upper->upper, list[LOWER])
3078 struct btrfs_backref_node *upper; local
3092 upper = edge->node[UPPER];
3099 if (list_empty(&lower->upper) &&
3103 if (!RB_EMPTY_NODE(&upper->rb_node))
3107 list_for_each_entry(edge, &upper->upper, list[LOWER])
3110 if (list_empty(&upper->upper))
3111 list_add(&upper->list, &cache->useless_node);