Home
last modified time | relevance | path

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

/linux/fs/btrfs/ !
H A Dfree-space-tree.c204 struct btrfs_key key, found_key; in btrfs_convert_free_space_to_bitmaps() local
238 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0] - 1); in btrfs_convert_free_space_to_bitmaps()
240 if (found_key.type == BTRFS_FREE_SPACE_INFO_KEY) { in btrfs_convert_free_space_to_bitmaps()
241 ASSERT(found_key.objectid == block_group->start); in btrfs_convert_free_space_to_bitmaps()
242 ASSERT(found_key.offset == block_group->length); in btrfs_convert_free_space_to_bitmaps()
245 } else if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in btrfs_convert_free_space_to_bitmaps()
248 ASSERT(found_key.objectid >= start); in btrfs_convert_free_space_to_bitmaps()
249 ASSERT(found_key.objectid < end); in btrfs_convert_free_space_to_bitmaps()
250 ASSERT(found_key.objectid + found_key.offset <= end); in btrfs_convert_free_space_to_bitmaps()
252 first = div_u64(found_key.objectid - start, in btrfs_convert_free_space_to_bitmaps()
[all …]
H A Dinode-item.c392 struct btrfs_key found_key; in btrfs_lookup_inode() local
399 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_lookup_inode()
400 if (found_key.objectid == location->objectid && in btrfs_lookup_inode()
401 found_key.type == location->type) { in btrfs_lookup_inode()
450 struct btrfs_key found_key; in btrfs_truncate_inode_items() local
516 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_truncate_inode_items()
517 found_type = found_key.type; in btrfs_truncate_inode_items()
519 if (found_key.objectid != control->ino) in btrfs_truncate_inode_items()
525 item_end = found_key.offset; in btrfs_truncate_inode_items()
537 found_key.offset, extent_type, in btrfs_truncate_inode_items()
[all …]
H A Dexport.c162 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 Dfile-item.c207 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()
1074 struct btrfs_key found_key; in find_next_csum_offset() local
1089 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); in find_next_csum_offset()
1091 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || in find_next_csum_offset()
1092 found_key.type != BTRFS_EXTENT_CSUM_KEY) in find_next_csum_offset()
1095 *next_offset = found_key.offset; in find_next_csum_offset()
1106 struct btrfs_key found_key; in btrfs_csum_file_blocks() local
[all …]
H A Dbackref.c1014 struct btrfs_key found_key; in add_inline_refs() local
1037 btrfs_item_key_to_cpu(leaf, &found_key, slot); in add_inline_refs()
1042 if (found_key.type == BTRFS_EXTENT_ITEM_KEY && in add_inline_refs()
1050 } else if (found_key.type == BTRFS_METADATA_ITEM_KEY) { in add_inline_refs()
1051 *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 …]
H A Droot-tree.c71 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 Dxattr.c264 struct btrfs_key found_key; in btrfs_listxattr() local
288 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in btrfs_listxattr()
299 if (found_key.objectid != key.objectid) in btrfs_listxattr()
301 if (found_key.type > BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
303 if (found_key.type < BTRFS_XATTR_ITEM_KEY) in btrfs_listxattr()
H A Dsend.c977 struct btrfs_key *found_key, bool resolve, in iterate_inode_ref() argument
1007 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
1021 if (found_key->type == BTRFS_INODE_REF_KEY) { in iterate_inode_ref()
1025 dir = found_key->offset; in iterate_inode_ref()
1058 BTRFS_KEY_FMT_VALUE(found_key)); in iterate_inode_ref()
1224 struct btrfs_key key, found_key; in get_inode_path() local
1243 btrfs_item_key_to_cpu(p->nodes[0], &found_key, p->slots[0]); in get_inode_path()
1244 if (found_key.objectid != ino || in get_inode_path()
1245 (found_key.type != BTRFS_INODE_REF_KEY && in get_inode_path()
1246 found_key.type != BTRFS_INODE_EXTREF_KEY)) in get_inode_path()
[all …]
H A Drelocation.c4427 struct btrfs_key key, found_key; in create_remap_tree_entries() local
4482 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in create_remap_tree_entries()
4484 if (found_key.objectid >= bg->start + bg->length) in create_remap_tree_entries()
4487 if (found_key.type == BTRFS_FREE_SPACE_EXTENT_KEY) { in create_remap_tree_entries()
4489 space_runs[num_space_runs - 1].end == found_key.objectid) { in create_remap_tree_entries()
4491 found_key.objectid + found_key.offset; in create_remap_tree_entries()
4495 space_runs[num_space_runs].start = found_key.objectid; in create_remap_tree_entries()
4497 found_key.objectid + found_key.offset; in create_remap_tree_entries()
4501 } else if (found_key.type == BTRFS_FREE_SPACE_BITMAP_KEY) { in create_remap_tree_entries()
4521 found_key.objectid, space_runs, in create_remap_tree_entries()
[all …]
H A Dinode.c221 struct btrfs_key found_key = { 0 }; in print_data_reloc_error() local
254 ret = extent_from_logical(fs_info, logical, &path, &found_key, &flags); in print_data_reloc_error()
269 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in print_data_reloc_error()
297 ctx.bytenr = found_key.objectid; in print_data_reloc_error()
298 ctx.extent_item_pos = logical - found_key.objectid; in print_data_reloc_error()
302 reloc_warn.extent_item_size = found_key.offset; in print_data_reloc_error()
2161 struct btrfs_key found_key; in run_delalloc_nocow() local
2180 btrfs_item_key_to_cpu(leaf, &found_key, in run_delalloc_nocow()
2182 if (found_key.objectid == ino && in run_delalloc_nocow()
2183 found_key.type == BTRFS_EXTENT_DATA_KEY) in run_delalloc_nocow()
[all …]
H A Draid-stripe-tree.c370 struct btrfs_key found_key; in btrfs_get_raid_extent_offset() local
407 btrfs_item_key_to_cpu(leaf, &found_key, slot); in btrfs_get_raid_extent_offset()
408 found_logical = found_key.objectid; in btrfs_get_raid_extent_offset()
409 found_length = found_key.offset; in btrfs_get_raid_extent_offset()
H A Dtree-log.c2078 struct btrfs_key found_key; in delete_conflicting_dir_entry() local
2080 btrfs_dir_item_key_to_cpu(wc->subvol_path->nodes[0], dst_di, &found_key); in delete_conflicting_dir_entry()
2082 if (found_key.objectid == log_key->objectid && in delete_conflicting_dir_entry()
2083 found_key.type == log_key->type && in delete_conflicting_dir_entry()
2084 found_key.offset == log_key->offset && in delete_conflicting_dir_entry()
2657 struct btrfs_key found_key; in replay_dir_deletes() local
2728 btrfs_item_key_to_cpu(wc->subvol_path->nodes[0], &found_key, in replay_dir_deletes()
2730 if (found_key.objectid != dirid || in replay_dir_deletes()
2731 found_key.type != dir_key.type) { in replay_dir_deletes()
2736 if (found_key.offset > range_end) in replay_dir_deletes()
[all …]
H A Dqgroup.c424 struct btrfs_key found_key; in btrfs_read_qgroup_config() local
463 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_read_qgroup_config()
465 if (found_key.type == BTRFS_QGROUP_STATUS_KEY) { in btrfs_read_qgroup_config()
486 if (found_key.type != BTRFS_QGROUP_INFO_KEY && in btrfs_read_qgroup_config()
487 found_key.type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_read_qgroup_config()
490 qgroup = find_qgroup_rb(fs_info, found_key.offset); in btrfs_read_qgroup_config()
491 if ((qgroup && found_key.type == BTRFS_QGROUP_INFO_KEY) || in btrfs_read_qgroup_config()
492 (!qgroup && found_key.type == BTRFS_QGROUP_LIMIT_KEY)) in btrfs_read_qgroup_config()
503 qgroup = add_qgroup_rb(fs_info, prealloc, found_key.offset); in btrfs_read_qgroup_config()
528 switch (found_key.type) { in btrfs_read_qgroup_config()
[all …]
H A Dscrub.c588 struct btrfs_key found_key; in scrub_print_common_warning() local
611 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_common_warning()
616 swarn.extent_item_size = found_key.offset; in scrub_print_common_warning()
628 ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, in scrub_print_common_warning()
651 ctx.bytenr = found_key.objectid; in scrub_print_common_warning()
652 ctx.extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_common_warning()
2672 struct btrfs_key found_key; in scrub_enumerate_chunks() local
2712 btrfs_item_key_to_cpu(l, &found_key, slot); in scrub_enumerate_chunks()
2714 if (found_key.objectid != scrub_dev->devid) in scrub_enumerate_chunks()
2717 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in scrub_enumerate_chunks()
[all …]
H A Dctree.c1675 struct btrfs_key *found_key) in btrfs_find_item() argument
1682 ASSERT(found_key); in btrfs_find_item()
1700 btrfs_item_key_to_cpu(eb, found_key, path->slots[0]); in btrfs_find_item()
1701 if (found_key->type != key.type || in btrfs_find_item()
1702 found_key->objectid != key.objectid) in btrfs_find_item()
2366 struct btrfs_disk_key found_key; in btrfs_prev_leaf() local
2402 btrfs_item_key(path->nodes[0], &found_key, path->slots[0]); in btrfs_prev_leaf()
2403 ret = btrfs_comp_keys(&found_key, &orig_key); in btrfs_prev_leaf()
2417 btrfs_item_key(path->nodes[0], &found_key, 0); in btrfs_prev_leaf()
2418 ret = btrfs_comp_keys(&found_key, &key); in btrfs_prev_leaf()
[all …]
H A Dctree.h598 u64 inum, u64 ioff, u8 key_type, struct btrfs_key *found_key);
705 #define btrfs_for_each_slot(root, key, found_key, path, iter_ret) \ argument
708 (iter_ret = btrfs_get_next_valid_item((root), (found_key), (path))) == 0; \
H A Ddev-replace.c443 struct btrfs_key found_key; in mark_block_group_to_copy() local
499 btrfs_for_each_slot(root, &key, &found_key, path, iter_ret) { in mark_block_group_to_copy()
502 if (found_key.objectid != src_dev->devid) in mark_block_group_to_copy()
505 if (found_key.type != BTRFS_DEV_EXTENT_KEY) in mark_block_group_to_copy()
508 if (found_key.offset < key.offset) in mark_block_group_to_copy()
H A Dtree-checker.c2307 struct btrfs_key found_key; in btrfs_verify_level_key() local
2341 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
2343 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_verify_level_key()
2345 ret = btrfs_comp_cpu_keys(&check->first_key, &found_key); in btrfs_verify_level_key()
2352 found_key.objectid, found_key.type, in btrfs_verify_level_key()
2353 found_key.offset); in btrfs_verify_level_key()
H A Dblock-group.c592 struct btrfs_key *found_key, in sample_block_group_extent_item() argument
622 btrfs_for_each_slot(extent_root, &search_key, found_key, path, ret) { in sample_block_group_extent_item()
624 if (found_key->type == BTRFS_EXTENT_ITEM_KEY && in sample_block_group_extent_item()
625 found_key->objectid >= block_group->start && in sample_block_group_extent_item()
626 found_key->objectid + found_key->offset <= search_end) in sample_block_group_extent_item()
630 if (found_key->objectid >= search_end) { in sample_block_group_extent_item()
2157 struct btrfs_key found_key; in find_first_block_group() local
2164 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group()
2165 if (found_key.objectid >= key->objectid && in find_first_block_group()
2166 found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) { in find_first_block_group()
[all …]
H A Dbackref.h217 struct btrfs_path *path, struct btrfs_key *found_key,
H A Dzoned.c1235 struct btrfs_key found_key; in calculate_alloc_pointer() local
1287 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); in calculate_alloc_pointer()
1289 if (found_key.type == BTRFS_EXTENT_ITEM_KEY) in calculate_alloc_pointer()
1290 length = found_key.offset; in calculate_alloc_pointer()
1294 if (unlikely(!(found_key.objectid >= cache->start && in calculate_alloc_pointer()
1295 found_key.objectid + length <= bg_end))) { in calculate_alloc_pointer()
1298 *offset_ret = found_key.objectid + length - cache->start; in calculate_alloc_pointer()
H A Ddisk-io.c420 struct btrfs_key found_key; in btrfs_validate_extent_buffer() local
423 btrfs_node_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer()
425 btrfs_item_key_to_cpu(eb, &found_key, 0); in btrfs_validate_extent_buffer()
426 if (unlikely(btrfs_comp_cpu_keys(expect_key, &found_key))) { in btrfs_validate_extent_buffer()
432 found_key.objectid, found_key.type, in btrfs_validate_extent_buffer()
433 found_key.offset); in btrfs_validate_extent_buffer()
4927 struct btrfs_key found_key; in btrfs_init_root_free_objectid() local
4950 btrfs_item_key_to_cpu(l, &found_key, slot); in btrfs_init_root_free_objectid()
4951 root->free_objectid = max_t(u64, found_key.objectid + 1, in btrfs_init_root_free_objectid()
H A Dfree-space-cache.c1169 struct btrfs_key found_key; in update_cache_item() local
1172 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in update_cache_item()
1173 if (found_key.objectid != BTRFS_FREE_SPACE_OBJECTID || in update_cache_item()
1174 found_key.offset != offset) { in update_cache_item()