| /linux/fs/btrfs/ |
| H A D | export.c | 162 struct btrfs_key found_key; in btrfs_get_parent() local 200 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_get_parent() 201 if (found_key.objectid != key.objectid || found_key.type != key.type) { in btrfs_get_parent() 206 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent() 211 key.objectid = found_key.offset; in btrfs_get_parent() 215 if (found_key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_get_parent() 217 found_key.offset, 0); in btrfs_get_parent()
|
| H A D | file-item.c | 207 struct btrfs_key found_key; in btrfs_lookup_csum() local 226 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_lookup_csum() 227 if (found_key.type != BTRFS_EXTENT_CSUM_KEY) in btrfs_lookup_csum() 230 csum_offset = (bytenr - found_key.offset) >> in btrfs_lookup_csum() 1100 struct btrfs_key found_key; in find_next_csum_offset() local 1115 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset() 1117 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset() 1118 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset() 1121 *next_offset = found_key.offset; in find_next_csum_offset() 1132 struct btrfs_key found_key; in btrfs_insert_data_csums() local [all …]
|
| H A D | root-tree.c | 71 struct btrfs_key found_key; in btrfs_find_root() local 101 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_find_root() 102 if (found_key.objectid != search_key->objectid || in btrfs_find_root() 103 found_key.type != BTRFS_ROOT_ITEM_KEY) { in btrfs_find_root() 111 memcpy(root_key, &found_key, sizeof(found_key)); in btrfs_find_root()
|
| H A D | backref.c | 1009 struct btrfs_key found_key; in add_inline_refs() local 1032 btrfs_item_key_to_cpu(leaf, &found_key, slot); in add_inline_refs() 1037 if (found_key.type == BTRFS_EXTENT_ITEM_KEY && in add_inline_refs() 1045 } else if (found_key.type == BTRFS_METADATA_ITEM_KEY) { in add_inline_refs() 1046 *info_level = found_key.offset; in add_inline_refs() 2046 struct btrfs_key found_key; in btrfs_find_one_extref() local 2081 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_find_one_extref() 2090 if (found_key.objectid != inode_objectid) in btrfs_find_one_extref() 2092 if (found_key.type != BTRFS_INODE_EXTREF_KEY) in btrfs_find_one_extref() 2100 *found_off = found_key.offset; in btrfs_find_one_extref() [all …]
|
| H A D | send.c | 979 struct btrfs_key *found_key, bool resolve, in iterate_inode_ref() argument 1006 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref() 1020 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref() 1024 dir = found_key->offset; in iterate_inode_ref() 1055 BTRFS_KEY_FMT_VALUE(found_key)); in iterate_inode_ref() 1218 struct btrfs_key key, found_key; in get_inode_path() local 1237 btrfs_item_key_to_cpu(p->nodes[0], &found_key, p->slots[0]); in get_inode_path() 1238 if (found_key.objectid != ino || in get_inode_path() 1239 (found_key.type != BTRFS_INODE_REF_KEY && in get_inode_path() 1240 found_key.type != BTRFS_INODE_EXTREF_KEY)) in get_inode_path() [all …]
|
| H A D | relocation.c | 4548 struct btrfs_key key, found_key; in create_remap_tree_entries() local 4603 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in create_remap_tree_entries() 4605 if (found_key.objectid >= bg->start + bg->length) in create_remap_tree_entries() 4608 if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in create_remap_tree_entries() 4610 space_runs[num_space_runs - 1].end == found_key.objectid) { in create_remap_tree_entries() 4612 found_key.objectid + found_key.offset; in create_remap_tree_entries() 4616 space_runs[num_space_runs].start = found_key.objectid; in create_remap_tree_entries() 4618 found_key.objectid + found_key.offset; in create_remap_tree_entries() 4622 } else if (found_key.type == BTRFS_FREE_SPACE_BITMAP_KEY) { in create_remap_tree_entries() 4642 found_key.objectid, space_runs, in create_remap_tree_entries() [all …]
|
| H A D | inode.c | 220 struct btrfs_key found_key = { 0 }; in print_data_reloc_error() local 251 ret = extent_from_logical(fs_info, logical, &path, &found_key, &flags); in print_data_reloc_error() 266 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in print_data_reloc_error() 294 ctx.bytenr = found_key.objectid; in print_data_reloc_error() 295 ctx.extent_item_pos = logical - found_key.objectid; in print_data_reloc_error() 299 reloc_warn.extent_item_size = found_key.offset; in print_data_reloc_error() 2030 struct btrfs_key found_key; in run_delalloc_nocow() local 2049 btrfs_item_key_to_cpu(leaf, &found_key, in run_delalloc_nocow() 2051 if (found_key.objectid == ino && in run_delalloc_nocow() 2052 found_key.type == BTRFS_EXTENT_DATA_KEY) in run_delalloc_nocow() [all …]
|
| H A D | raid-stripe-tree.c | 405 struct btrfs_key found_key; in btrfs_get_raid_extent_offset() local 448 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_get_raid_extent_offset() 449 found_logical = found_key.objectid; in btrfs_get_raid_extent_offset() 450 found_length = found_key.offset; in btrfs_get_raid_extent_offset()
|
| H A D | tree-log.c | 2050 struct btrfs_key found_key; in delete_conflicting_dir_entry() local 2052 btrfs_dir_item_key_to_cpu(wc->subvol_path->nodes[0], dst_di, &found_key); in delete_conflicting_dir_entry() 2054 if (found_key.objectid == log_key->objectid && in delete_conflicting_dir_entry() 2055 found_key.type == log_key->type && in delete_conflicting_dir_entry() 2056 found_key.offset == log_key->offset && in delete_conflicting_dir_entry() 2629 struct btrfs_key found_key; in replay_dir_deletes() local 2700 btrfs_item_key_to_cpu(wc->subvol_path->nodes[0], &found_key, in replay_dir_deletes() 2702 if (found_key.objectid != dirid || in replay_dir_deletes() 2703 found_key.type != dir_key.type) { in replay_dir_deletes() 2708 if (found_key.offset > range_end) in replay_dir_deletes() [all …]
|
| H A D | qgroup.c | 423 struct btrfs_key found_key; in btrfs_read_qgroup_config() local 462 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_read_qgroup_config() 464 if (found_key.type == BTRFS_QGROUP_STATUS_KEY) { in btrfs_read_qgroup_config() 485 if (found_key.type != BTRFS_QGROUP_INFO_KEY && in btrfs_read_qgroup_config() 486 found_key.type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_read_qgroup_config() 489 qgroup = find_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config() 490 if ((qgroup && found_key.type == BTRFS_QGROUP_INFO_KEY) || in btrfs_read_qgroup_config() 491 (!qgroup && found_key.type == BTRFS_QGROUP_LIMIT_KEY)) in btrfs_read_qgroup_config() 502 qgroup = add_qgroup_rb(fs_info, prealloc, found_key.offset); in btrfs_read_qgroup_config() 527 switch (found_key.type) { in btrfs_read_qgroup_config() [all …]
|
| H A D | scrub.c | 575 struct btrfs_key found_key; in scrub_print_common_warning() local 598 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_common_warning() 603 swarn.extent_item_size = found_key.offset; in scrub_print_common_warning() 615 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in scrub_print_common_warning() 638 ctx.bytenr = found_key.objectid; in scrub_print_common_warning() 639 ctx.extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_common_warning() 2629 struct btrfs_key found_key; in scrub_enumerate_chunks() local 2669 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks() 2671 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks() 2674 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks() [all …]
|
| H A D | ctree.h | 594 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key); 701 #define btrfs_for_each_slot(root, key, found_key, path, iter_ret) \ argument 704 (iter_ret = btrfs_get_next_valid_item((root), (found_key), (path))) == 0; \
|
| H A D | ctree.c | 1663 struct btrfs_key *found_key) in btrfs_find_item() argument 1670 ASSERT(found_key); in btrfs_find_item() 1688 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item() 1689 if (found_key->type != key.type || in btrfs_find_item() 1690 found_key->objectid != key.objectid) in btrfs_find_item() 2376 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local 2412 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf() 2413 ret = btrfs_comp_keys(&found_key, &orig_key); in btrfs_prev_leaf() 2427 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf() 2428 ret = btrfs_comp_keys(&found_key, &key); in btrfs_prev_leaf() [all …]
|
| H A D | volumes.c | 1953 struct btrfs_key found_key; in btrfs_free_dev_extent() local 1972 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_free_dev_extent() 1975 BUG_ON(found_key.offset > start || found_key.offset + in btrfs_free_dev_extent() 1977 key = found_key; in btrfs_free_dev_extent() 2019 struct btrfs_key found_key; in find_next_devid() local 2046 btrfs_item_key_to_cpu(path->nodes[0], &found_key, in find_next_devid() 2048 *devid_ret = found_key.offset + 1; in find_next_devid() 3728 struct btrfs_key found_key; in btrfs_relocate_sys_chunks() local 3772 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_relocate_sys_chunks() 3780 ret = btrfs_relocate_chunk(fs_info, found_key.offset, in btrfs_relocate_sys_chunks() [all …]
|
| H A D | block-group.c | 620 struct btrfs_key *found_key, in sample_block_group_extent_item() argument 650 btrfs_for_each_slot(extent_root, &search_key, found_key, path, ret) { in sample_block_group_extent_item() 652 if (found_key->type == BTRFS_EXTENT_ITEM_KEY && in sample_block_group_extent_item() 653 found_key->objectid >= block_group->start && in sample_block_group_extent_item() 654 found_key->objectid + found_key->offset <= search_end) in sample_block_group_extent_item() 658 if (found_key->objectid >= search_end) { in sample_block_group_extent_item() 2229 struct btrfs_key found_key; in find_first_block_group() local 2236 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group() 2237 if (found_key.objectid >= key->objectid && in find_first_block_group() 2238 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group() [all …]
|
| H A D | tree-checker.c | 2693 struct btrfs_key found_key; in btrfs_verify_level_key() local 2727 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key() 2729 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key() 2731 ret = btrfs_comp_cpu_keys(&check->first_key, &found_key); in btrfs_verify_level_key() 2738 found_key.objectid, found_key.type, in btrfs_verify_level_key() 2739 found_key.offset); in btrfs_verify_level_key()
|
| H A D | zoned.c | 1251 struct btrfs_key found_key; in calculate_alloc_pointer() local 1303 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer() 1305 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer() 1306 length = found_key.offset; in calculate_alloc_pointer() 1310 if (unlikely(!(found_key.objectid >= cache->start && in calculate_alloc_pointer() 1311 found_key.objectid + length <= bg_end))) { in calculate_alloc_pointer() 1314 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
|
| H A D | disk-io.c | 424 struct btrfs_key found_key; in btrfs_validate_extent_buffer() local 427 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer() 429 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer() 430 if (unlikely(btrfs_comp_cpu_keys(expect_key, &found_key))) { in btrfs_validate_extent_buffer() 436 found_key.objectid, found_key.type, in btrfs_validate_extent_buffer() 437 found_key.offset); in btrfs_validate_extent_buffer() 5046 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local 5069 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid() 5070 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
|
| H A 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()
|