Home
last modified time | relevance | path

Searched refs:found_key (Results 1 – 23 of 23) sorted by relevance

/Linux-v5.15/fs/btrfs/
Dfree-space-tree.c193 struct btrfs_key key, found_key; in convert_free_space_to_bitmaps() local
227 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0] - 1); in convert_free_space_to_bitmaps()
229 if (found_key.type == BTRFS_FREE_SPACE_INFO_KEY) { in convert_free_space_to_bitmaps()
230 ASSERT(found_key.objectid == block_group->start); in convert_free_space_to_bitmaps()
231 ASSERT(found_key.offset == block_group->length); in convert_free_space_to_bitmaps()
234 } else if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in convert_free_space_to_bitmaps()
237 ASSERT(found_key.objectid >= start); in convert_free_space_to_bitmaps()
238 ASSERT(found_key.objectid < end); in convert_free_space_to_bitmaps()
239 ASSERT(found_key.objectid + found_key.offset <= end); in convert_free_space_to_bitmaps()
241 first = div_u64(found_key.objectid - start, in convert_free_space_to_bitmaps()
[all …]
Dexport.c143 struct btrfs_key found_key; in btrfs_get_parent() local
174 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_get_parent()
175 if (found_key.objectid != key.objectid || found_key.type != key.type) { in btrfs_get_parent()
180 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent()
185 key.objectid = found_key.offset; in btrfs_get_parent()
189 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent()
191 found_key.offset, 0, 0); in btrfs_get_parent()
Dfile-item.c186 struct btrfs_key found_key; in btrfs_lookup_csum() local
205 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum()
206 if (found_key.type != BTRFS_EXTENT_CSUM_KEY) in btrfs_lookup_csum()
209 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum()
941 struct btrfs_key found_key; in find_next_csum_offset() local
956 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset()
958 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset()
959 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset()
962 *next_offset = found_key.offset; in find_next_csum_offset()
973 struct btrfs_key found_key; in btrfs_csum_file_blocks() local
[all …]
Dbackref.c940 struct btrfs_key found_key; in add_inline_refs() local
958 btrfs_item_key_to_cpu(leaf, &found_key, slot); in add_inline_refs()
963 if (found_key.type == BTRFS_EXTENT_ITEM_KEY && in add_inline_refs()
971 } else if (found_key.type == BTRFS_METADATA_ITEM_KEY) { in add_inline_refs()
972 *info_level = found_key.offset; in add_inline_refs()
1593 struct btrfs_key found_key; local
1628 btrfs_item_key_to_cpu(leaf, &found_key, slot);
1637 if (found_key.objectid != inode_objectid)
1639 if (found_key.type != BTRFS_INODE_EXTREF_KEY)
1647 *found_off = found_key.offset;
[all …]
Droot-tree.c68 struct btrfs_key found_key; in btrfs_find_root() local
91 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_find_root()
92 if (found_key.objectid != search_key->objectid || in btrfs_find_root()
93 found_key.type != BTRFS_ROOT_ITEM_KEY) { in btrfs_find_root()
101 memcpy(root_key, &found_key, sizeof(found_key)); in btrfs_find_root()
Dxattr.c306 struct btrfs_key found_key; in btrfs_listxattr() local
327 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_listxattr()
330 if (found_key.objectid != key.objectid) in btrfs_listxattr()
332 if (found_key.type > BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
334 if (found_key.type < BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
Dsend.c885 struct btrfs_key *found_key, int resolve, in iterate_inode_ref() argument
918 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
933 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
938 dir = found_key->offset; in iterate_inode_ref()
1139 struct btrfs_key key, found_key; in get_inode_path() local
1159 btrfs_item_key_to_cpu(p->nodes[0], &found_key, p->slots[0]); in get_inode_path()
1160 if (found_key.objectid != ino || in get_inode_path()
1161 (found_key.type != BTRFS_INODE_REF_KEY && in get_inode_path()
1162 found_key.type != BTRFS_INODE_EXTREF_KEY)) { in get_inode_path()
1167 ret = iterate_inode_ref(root, p, &found_key, 1, in get_inode_path()
[all …]
Dtree-log.c1949 struct btrfs_key found_key; in replay_one_name() local
2007 btrfs_dir_item_key_to_cpu(path->nodes[0], dst_di, &found_key); in replay_one_name()
2009 if (found_key.objectid == log_key.objectid && in replay_one_name()
2010 found_key.type == log_key.type && in replay_one_name()
2011 found_key.offset == log_key.offset && in replay_one_name()
2047 found_key.objectid = log_key.objectid; in replay_one_name()
2048 found_key.type = BTRFS_INODE_REF_KEY; in replay_one_name()
2049 found_key.offset = key->objectid; in replay_one_name()
2050 ret = backref_in_log(root->log_root, &found_key, 0, name, name_len); in replay_one_name()
2060 found_key.objectid = log_key.objectid; in replay_one_name()
[all …]
Dinode.c1607 struct btrfs_key found_key; in run_delalloc_nocow() local
1631 btrfs_item_key_to_cpu(leaf, &found_key, in run_delalloc_nocow()
1633 if (found_key.objectid == ino && in run_delalloc_nocow()
1634 found_key.type == BTRFS_EXTENT_DATA_KEY) in run_delalloc_nocow()
1653 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in run_delalloc_nocow()
1656 if (found_key.objectid > ino) in run_delalloc_nocow()
1662 if (WARN_ON_ONCE(found_key.objectid < ino) || in run_delalloc_nocow()
1663 found_key.type < BTRFS_EXTENT_DATA_KEY) { in run_delalloc_nocow()
1669 if (found_key.type > BTRFS_EXTENT_DATA_KEY || in run_delalloc_nocow()
1670 found_key.offset > end) in run_delalloc_nocow()
[all …]
Dinode-item.c406 struct btrfs_key found_key; in btrfs_lookup_inode() local
413 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode()
414 if (found_key.objectid == location->objectid && in btrfs_lookup_inode()
415 found_key.type == location->type) { in btrfs_lookup_inode()
Dctree.c1532 struct btrfs_key *found_key) in btrfs_find_item() argument
1539 ASSERT(found_key); in btrfs_find_item()
1557 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item()
1558 if (found_key->type != key.type || in btrfs_find_item()
1559 found_key->objectid != key.objectid) in btrfs_find_item()
4144 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local
4166 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf()
4167 ret = comp_keys(&found_key, &key); in btrfs_prev_leaf()
4207 struct btrfs_key found_key; in btrfs_search_forward() local
4242 btrfs_item_key_to_cpu(cur, &found_key, slot); in btrfs_search_forward()
[all …]
Dqgroup.c332 struct btrfs_key found_key; in btrfs_read_qgroup_config() local
377 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_read_qgroup_config()
379 if (found_key.type == BTRFS_QGROUP_STATUS_KEY) { in btrfs_read_qgroup_config()
403 if (found_key.type != BTRFS_QGROUP_INFO_KEY && in btrfs_read_qgroup_config()
404 found_key.type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_read_qgroup_config()
407 qgroup = find_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config()
408 if ((qgroup && found_key.type == BTRFS_QGROUP_INFO_KEY) || in btrfs_read_qgroup_config()
409 (!qgroup && found_key.type == BTRFS_QGROUP_LIMIT_KEY)) { in btrfs_read_qgroup_config()
414 qgroup = add_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config()
424 switch (found_key.type) { in btrfs_read_qgroup_config()
[all …]
Dprint-tree.c213 struct btrfs_key found_key; in btrfs_print_leaf() local
243 btrfs_dir_item_key_to_cpu(l, di, &found_key); in btrfs_print_leaf()
245 found_key.objectid, in btrfs_print_leaf()
Dzoned.c980 struct btrfs_key found_key; in calculate_alloc_pointer() local
1008 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer()
1010 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer()
1011 length = found_key.offset; in calculate_alloc_pointer()
1015 if (!(found_key.objectid >= cache->start && in calculate_alloc_pointer()
1016 found_key.objectid + length <= cache->start + cache->length)) { in calculate_alloc_pointer()
1020 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
Dscrub.c726 struct btrfs_key found_key; in scrub_print_warning() local
751 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_warning()
756 extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_warning()
757 swarn.extent_item_size = found_key.offset; in scrub_print_warning()
765 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in scrub_print_warning()
782 iterate_extent_inodes(fs_info, found_key.objectid, in scrub_print_warning()
3665 struct btrfs_key found_key; in scrub_enumerate_chunks() local
3703 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks()
3705 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks()
3708 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks()
[all …]
Ddev-replace.c471 struct btrfs_key found_key; in mark_block_group_to_copy() local
548 btrfs_item_key_to_cpu(leaf, &found_key, slot); in mark_block_group_to_copy()
550 if (found_key.objectid != src_dev->devid) in mark_block_group_to_copy()
553 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in mark_block_group_to_copy()
556 if (found_key.offset < key.offset) in mark_block_group_to_copy()
Dvolumes.c1717 struct btrfs_key found_key; in btrfs_free_dev_extent() local
1736 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent()
1739 BUG_ON(found_key.offset > start || found_key.offset + in btrfs_free_dev_extent()
1741 key = found_key; in btrfs_free_dev_extent()
1786 struct btrfs_key found_key; in find_next_devid() local
1814 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in find_next_devid()
1816 *devid_ret = found_key.offset + 1; in find_next_devid()
3231 struct btrfs_key found_key; in btrfs_relocate_sys_chunks() local
3265 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_relocate_sys_chunks()
3273 ret = btrfs_relocate_chunk(fs_info, found_key.offset); in btrfs_relocate_sys_chunks()
[all …]
Dbackref.h24 struct btrfs_path *path, struct btrfs_key *found_key,
Ddisk-io.c316 struct btrfs_key found_key; in btrfs_verify_level_key() local
351 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
353 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
354 ret = btrfs_comp_cpu_keys(first_key, &found_key); in btrfs_verify_level_key()
363 found_key.objectid, found_key.type, in btrfs_verify_level_key()
364 found_key.offset); in btrfs_verify_level_key()
4983 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local
5000 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid()
5001 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
Dblock-group.c1659 struct btrfs_key found_key; in find_first_block_group() local
1678 btrfs_item_key_to_cpu(leaf, &found_key, slot); in find_first_block_group()
1680 if (found_key.objectid >= key->objectid && in find_first_block_group()
1681 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group()
1682 ret = read_bg_from_eb(fs_info, &found_key, path); in find_first_block_group()
Dfree-space-cache.c1110 struct btrfs_key found_key; in update_cache_item() local
1113 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in update_cache_item()
1114 if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID || in update_cache_item()
1115 found_key.offset != offset) { in update_cache_item()
Dextent_io.c5478 struct btrfs_key found_key; in extent_fiemap() local
5528 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in extent_fiemap()
5529 found_type = found_key.type; in extent_fiemap()
5532 if (found_key.objectid != btrfs_ino(inode) || in extent_fiemap()
5543 last = found_key.offset; in extent_fiemap()
Dctree.h2861 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key);