Home
last modified time | relevance | path

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

/fs/btrfs/
Dfree-space-tree.c207 struct btrfs_key key, found_key; in convert_free_space_to_bitmaps() local
241 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0] - 1); in convert_free_space_to_bitmaps()
243 if (found_key.type == BTRFS_FREE_SPACE_INFO_KEY) { in convert_free_space_to_bitmaps()
244 ASSERT(found_key.objectid == block_group->start); in convert_free_space_to_bitmaps()
245 ASSERT(found_key.offset == block_group->length); in convert_free_space_to_bitmaps()
248 } else if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in convert_free_space_to_bitmaps()
251 ASSERT(found_key.objectid >= start); in convert_free_space_to_bitmaps()
252 ASSERT(found_key.objectid < end); in convert_free_space_to_bitmaps()
253 ASSERT(found_key.objectid + found_key.offset <= end); in convert_free_space_to_bitmaps()
255 first = div_u64(found_key.objectid - start, in convert_free_space_to_bitmaps()
[all …]
Dinode-item.c404 struct btrfs_key found_key; in btrfs_lookup_inode() local
411 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode()
412 if (found_key.objectid == location->objectid && in btrfs_lookup_inode()
413 found_key.type == location->type) { in btrfs_lookup_inode()
462 struct btrfs_key found_key; in btrfs_truncate_inode_items() local
528 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items()
529 found_type = found_key.type; in btrfs_truncate_inode_items()
531 if (found_key.objectid != control->ino) in btrfs_truncate_inode_items()
537 item_end = found_key.offset; in btrfs_truncate_inode_items()
549 found_key.offset, extent_type, in btrfs_truncate_inode_items()
[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.c195 struct btrfs_key found_key; in btrfs_lookup_csum() local
214 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum()
215 if (found_key.type != BTRFS_EXTENT_CSUM_KEY) in btrfs_lookup_csum()
218 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum()
961 struct btrfs_key found_key; in find_next_csum_offset() local
976 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset()
978 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset()
979 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset()
982 *next_offset = found_key.offset; in find_next_csum_offset()
993 struct btrfs_key found_key; in btrfs_csum_file_blocks() local
[all …]
Dbackref.c975 struct btrfs_key found_key; in add_inline_refs() local
993 btrfs_item_key_to_cpu(leaf, &found_key, slot); in add_inline_refs()
998 if (found_key.type == BTRFS_EXTENT_ITEM_KEY && in add_inline_refs()
1006 } else if (found_key.type == BTRFS_METADATA_ITEM_KEY) { in add_inline_refs()
1007 *info_level = found_key.offset; in add_inline_refs()
1810 struct btrfs_key found_key; in btrfs_find_one_extref() local
1845 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_find_one_extref()
1854 if (found_key.objectid != inode_objectid) in btrfs_find_one_extref()
1856 if (found_key.type != BTRFS_INODE_EXTREF_KEY) in btrfs_find_one_extref()
1864 *found_off = found_key.offset; in btrfs_find_one_extref()
[all …]
Droot-tree.c66 struct btrfs_key found_key; in btrfs_find_root() local
89 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_find_root()
90 if (found_key.objectid != search_key->objectid || in btrfs_find_root()
91 found_key.type != BTRFS_ROOT_ITEM_KEY) { in btrfs_find_root()
99 memcpy(root_key, &found_key, sizeof(found_key)); in btrfs_find_root()
Dsend.c936 struct btrfs_key *found_key, int resolve, in iterate_inode_ref() argument
968 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
982 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
987 dir = found_key->offset; in iterate_inode_ref()
1184 struct btrfs_key key, found_key; in get_inode_path() local
1204 btrfs_item_key_to_cpu(p->nodes[0], &found_key, p->slots[0]); in get_inode_path()
1205 if (found_key.objectid != ino || in get_inode_path()
1206 (found_key.type != BTRFS_INODE_REF_KEY && in get_inode_path()
1207 found_key.type != BTRFS_INODE_EXTREF_KEY)) { in get_inode_path()
1212 ret = iterate_inode_ref(root, p, &found_key, 1, in get_inode_path()
[all …]
Dxattr.c275 struct btrfs_key found_key; in btrfs_listxattr() local
299 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in btrfs_listxattr()
310 if (found_key.objectid != key.objectid) in btrfs_listxattr()
312 if (found_key.type > BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
314 if (found_key.type < BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
Dctree.c1630 struct btrfs_key *found_key) in btrfs_find_item() argument
1637 ASSERT(found_key); in btrfs_find_item()
1655 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item()
1656 if (found_key->type != key.type || in btrfs_find_item()
1657 found_key->objectid != key.objectid) in btrfs_find_item()
4461 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local
4497 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf()
4498 ret = comp_keys(&found_key, &orig_key); in btrfs_prev_leaf()
4512 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf()
4513 ret = comp_keys(&found_key, &key); in btrfs_prev_leaf()
[all …]
Dtree-log.c383 struct btrfs_key found_key; in do_overwrite_item() local
385 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in do_overwrite_item()
386 ret = btrfs_comp_cpu_keys(&found_key, key); in do_overwrite_item()
1804 struct btrfs_key found_key; in delete_conflicting_dir_entry() local
1806 btrfs_dir_item_key_to_cpu(path->nodes[0], dst_di, &found_key); in delete_conflicting_dir_entry()
1808 if (found_key.objectid == log_key->objectid && in delete_conflicting_dir_entry()
1809 found_key.type == log_key->type && in delete_conflicting_dir_entry()
1810 found_key.offset == log_key->offset && in delete_conflicting_dir_entry()
2309 struct btrfs_key found_key; in replay_dir_deletes() local
2359 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in replay_dir_deletes()
[all …]
Dqgroup.c350 struct btrfs_key found_key; in btrfs_read_qgroup_config() local
395 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_read_qgroup_config()
397 if (found_key.type == BTRFS_QGROUP_STATUS_KEY) { in btrfs_read_qgroup_config()
421 if (found_key.type != BTRFS_QGROUP_INFO_KEY && in btrfs_read_qgroup_config()
422 found_key.type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_read_qgroup_config()
425 qgroup = find_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config()
426 if ((qgroup && found_key.type == BTRFS_QGROUP_INFO_KEY) || in btrfs_read_qgroup_config()
427 (!qgroup && found_key.type == BTRFS_QGROUP_LIMIT_KEY)) { in btrfs_read_qgroup_config()
432 qgroup = add_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config()
442 switch (found_key.type) { in btrfs_read_qgroup_config()
[all …]
Dinode.c1935 struct btrfs_key found_key; in run_delalloc_nocow() local
1957 btrfs_item_key_to_cpu(leaf, &found_key, in run_delalloc_nocow()
1959 if (found_key.objectid == ino && in run_delalloc_nocow()
1960 found_key.type == BTRFS_EXTENT_DATA_KEY) in run_delalloc_nocow()
1979 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in run_delalloc_nocow()
1982 if (found_key.objectid > ino) in run_delalloc_nocow()
1988 if (WARN_ON_ONCE(found_key.objectid < ino) || in run_delalloc_nocow()
1989 found_key.type < BTRFS_EXTENT_DATA_KEY) { in run_delalloc_nocow()
1995 if (found_key.type > BTRFS_EXTENT_DATA_KEY || in run_delalloc_nocow()
1996 found_key.offset > end) in run_delalloc_nocow()
[all …]
Dprint-tree.c213 struct btrfs_key found_key; in btrfs_print_leaf() local
242 btrfs_dir_item_key_to_cpu(l, di, &found_key); in btrfs_print_leaf()
244 found_key.objectid, in btrfs_print_leaf()
Dscrub.c892 struct btrfs_key found_key; in scrub_print_warning() local
924 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_warning()
929 extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_warning()
930 swarn.extent_item_size = found_key.offset; in scrub_print_warning()
938 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in scrub_print_warning()
955 iterate_extent_inodes(fs_info, found_key.objectid, in scrub_print_warning()
3845 struct btrfs_key found_key; in scrub_enumerate_chunks() local
3885 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks()
3887 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks()
3890 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks()
[all …]
Ddev-replace.c472 struct btrfs_key found_key; in mark_block_group_to_copy() local
528 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in mark_block_group_to_copy()
531 if (found_key.objectid != src_dev->devid) in mark_block_group_to_copy()
534 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in mark_block_group_to_copy()
537 if (found_key.offset < key.offset) in mark_block_group_to_copy()
Dvolumes.c1757 struct btrfs_key found_key; in btrfs_free_dev_extent() local
1776 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent()
1779 BUG_ON(found_key.offset > start || found_key.offset + in btrfs_free_dev_extent()
1781 key = found_key; in btrfs_free_dev_extent()
1826 struct btrfs_key found_key; in find_next_devid() local
1854 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in find_next_devid()
1856 *devid_ret = found_key.offset + 1; in find_next_devid()
3362 struct btrfs_key found_key; in btrfs_relocate_sys_chunks() local
3396 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_relocate_sys_chunks()
3404 ret = btrfs_relocate_chunk(fs_info, found_key.offset); in btrfs_relocate_sys_chunks()
[all …]
Dzoned.c1209 struct btrfs_key found_key; in calculate_alloc_pointer() local
1253 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer()
1255 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer()
1256 length = found_key.offset; in calculate_alloc_pointer()
1260 if (!(found_key.objectid >= cache->start && in calculate_alloc_pointer()
1261 found_key.objectid + length <= cache->start + cache->length)) { in calculate_alloc_pointer()
1265 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
Ddisk-io.c196 struct btrfs_key found_key; in btrfs_verify_level_key() local
231 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
233 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
234 ret = btrfs_comp_cpu_keys(first_key, &found_key); in btrfs_verify_level_key()
243 found_key.objectid, found_key.type, in btrfs_verify_level_key()
244 found_key.offset); in btrfs_verify_level_key()
5317 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local
5334 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid()
5335 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
Dbackref.h39 struct btrfs_path *path, struct btrfs_key *found_key,
Dblock-group.c1822 struct btrfs_key found_key; in find_first_block_group() local
1824 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group()
1825 if (found_key.objectid >= key->objectid && in find_first_block_group()
1826 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group()
1827 return read_bg_from_eb(fs_info, &found_key, path); in find_first_block_group()
Dfree-space-cache.c1172 struct btrfs_key found_key; in update_cache_item() local
1175 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in update_cache_item()
1176 if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID || in update_cache_item()
1177 found_key.offset != offset) { in update_cache_item()
Dctree.h3055 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key);
3164 #define btrfs_for_each_slot(root, key, found_key, path, iter_ret) \ argument
3167 (iter_ret = btrfs_get_next_valid_item((root), (found_key), (path))) == 0; \