/linux-6.6.21/fs/btrfs/ |
D | free-space-tree.c | 212 struct btrfs_key key, found_key; in convert_free_space_to_bitmaps() local 246 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0] - 1); in convert_free_space_to_bitmaps() 248 if (found_key.type == BTRFS_FREE_SPACE_INFO_KEY) { in convert_free_space_to_bitmaps() 249 ASSERT(found_key.objectid == block_group->start); in convert_free_space_to_bitmaps() 250 ASSERT(found_key.offset == block_group->length); in convert_free_space_to_bitmaps() 253 } else if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in convert_free_space_to_bitmaps() 256 ASSERT(found_key.objectid >= start); in convert_free_space_to_bitmaps() 257 ASSERT(found_key.objectid < end); in convert_free_space_to_bitmaps() 258 ASSERT(found_key.objectid + found_key.offset <= end); in convert_free_space_to_bitmaps() 260 first = div_u64(found_key.objectid - start, in convert_free_space_to_bitmaps() [all …]
|
D | inode-item.c | 410 struct btrfs_key found_key; in btrfs_lookup_inode() local 417 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode() 418 if (found_key.objectid == location->objectid && in btrfs_lookup_inode() 419 found_key.type == location->type) { in btrfs_lookup_inode() 468 struct btrfs_key found_key; in btrfs_truncate_inode_items() local 534 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items() 535 found_type = found_key.type; in btrfs_truncate_inode_items() 537 if (found_key.objectid != control->ino) in btrfs_truncate_inode_items() 543 item_end = found_key.offset; in btrfs_truncate_inode_items() 555 found_key.offset, extent_type, in btrfs_truncate_inode_items() [all …]
|
D | export.c | 156 struct btrfs_key found_key; in btrfs_get_parent() local 187 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_get_parent() 188 if (found_key.objectid != key.objectid || found_key.type != key.type) { in btrfs_get_parent() 193 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent() 198 key.objectid = found_key.offset; in btrfs_get_parent() 202 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent() 204 found_key.offset, 0); in btrfs_get_parent()
|
D | file-item.c | 212 struct btrfs_key found_key; in btrfs_lookup_csum() local 231 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum() 232 if (found_key.type != BTRFS_EXTENT_CSUM_KEY) in btrfs_lookup_csum() 235 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum() 1013 struct btrfs_key found_key; in find_next_csum_offset() local 1028 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset() 1030 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset() 1031 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset() 1034 *next_offset = found_key.offset; in find_next_csum_offset() 1045 struct btrfs_key found_key; in btrfs_csum_file_blocks() local [all …]
|
D | root-tree.c | 71 struct btrfs_key found_key; in btrfs_find_root() local 94 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_find_root() 95 if (found_key.objectid != search_key->objectid || in btrfs_find_root() 96 found_key.type != BTRFS_ROOT_ITEM_KEY) { in btrfs_find_root() 104 memcpy(root_key, &found_key, sizeof(found_key)); in btrfs_find_root()
|
D | backref.c | 1025 struct btrfs_key found_key; in add_inline_refs() local 1050 btrfs_item_key_to_cpu(leaf, &found_key, slot); in add_inline_refs() 1055 if (found_key.type == BTRFS_EXTENT_ITEM_KEY && in add_inline_refs() 1063 } else if (found_key.type == BTRFS_METADATA_ITEM_KEY) { in add_inline_refs() 1064 *info_level = found_key.offset; in add_inline_refs() 2056 struct btrfs_key found_key; in btrfs_find_one_extref() local 2091 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_find_one_extref() 2100 if (found_key.objectid != inode_objectid) in btrfs_find_one_extref() 2102 if (found_key.type != BTRFS_INODE_EXTREF_KEY) in btrfs_find_one_extref() 2110 *found_off = found_key.offset; in btrfs_find_one_extref() [all …]
|
D | xattr.c | 279 struct btrfs_key found_key; in btrfs_listxattr() local 303 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in btrfs_listxattr() 314 if (found_key.objectid != key.objectid) in btrfs_listxattr() 316 if (found_key.type > BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr() 318 if (found_key.type < BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
|
D | tree-log.c | 1787 struct btrfs_key found_key; in delete_conflicting_dir_entry() local 1789 btrfs_dir_item_key_to_cpu(path->nodes[0], dst_di, &found_key); in delete_conflicting_dir_entry() 1791 if (found_key.objectid == log_key->objectid && in delete_conflicting_dir_entry() 1792 found_key.type == log_key->type && in delete_conflicting_dir_entry() 1793 found_key.offset == log_key->offset && in delete_conflicting_dir_entry() 2292 struct btrfs_key found_key; in replay_dir_deletes() local 2342 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in replay_dir_deletes() 2344 if (found_key.objectid != dirid || in replay_dir_deletes() 2345 found_key.type != dir_key.type) { in replay_dir_deletes() 2350 if (found_key.offset > range_end) in replay_dir_deletes() [all …]
|
D | send.c | 991 struct btrfs_key *found_key, int resolve, in iterate_inode_ref() argument 1023 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref() 1037 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref() 1042 dir = found_key->offset; in iterate_inode_ref() 1239 struct btrfs_key key, found_key; in get_inode_path() local 1259 btrfs_item_key_to_cpu(p->nodes[0], &found_key, p->slots[0]); in get_inode_path() 1260 if (found_key.objectid != ino || in get_inode_path() 1261 (found_key.type != BTRFS_INODE_REF_KEY && in get_inode_path() 1262 found_key.type != BTRFS_INODE_EXTREF_KEY)) { in get_inode_path() 1267 ret = iterate_inode_ref(root, p, &found_key, 1, in get_inode_path() [all …]
|
D | inode.c | 232 struct btrfs_key found_key = { 0 }; in print_data_reloc_error() local 265 ret = extent_from_logical(fs_info, logical, &path, &found_key, &flags); in print_data_reloc_error() 280 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in print_data_reloc_error() 305 ctx.bytenr = found_key.objectid; in print_data_reloc_error() 306 ctx.extent_item_pos = logical - found_key.objectid; in print_data_reloc_error() 310 reloc_warn.extent_item_size = found_key.offset; in print_data_reloc_error() 1995 struct btrfs_key found_key; in run_delalloc_nocow() local 2016 btrfs_item_key_to_cpu(leaf, &found_key, in run_delalloc_nocow() 2018 if (found_key.objectid == ino && in run_delalloc_nocow() 2019 found_key.type == BTRFS_EXTENT_DATA_KEY) in run_delalloc_nocow() [all …]
|
D | ctree.c | 1792 struct btrfs_key *found_key) in btrfs_find_item() argument 1799 ASSERT(found_key); in btrfs_find_item() 1817 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item() 1818 if (found_key->type != key.type || in btrfs_find_item() 1819 found_key->objectid != key.objectid) in btrfs_find_item() 2481 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local 2517 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf() 2518 ret = comp_keys(&found_key, &orig_key); in btrfs_prev_leaf() 2532 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf() 2533 ret = comp_keys(&found_key, &key); in btrfs_prev_leaf() [all …]
|
D | qgroup.c | 356 struct btrfs_key found_key; in btrfs_read_qgroup_config() local 401 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_read_qgroup_config() 403 if (found_key.type == BTRFS_QGROUP_STATUS_KEY) { in btrfs_read_qgroup_config() 427 if (found_key.type != BTRFS_QGROUP_INFO_KEY && in btrfs_read_qgroup_config() 428 found_key.type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_read_qgroup_config() 431 qgroup = find_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config() 432 if ((qgroup && found_key.type == BTRFS_QGROUP_INFO_KEY) || in btrfs_read_qgroup_config() 433 (!qgroup && found_key.type == BTRFS_QGROUP_LIMIT_KEY)) { in btrfs_read_qgroup_config() 438 qgroup = add_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config() 448 switch (found_key.type) { in btrfs_read_qgroup_config() [all …]
|
D | scrub.c | 484 struct btrfs_key found_key; in scrub_print_common_warning() local 507 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_common_warning() 512 swarn.extent_item_size = found_key.offset; in scrub_print_common_warning() 524 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in scrub_print_common_warning() 547 ctx.bytenr = found_key.objectid; in scrub_print_common_warning() 548 ctx.extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_common_warning() 2396 struct btrfs_key found_key; in scrub_enumerate_chunks() local 2436 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks() 2438 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks() 2441 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks() [all …]
|
D | print-tree.c | 218 struct btrfs_key found_key; in btrfs_print_leaf() local 247 btrfs_dir_item_key_to_cpu(l, di, &found_key); in btrfs_print_leaf() 249 found_key.objectid, in btrfs_print_leaf()
|
D | ctree.h | 562 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key); 671 #define btrfs_for_each_slot(root, key, found_key, path, iter_ret) \ argument 674 (iter_ret = btrfs_get_next_valid_item((root), (found_key), (path))) == 0; \
|
D | volumes.c | 1738 struct btrfs_key found_key; in btrfs_free_dev_extent() local 1757 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent() 1760 BUG_ON(found_key.offset > start || found_key.offset + in btrfs_free_dev_extent() 1762 key = found_key; in btrfs_free_dev_extent() 1807 struct btrfs_key found_key; in find_next_devid() local 1835 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in find_next_devid() 1837 *devid_ret = found_key.offset + 1; in find_next_devid() 3333 struct btrfs_key found_key; in btrfs_relocate_sys_chunks() local 3367 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_relocate_sys_chunks() 3375 ret = btrfs_relocate_chunk(fs_info, found_key.offset); in btrfs_relocate_sys_chunks() [all …]
|
D | dev-replace.c | 458 struct btrfs_key found_key; in mark_block_group_to_copy() local 514 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in mark_block_group_to_copy() 517 if (found_key.objectid != src_dev->devid) in mark_block_group_to_copy() 520 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in mark_block_group_to_copy() 523 if (found_key.offset < key.offset) in mark_block_group_to_copy()
|
D | tree-checker.c | 1986 struct btrfs_key found_key; in btrfs_verify_level_key() local 2021 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key() 2023 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key() 2024 ret = btrfs_comp_cpu_keys(first_key, &found_key); in btrfs_verify_level_key() 2033 found_key.objectid, found_key.type, in btrfs_verify_level_key() 2034 found_key.offset); in btrfs_verify_level_key()
|
D | block-group.c | 583 struct btrfs_key *found_key) in sample_block_group_extent_item() argument 615 btrfs_for_each_slot(extent_root, &search_key, found_key, path, ret) { in sample_block_group_extent_item() 617 if (found_key->type == BTRFS_EXTENT_ITEM_KEY && in sample_block_group_extent_item() 618 found_key->objectid >= block_group->start && in sample_block_group_extent_item() 619 found_key->objectid + found_key->offset <= search_end) in sample_block_group_extent_item() 623 if (found_key->objectid >= search_end) { in sample_block_group_extent_item() 2029 struct btrfs_key found_key; in find_first_block_group() local 2031 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group() 2032 if (found_key.objectid >= key->objectid && in find_first_block_group() 2033 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group() [all …]
|
D | zoned.c | 1221 struct btrfs_key found_key; in calculate_alloc_pointer() local 1265 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer() 1267 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer() 1268 length = found_key.offset; in calculate_alloc_pointer() 1272 if (!(found_key.objectid >= cache->start && in calculate_alloc_pointer() 1273 found_key.objectid + length <= cache->start + cache->length)) { in calculate_alloc_pointer() 1277 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
|
D | disk-io.c | 405 struct btrfs_key found_key; in btrfs_validate_extent_buffer() local 408 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer() 410 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer() 411 if (unlikely(btrfs_comp_cpu_keys(expect_key, &found_key))) { in btrfs_validate_extent_buffer() 417 found_key.objectid, found_key.type, in btrfs_validate_extent_buffer() 418 found_key.offset); in btrfs_validate_extent_buffer() 4967 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local 4984 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid() 4985 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
|
D | backref.h | 205 struct btrfs_path *path, struct btrfs_key *found_key,
|
D | free-space-cache.c | 1168 struct btrfs_key found_key; in update_cache_item() local 1171 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in update_cache_item() 1172 if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID || in update_cache_item() 1173 found_key.offset != offset) { in update_cache_item()
|