/linux-6.1.9/fs/btrfs/ |
D | free-space-tree.c | 207 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 …]
|
D | inode-item.c | 405 struct btrfs_key found_key; in btrfs_lookup_inode() local 412 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode() 413 if (found_key.objectid == location->objectid && in btrfs_lookup_inode() 414 found_key.type == location->type) { in btrfs_lookup_inode() 463 struct btrfs_key found_key; in btrfs_truncate_inode_items() local 529 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items() 530 found_type = found_key.type; in btrfs_truncate_inode_items() 532 if (found_key.objectid != control->ino) in btrfs_truncate_inode_items() 538 item_end = found_key.offset; in btrfs_truncate_inode_items() 550 found_key.offset, extent_type, in btrfs_truncate_inode_items() [all …]
|
D | export.c | 143 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()
|
D | file-item.c | 194 struct btrfs_key found_key; in btrfs_lookup_csum() local 213 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum() 214 if (found_key.type != BTRFS_EXTENT_CSUM_KEY) in btrfs_lookup_csum() 217 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum() 958 struct btrfs_key found_key; in find_next_csum_offset() local 973 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset() 975 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset() 976 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset() 979 *next_offset = found_key.offset; in find_next_csum_offset() 990 struct btrfs_key found_key; in btrfs_csum_file_blocks() local [all …]
|
D | backref.c | 975 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 …]
|
D | root-tree.c | 66 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()
|
D | xattr.c | 275 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()
|
D | send.c | 936 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 …]
|
D | tree-log.c | 383 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() 1815 struct btrfs_key found_key; in delete_conflicting_dir_entry() local 1817 btrfs_dir_item_key_to_cpu(path->nodes[0], dst_di, &found_key); in delete_conflicting_dir_entry() 1819 if (found_key.objectid == log_key->objectid && in delete_conflicting_dir_entry() 1820 found_key.type == log_key->type && in delete_conflicting_dir_entry() 1821 found_key.offset == log_key->offset && in delete_conflicting_dir_entry() 2335 struct btrfs_key found_key; in replay_dir_deletes() local 2385 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in replay_dir_deletes() [all …]
|
D | ctree.c | 1588 struct btrfs_key *found_key) in btrfs_find_item() argument 1595 ASSERT(found_key); in btrfs_find_item() 1613 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item() 1614 if (found_key->type != key.type || in btrfs_find_item() 1615 found_key->objectid != key.objectid) in btrfs_find_item() 4414 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local 4436 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf() 4437 ret = comp_keys(&found_key, &key); in btrfs_prev_leaf() 4477 struct btrfs_key found_key; in btrfs_search_forward() local 4513 btrfs_item_key_to_cpu(cur, &found_key, slot); in btrfs_search_forward() [all …]
|
D | qgroup.c | 350 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 …]
|
D | inode.c | 1935 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 …]
|
D | print-tree.c | 213 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()
|
D | scrub.c | 892 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() 3814 struct btrfs_key found_key; in scrub_enumerate_chunks() local 3854 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks() 3856 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks() 3859 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks() [all …]
|
D | dev-replace.c | 472 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()
|
D | volumes.c | 1722 struct btrfs_key found_key; in btrfs_free_dev_extent() local 1741 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent() 1744 BUG_ON(found_key.offset > start || found_key.offset + in btrfs_free_dev_extent() 1746 key = found_key; in btrfs_free_dev_extent() 1791 struct btrfs_key found_key; in find_next_devid() local 1819 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in find_next_devid() 1821 *devid_ret = found_key.offset + 1; in find_next_devid() 3319 struct btrfs_key found_key; in btrfs_relocate_sys_chunks() local 3353 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_relocate_sys_chunks() 3361 ret = btrfs_relocate_chunk(fs_info, found_key.offset); in btrfs_relocate_sys_chunks() [all …]
|
D | zoned.c | 1211 struct btrfs_key found_key; in calculate_alloc_pointer() local 1255 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer() 1257 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer() 1258 length = found_key.offset; in calculate_alloc_pointer() 1262 if (!(found_key.objectid >= cache->start && in calculate_alloc_pointer() 1263 found_key.objectid + length <= cache->start + cache->length)) { in calculate_alloc_pointer() 1267 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
|
D | backref.h | 39 struct btrfs_path *path, struct btrfs_key *found_key,
|
D | disk-io.c | 196 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() 5267 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local 5284 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid() 5285 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
|
D | block-group.c | 1717 struct btrfs_key found_key; in find_first_block_group() local 1719 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group() 1720 if (found_key.objectid >= key->objectid && in find_first_block_group() 1721 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group() 1722 return read_bg_from_eb(fs_info, &found_key, path); in find_first_block_group()
|
D | free-space-cache.c | 1171 struct btrfs_key found_key; in update_cache_item() local 1174 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in update_cache_item() 1175 if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID || in update_cache_item() 1176 found_key.offset != offset) { in update_cache_item()
|
D | ctree.h | 3056 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key); 3165 #define btrfs_for_each_slot(root, key, found_key, path, iter_ret) \ argument 3168 (iter_ret = btrfs_get_next_valid_item((root), (found_key), (path))) == 0; \
|