Lines Matching refs:cur
452 struct tree_mod_elem *cur; in __tree_mod_log_insert() local
461 cur = container_of(*new, struct tree_mod_elem, node); in __tree_mod_log_insert()
463 if (cur->index < tm->index) in __tree_mod_log_insert()
465 else if (cur->index > tm->index) in __tree_mod_log_insert()
467 else if (cur->seq < tm->seq) in __tree_mod_log_insert()
469 else if (cur->seq > tm->seq) in __tree_mod_log_insert()
740 struct tree_mod_elem *cur = NULL; in __tree_mod_log_search() local
748 cur = container_of(node, struct tree_mod_elem, node); in __tree_mod_log_search()
749 if (cur->index < index) { in __tree_mod_log_search()
751 } else if (cur->index > index) { in __tree_mod_log_search()
753 } else if (cur->seq < min_seq) { in __tree_mod_log_search()
758 BUG_ON(found->seq > cur->seq); in __tree_mod_log_search()
759 found = cur; in __tree_mod_log_search()
761 } else if (cur->seq > min_seq) { in __tree_mod_log_search()
764 BUG_ON(found->seq < cur->seq); in __tree_mod_log_search()
765 found = cur; in __tree_mod_log_search()
768 found = cur; in __tree_mod_log_search()
1624 struct extent_buffer *cur; in btrfs_realloc_node() local
1680 cur = btrfs_find_tree_block(root->fs_info, blocknr); in btrfs_realloc_node()
1681 if (cur) in btrfs_realloc_node()
1682 uptodate = btrfs_buffer_uptodate(cur, gen, 0); in btrfs_realloc_node()
1685 if (!cur || !uptodate) { in btrfs_realloc_node()
1686 if (!cur) { in btrfs_realloc_node()
1687 cur = read_tree_block(root, blocknr, gen); in btrfs_realloc_node()
1688 if (!cur || !extent_buffer_uptodate(cur)) { in btrfs_realloc_node()
1689 free_extent_buffer(cur); in btrfs_realloc_node()
1693 err = btrfs_read_buffer(cur, gen); in btrfs_realloc_node()
1695 free_extent_buffer(cur); in btrfs_realloc_node()
1703 btrfs_tree_lock(cur); in btrfs_realloc_node()
1704 btrfs_set_lock_blocking(cur); in btrfs_realloc_node()
1705 err = __btrfs_cow_block(trans, root, cur, parent, i, in btrfs_realloc_node()
1706 &cur, search_start, in btrfs_realloc_node()
1710 btrfs_tree_unlock(cur); in btrfs_realloc_node()
1711 free_extent_buffer(cur); in btrfs_realloc_node()
1714 search_start = cur->start; in btrfs_realloc_node()
1715 last_block = cur->start; in btrfs_realloc_node()
1717 btrfs_tree_unlock(cur); in btrfs_realloc_node()
1718 free_extent_buffer(cur); in btrfs_realloc_node()
5119 struct extent_buffer *cur; in btrfs_search_forward() local
5130 cur = btrfs_read_lock_root_node(root); in btrfs_search_forward()
5131 level = btrfs_header_level(cur); in btrfs_search_forward()
5133 path->nodes[level] = cur; in btrfs_search_forward()
5136 if (btrfs_header_generation(cur) < min_trans) { in btrfs_search_forward()
5141 nritems = btrfs_header_nritems(cur); in btrfs_search_forward()
5142 level = btrfs_header_level(cur); in btrfs_search_forward()
5143 sret = bin_search(cur, min_key, level, &slot); in btrfs_search_forward()
5151 btrfs_item_key_to_cpu(cur, &found_key, slot); in btrfs_search_forward()
5163 gen = btrfs_node_ptr_generation(cur, slot); in btrfs_search_forward()
5188 btrfs_node_key_to_cpu(cur, &found_key, slot); in btrfs_search_forward()
5195 cur = read_node_slot(root, cur, slot); in btrfs_search_forward()
5196 BUG_ON(!cur); /* -ENOMEM */ in btrfs_search_forward()
5198 btrfs_tree_read_lock(cur); in btrfs_search_forward()
5201 path->nodes[level - 1] = cur; in btrfs_search_forward()