Lines Matching defs:key
185 struct btrfs_key key;
188 key.objectid = btrfs_ino(BTRFS_I(inode));
189 key.offset = start;
190 key.type = BTRFS_EXTENT_DATA_KEY;
194 ret = btrfs_insert_empty_item(trans, root, path, &key,
1539 /* Found key is not EXTENT_DATA_KEY or starts after req range */
1682 * COW range from cow_start to found_key.offset - 1. As the key
3042 struct btrfs_key key, found_key;
3058 key.objectid = BTRFS_ORPHAN_OBJECTID;
3059 key.type = BTRFS_ORPHAN_ITEM_KEY;
3060 key.offset = (u64)-1;
3063 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
3070 * find the key and see if we have stuff that matches
3140 key.offset = found_key.objectid - 1;
3251 * we found a key greater than an xattr key, there can't
3791 struct btrfs_key key;
3820 btrfs_dir_item_key_to_cpu(leaf, di, &key);
3821 WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid);
3851 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
3852 index = key.offset;
3890 struct btrfs_key key;
3903 btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
3904 if (key.objectid == root->root_key.objectid) {
3908 key.objectid);
3914 key.objectid = root->root_key.objectid;
3915 key.type = BTRFS_ROOT_REF_KEY;
3916 key.offset = (u64)-1;
3918 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
3926 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
3927 if (key.objectid == root->root_key.objectid &&
3928 key.type == BTRFS_ROOT_REF_KEY)
4208 * min_type is the minimum key type to truncate down to. If set to 0, this
4220 struct btrfs_key key;
4280 key.objectid = ino;
4281 key.offset = (u64)-1;
4282 key.type = (u8)-1;
4296 ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
5220 * Return the key found in the dir entry in the location pointer, fill @type
5278 struct btrfs_key key;
5289 key.objectid = BTRFS_I(dir)->root->root_key.objectid;
5290 key.type = BTRFS_ROOT_REF_KEY;
5291 key.offset = location->objectid;
5293 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
5470 struct btrfs_key *key,
5479 memcpy(&BTRFS_I(inode)->location, key, sizeof(*key));
5663 struct btrfs_key key;
5694 key.type = BTRFS_DIR_INDEX_KEY;
5695 key.offset = ctx->pos;
5696 key.objectid = btrfs_ino(BTRFS_I(inode));
5698 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5718 if (found_key.objectid != key.objectid)
5865 struct btrfs_key key, found_key;
5870 key.objectid = btrfs_ino(inode);
5871 key.type = BTRFS_DIR_INDEX_KEY;
5872 key.offset = (u64)-1;
5878 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5993 struct btrfs_key key[2];
6056 key[0].objectid = objectid;
6057 key[0].type = BTRFS_INODE_ITEM_KEY;
6058 key[0].offset = 0;
6069 key[1].objectid = objectid;
6070 key[1].type = BTRFS_INODE_REF_KEY;
6071 key[1].offset = ref_objectid;
6088 ret = btrfs_insert_empty_items(trans, root, path, key, sizes, nitems);
6163 struct btrfs_key key;
6169 memcpy(&key, &inode->root->root_key, sizeof(key));
6171 key.objectid = ino;
6172 key.type = BTRFS_INODE_ITEM_KEY;
6173 key.offset = 0;
6177 ret = btrfs_add_root_ref(trans, key.objectid,
6189 ret = btrfs_insert_dir_item(trans, name, name_len, parent_inode, &key,
6222 err = btrfs_del_root_ref(trans, key.objectid,
7026 struct btrfs_key key;
7055 btrfs_item_key_to_cpu(leaf, &key, slot);
7056 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
7057 key.type != BTRFS_EXTENT_DATA_KEY) {
7062 if (key.offset > offset) {
7078 extent_end = key.offset + btrfs_file_extent_num_bytes(leaf, fi);
7103 *orig_start = key.offset - backref_offset;
7133 key.offset - backref_offset, disk_bytenr,
7147 disk_bytenr += offset - key.offset;
9605 struct btrfs_key key;
9663 key.objectid = btrfs_ino(BTRFS_I(inode));
9664 key.offset = 0;
9665 key.type = BTRFS_EXTENT_DATA_KEY;
9667 err = btrfs_insert_empty_item(trans, root, path, &key,