Lines Matching refs:objectid
141 if (block_group->key.objectid < cache->key.objectid) { in btrfs_add_block_group_cache()
143 } else if (block_group->key.objectid > cache->key.objectid) { in btrfs_add_block_group_cache()
155 if (info->first_logical_byte > block_group->key.objectid) in btrfs_add_block_group_cache()
156 info->first_logical_byte = block_group->key.objectid; in btrfs_add_block_group_cache()
181 end = cache->key.objectid + cache->key.offset - 1; in block_group_cache_tree_search()
182 start = cache->key.objectid; in block_group_cache_tree_search()
185 if (!contains && (!ret || start < ret->key.objectid)) in block_group_cache_tree_search()
201 if (bytenr == 0 && info->first_logical_byte > ret->key.objectid) in block_group_cache_tree_search()
202 info->first_logical_byte = ret->key.objectid; in block_group_cache_tree_search()
225 start = cache->key.objectid; in free_excluded_extents()
242 if (cache->key.objectid < BTRFS_SUPER_INFO_OFFSET) { in exclude_super_stripes()
243 stripe_len = BTRFS_SUPER_INFO_OFFSET - cache->key.objectid; in exclude_super_stripes()
245 ret = add_excluded_extent(fs_info, cache->key.objectid, in exclude_super_stripes()
253 ret = btrfs_rmap_block(fs_info, cache->key.objectid, in exclude_super_stripes()
261 if (logical[nr] > cache->key.objectid + in exclude_super_stripes()
265 if (logical[nr] + stripe_len <= cache->key.objectid) in exclude_super_stripes()
269 if (start < cache->key.objectid) { in exclude_super_stripes()
270 start = cache->key.objectid; in exclude_super_stripes()
274 cache->key.objectid + in exclude_super_stripes()
318 u64 start = block_group->key.objectid; in fragment_free_space()
397 last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); in load_extent_tree_free()
418 key.objectid = last; in load_extent_tree_free()
466 if (key.objectid < last) { in load_extent_tree_free()
467 key.objectid = last; in load_extent_tree_free()
477 if (key.objectid < block_group->key.objectid) { in load_extent_tree_free()
482 if (key.objectid >= block_group->key.objectid + in load_extent_tree_free()
489 key.objectid); in load_extent_tree_free()
491 last = key.objectid + in load_extent_tree_free()
494 last = key.objectid + key.offset; in load_extent_tree_free()
507 block_group->key.objectid + in load_extent_tree_free()
583 caching_ctl->progress = cache->key.objectid; in cache_block_group()
788 key.objectid = start; in btrfs_lookup_data_extent()
839 key.objectid = bytenr; in btrfs_lookup_extent_info()
855 if (key.objectid == bytenr && in btrfs_lookup_extent_info()
1146 key.objectid = bytenr; in lookup_extent_data_ref()
1185 if (key.objectid != bytenr || in lookup_extent_data_ref()
1220 key.objectid = bytenr; in insert_extent_data_ref()
1383 key.objectid = bytenr; in lookup_tree_block_ref()
1406 key.objectid = bytenr; in insert_tree_block_ref()
1498 key.objectid = bytenr; in lookup_inline_extent_backref()
1535 if (key.objectid == bytenr && in lookup_inline_extent_backref()
1541 key.objectid = bytenr; in lookup_inline_extent_backref()
1647 key.objectid == bytenr && in lookup_inline_extent_backref()
2167 ins.objectid = node->bytenr; in run_delayed_data_ref()
2182 flags, ref->objectid, in run_delayed_data_ref()
2187 ref->objectid, ref->offset, in run_delayed_data_ref()
2191 ref_root, ref->objectid, in run_delayed_data_ref()
2242 key.objectid = head->bytenr; in run_delayed_extent_op()
2266 if (key.objectid == head->bytenr && in run_delayed_extent_op()
2275 key.objectid = head->bytenr; in run_delayed_extent_op()
2993 u64 objectid, u64 offset, u64 bytenr) in check_delayed_ref() argument
3057 if (data_ref->root != root->root_key.objectid || in check_delayed_ref()
3058 data_ref->objectid != objectid || in check_delayed_ref()
3072 u64 objectid, u64 offset, u64 bytenr) in check_committed_ref() argument
3085 key.objectid = bytenr; in check_committed_ref()
3102 if (key.objectid != bytenr || key.type != BTRFS_EXTENT_ITEM_KEY) in check_committed_ref()
3127 root->root_key.objectid || in check_committed_ref()
3128 btrfs_extent_data_ref_objectid(leaf, ref) != objectid || in check_committed_ref()
3137 int btrfs_cross_ref_exist(struct btrfs_root *root, u64 objectid, u64 offset, in btrfs_cross_ref_exist() argument
3149 ret = check_committed_ref(root, path, objectid, in btrfs_cross_ref_exist()
3154 ret2 = check_delayed_ref(root, path, objectid, in btrfs_cross_ref_exist()
3167 if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID) in btrfs_cross_ref_exist()
3230 parent, ref_root, key.objectid, in __btrfs_mod_ref()
3297 const u64 next_bytenr = cache->key.objectid + cache->key.offset; in next_block_group()
6097 byte_in_group = bytenr - cache->key.objectid; in update_block_group()
6180 bytenr = cache->key.objectid; in first_logical_byte()
6324 key.objectid = btrfs_file_extent_disk_bytenr(eb, item); in btrfs_exclude_logged_extents()
6326 ret = __exclude_logged_extent(fs_info, key.objectid, key.offset); in btrfs_exclude_logged_extents()
6521 start >= cache->key.objectid + cache->key.offset) { in unpin_extent_range()
6534 len = cache->key.objectid + cache->key.offset - start; in unpin_extent_range()
6653 block_group->key.objectid, in btrfs_finish_extent_commit()
6718 if (key.objectid != bytenr) in __btrfs_free_extent()
6747 key.objectid = bytenr; in __btrfs_free_extent()
6766 if (key.objectid == bytenr && in __btrfs_free_extent()
6774 key.objectid = bytenr; in __btrfs_free_extent()
6988 if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID) { in btrfs_free_tree_block()
6992 root->root_key.objectid, in btrfs_free_tree_block()
6997 root->root_key.objectid, in btrfs_free_tree_block()
7008 if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID) { in btrfs_free_tree_block()
7034 root->root_key.objectid); in btrfs_free_tree_block()
7249 ins->objectid = 0; in find_free_extent()
7349 search_start = block_group->key.objectid; in find_free_extent()
7409 used_block_group->key.objectid, in find_free_extent()
7565 block_group->key.objectid + block_group->key.offset) { in find_free_extent()
7583 ins->objectid = search_start; in find_free_extent()
7603 if (!ins->objectid && loop >= LOOP_CACHING_WAIT && have_caching_bg) in find_free_extent()
7606 if (!ins->objectid && ++index < BTRFS_NR_RAID_TYPES) in find_free_extent()
7617 if (!ins->objectid && loop < LOOP_NO_EMPTY_SIZE) { in find_free_extent()
7687 } else if (!ins->objectid) { in find_free_extent()
7689 } else if (ins->objectid) { in find_free_extent()
7692 last_ptr->window_start = ins->objectid; in find_free_extent()
7735 cache->key.objectid, cache->key.offset, in dump_space_info()
7807 btrfs_dec_block_group_reservations(fs_info, ins->objectid); in btrfs_reserve_extent()
7933 ret = remove_from_free_space_tree(trans, ins->objectid, ins->offset); in alloc_reserved_file_extent()
7937 ret = update_block_group(trans, fs_info, ins->objectid, ins->offset, 1); in alloc_reserved_file_extent()
7940 ins->objectid, ins->offset); in alloc_reserved_file_extent()
7943 trace_btrfs_reserved_extent_alloc(fs_info, ins->objectid, ins->offset); in alloc_reserved_file_extent()
7967 extent_key.objectid = node->bytenr; in alloc_reserved_tree_block()
7982 extent_key.objectid, in alloc_reserved_tree_block()
7993 extent_key.objectid, in alloc_reserved_tree_block()
8029 ret = remove_from_free_space_tree(trans, extent_key.objectid, in alloc_reserved_tree_block()
8034 ret = update_block_group(trans, fs_info, extent_key.objectid, in alloc_reserved_tree_block()
8038 extent_key.objectid, extent_key.offset); in alloc_reserved_tree_block()
8042 trace_btrfs_reserved_extent_alloc(fs_info, extent_key.objectid, in alloc_reserved_tree_block()
8054 BUG_ON(root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID); in btrfs_alloc_reserved_file_extent()
8056 btrfs_ref_tree_mod(root, ins->objectid, ins->offset, 0, in btrfs_alloc_reserved_file_extent()
8057 root->root_key.objectid, owner, offset, in btrfs_alloc_reserved_file_extent()
8060 ret = btrfs_add_delayed_data_ref(trans, ins->objectid, in btrfs_alloc_reserved_file_extent()
8062 root->root_key.objectid, owner, in btrfs_alloc_reserved_file_extent()
8087 ret = __exclude_logged_extent(fs_info, ins->objectid, in btrfs_alloc_logged_file_extent()
8093 block_group = btrfs_lookup_block_group(fs_info, ins->objectid); in btrfs_alloc_logged_file_extent()
8122 btrfs_set_buffer_lockdep_class(root->root_key.objectid, buf, level); in btrfs_init_new_buffer()
8138 if (root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID) { in btrfs_init_new_buffer()
8262 buf = btrfs_init_new_buffer(trans, root, ins.objectid, level, in btrfs_alloc_tree_block()
8271 parent = ins.objectid; in btrfs_alloc_tree_block()
8292 btrfs_ref_tree_mod(root, ins.objectid, ins.offset, parent, in btrfs_alloc_tree_block()
8295 ret = btrfs_add_delayed_tree_ref(trans, ins.objectid, in btrfs_alloc_tree_block()
8310 btrfs_free_reserved_extent(fs_info, ins.objectid, ins.offset, 0); in btrfs_alloc_tree_block()
8432 btrfs_header_owner(eb) != root->root_key.objectid) in walk_down_proc()
8544 btrfs_set_buffer_lockdep_class(root->root_key.objectid, next, in do_walk_down()
8633 ASSERT(root->root_key.objectid == in do_walk_down()
8635 if (root->root_key.objectid != in do_walk_down()
8655 parent, root->root_key.objectid, in do_walk_down()
8767 BUG_ON(root->root_key.objectid != in walk_up_proc()
8773 BUG_ON(root->root_key.objectid != in walk_up_proc()
8878 btrfs_debug(fs_info, "Drop subvolume %llu", root->objectid); in btrfs_drop_snapshot()
9032 if (root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID) { in btrfs_drop_snapshot()
9046 root->root_key.objectid); in btrfs_drop_snapshot()
9097 BUG_ON(root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID); in btrfs_drop_subtree()
9466 block_group->key.objectid); in btrfs_can_relocate()
9518 block_group->key.objectid); in btrfs_can_relocate()
9555 if (found_key.objectid >= key->objectid && in find_first_block_group()
9562 em = lookup_extent_mapping(em_tree, found_key.objectid, in find_first_block_group()
9568 found_key.objectid, found_key.offset); in find_first_block_group()
9570 } else if (em->start != found_key.objectid || in find_first_block_group()
9574 found_key.objectid, found_key.offset, in find_first_block_group()
9588 found_key.objectid, in find_first_block_group()
9635 last = block_group->key.objectid + block_group->key.offset; in btrfs_put_block_group_cache()
9821 cache->key.objectid = start; in btrfs_create_block_group_cache()
9880 if (bg->key.objectid != em->start || in check_chunk_block_group_mappings()
9888 bg->key.objectid, bg->key.offset, in check_chunk_block_group_mappings()
9919 key.objectid = 0; in btrfs_read_block_groups()
9944 cache = btrfs_create_block_group_cache(info, found_key.objectid, in btrfs_read_block_groups()
9975 cache->key.objectid); in btrfs_read_block_groups()
9980 key.objectid = found_key.objectid + found_key.offset; in btrfs_read_block_groups()
10013 add_new_free_space(cache, found_key.objectid, in btrfs_read_block_groups()
10014 found_key.objectid + in btrfs_read_block_groups()
10036 if (btrfs_chunk_readonly(info, cache->key.objectid)) { in btrfs_read_block_groups()
10098 ret = btrfs_finish_chunk_alloc(trans, key.objectid, key.offset); in btrfs_create_pending_block_groups()
10229 btrfs_free_ref_tree_range(fs_info, block_group->key.objectid, in btrfs_remove_block_group()
10308 key.objectid = BTRFS_FREE_SPACE_OBJECTID; in btrfs_remove_block_group()
10309 key.offset = block_group->key.objectid; in btrfs_remove_block_group()
10329 if (fs_info->first_logical_byte == block_group->key.objectid) in btrfs_remove_block_group()
10603 block_group->key.objectid); in btrfs_delete_unused_bgs()
10614 start = block_group->key.objectid; in btrfs_delete_unused_bgs()
10669 ret = btrfs_remove_chunk(trans, block_group->key.objectid); in btrfs_delete_unused_bgs()
10855 if (cache->key.objectid >= (range->start + range->len)) { in btrfs_trim_fs()
10860 start = max(range->start, cache->key.objectid); in btrfs_trim_fs()
10862 cache->key.objectid + cache->key.offset); in btrfs_trim_fs()