Lines Matching refs:key

673 	struct btrfs_key key;  in load_block_group_size_class()  local
685 ret = sample_block_group_extent_item(caching_ctl, block_group, i, 5, &key); in load_block_group_size_class()
690 min_size = min_t(u64, min_size, key.offset); in load_block_group_size_class()
709 struct btrfs_key key; in load_extent_tree_free() local
742 key.objectid = last; in load_extent_tree_free()
743 key.offset = 0; in load_extent_tree_free()
744 key.type = BTRFS_EXTENT_ITEM_KEY; in load_extent_tree_free()
747 ret = btrfs_search_slot(NULL, extent_root, &key, path, 0, 0); in load_extent_tree_free()
761 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in load_extent_tree_free()
763 ret = btrfs_find_next_key(extent_root, path, &key, 0, 0); in load_extent_tree_free()
788 if (key.objectid < last) { in load_extent_tree_free()
789 key.objectid = last; in load_extent_tree_free()
790 key.offset = 0; in load_extent_tree_free()
791 key.type = BTRFS_EXTENT_ITEM_KEY; in load_extent_tree_free()
796 if (key.objectid < block_group->start) { in load_extent_tree_free()
801 if (key.objectid >= block_group->start + block_group->length) in load_extent_tree_free()
804 if (key.type == BTRFS_EXTENT_ITEM_KEY || in load_extent_tree_free()
805 key.type == BTRFS_METADATA_ITEM_KEY) { in load_extent_tree_free()
809 key.objectid, &space_added); in load_extent_tree_free()
813 if (key.type == BTRFS_METADATA_ITEM_KEY) in load_extent_tree_free()
814 last = key.objectid + in load_extent_tree_free()
817 last = key.objectid + key.offset; in load_extent_tree_free()
1031 struct btrfs_key key; in remove_block_group_item() local
1035 key.objectid = block_group->start; in remove_block_group_item()
1036 key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; in remove_block_group_item()
1037 key.offset = block_group->length; in remove_block_group_item()
1039 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in remove_block_group_item()
1990 static int read_bg_from_eb(struct btrfs_fs_info *fs_info, struct btrfs_key *key, in read_bg_from_eb() argument
2006 em = lookup_extent_mapping(em_tree, key->objectid, key->offset); in read_bg_from_eb()
2011 key->objectid, key->offset); in read_bg_from_eb()
2015 if (em->start != key->objectid || em->len != key->offset) { in read_bg_from_eb()
2018 key->objectid, key->offset, em->start, em->len); in read_bg_from_eb()
2031 key->objectid, key->offset, flags, in read_bg_from_eb()
2043 struct btrfs_key *key) in find_first_block_group() argument
2049 btrfs_for_each_slot(root, key, &found_key, path, ret) { in find_first_block_group()
2050 if (found_key.objectid >= key->objectid && in find_first_block_group()
2315 const struct btrfs_key *key, in read_one_block_group() argument
2322 ASSERT(key->type == BTRFS_BLOCK_GROUP_ITEM_KEY); in read_one_block_group()
2324 cache = btrfs_create_block_group_cache(info, key->objectid); in read_one_block_group()
2328 cache->length = key->offset; in read_one_block_group()
2491 struct btrfs_key key; in btrfs_read_block_groups() local
2507 key.objectid = 0; in btrfs_read_block_groups()
2508 key.offset = 0; in btrfs_read_block_groups()
2509 key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; in btrfs_read_block_groups()
2526 ret = find_first_block_group(info, path, &key); in btrfs_read_block_groups()
2538 btrfs_item_key_to_cpu(leaf, &key, slot); in btrfs_read_block_groups()
2540 ret = read_one_block_group(info, &bgi, &key, need_clear); in btrfs_read_block_groups()
2543 key.objectid += key.offset; in btrfs_read_block_groups()
2544 key.offset = 0; in btrfs_read_block_groups()
2608 struct btrfs_key key; in insert_block_group_item() local
2619 key.objectid = block_group->start; in insert_block_group_item()
2620 key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; in insert_block_group_item()
2621 key.offset = block_group->length; in insert_block_group_item()
2624 ret = btrfs_insert_item(trans, root, &key, &bgi, sizeof(bgi)); in insert_block_group_item()
2643 struct btrfs_key key; in insert_dev_extent() local
2652 key.objectid = device->devid; in insert_dev_extent()
2653 key.type = BTRFS_DEV_EXTENT_KEY; in insert_dev_extent()
2654 key.offset = start; in insert_dev_extent()
2655 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*extent)); in insert_dev_extent()
3054 struct btrfs_key key; in update_block_group_item() local
3075 key.objectid = cache->start; in update_block_group_item()
3076 key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; in update_block_group_item()
3077 key.offset = cache->length; in update_block_group_item()
3079 ret = btrfs_search_slot(trans, root, &key, path, 0, 1); in update_block_group_item()