Lines Matching refs:key

155 	struct btrfs_key key;
167 key.objectid = inum;
168 key.type = BTRFS_INODE_ITEM_KEY;
169 key.offset = 0;
171 ret = btrfs_search_slot(NULL, local_root, &key, &warn->path, 0, 0);
535 struct btrfs_key key;
538 key.objectid = btrfs_ino(inode);
539 key.offset = 0;
540 key.type = BTRFS_EXTENT_DATA_KEY;
543 ret = btrfs_insert_empty_item(trans, root, path, &key,
1865 struct btrfs_key *key,
1924 key->offset - args->extent_offset,
1947 args->disk_bytenr += args->start - key->offset;
2063 /* Found key is not EXTENT_DATA_KEY or starts after req range */
2133 * COW range from cow_start to found_key.offset - 1. As the key
3500 struct btrfs_key key, found_key;
3516 key.objectid = BTRFS_ORPHAN_OBJECTID;
3517 key.type = BTRFS_ORPHAN_ITEM_KEY;
3518 key.offset = (u64)-1;
3521 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
3528 * find the key and see if we have stuff that matches
3612 key.offset = found_key.objectid - 1;
3733 * we found a key greater than an xattr key, there can't
4233 /* This needs to handle no-key deletions later on */
4271 struct btrfs_key key;
4282 /* This needs to handle no-key deletions later on */
4308 btrfs_dir_item_key_to_cpu(leaf, di, &key);
4309 WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid);
4338 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
4339 index = key.offset;
4378 struct btrfs_key key;
4392 btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
4393 if (key.objectid == root->root_key.objectid) {
4397 key.objectid);
4403 key.objectid = root->root_key.objectid;
4404 key.type = BTRFS_ROOT_REF_KEY;
4405 key.offset = (u64)-1;
4407 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
4422 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
4423 if (key.objectid == root->root_key.objectid &&
4424 key.type == BTRFS_ROOT_REF_KEY)
4668 /* This needs to handle no-key deletions later on */
5386 * Return the key found in the dir entry in the location pointer, fill @type
5414 /* This needs to handle no-key deletions later on */
5455 struct btrfs_key key;
5471 key.objectid = dir->root->root_key.objectid;
5472 key.type = BTRFS_ROOT_REF_KEY;
5473 key.offset = location->objectid;
5475 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
5656 struct btrfs_key *key,
5666 memcpy(&BTRFS_I(inode)->location, key, sizeof(*key));
5802 struct btrfs_key key, found_key;
5807 key.objectid = btrfs_ino(inode);
5808 key.type = BTRFS_DIR_INDEX_KEY;
5809 key.offset = (u64)-1;
5815 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5943 struct btrfs_key key;
5971 key.type = BTRFS_DIR_INDEX_KEY;
5972 key.offset = ctx->pos;
5973 key.objectid = btrfs_ino(BTRFS_I(inode));
5975 btrfs_for_each_slot(root, &key, &found_key, path, ret) {
5980 if (found_key.objectid != key.objectid)
6253 struct btrfs_key key[2];
6333 key[0].objectid = objectid;
6334 key[0].type = BTRFS_INODE_ITEM_KEY;
6335 key[0].offset = 0;
6346 key[1].objectid = objectid;
6347 key[1].type = BTRFS_INODE_REF_KEY;
6349 key[1].offset = objectid;
6352 key[1].offset = btrfs_ino(BTRFS_I(dir));
6357 batch.keys = &key[0];
6489 struct btrfs_key key;
6495 memcpy(&key, &inode->root->root_key, sizeof(key));
6497 key.objectid = ino;
6498 key.type = BTRFS_INODE_ITEM_KEY;
6499 key.offset = 0;
6503 ret = btrfs_add_root_ref(trans, key.objectid,
6515 ret = btrfs_insert_dir_item(trans, name, parent_inode, &key,
6546 err = btrfs_del_root_ref(trans, key.objectid,
7129 struct btrfs_key key;
7152 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
7153 if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
7154 key.type != BTRFS_EXTENT_DATA_KEY) {
7159 if (key.offset > offset) {
7177 ret = can_nocow_file_extent(path, &key, BTRFS_I(inode), &nocow_args);
7205 *orig_start = key.offset - nocow_args.extent_offset;
9504 struct btrfs_key key;
9557 key.objectid = btrfs_ino(BTRFS_I(inode));
9558 key.offset = 0;
9559 key.type = BTRFS_EXTENT_DATA_KEY;
9561 err = btrfs_insert_empty_item(trans, root, path, &key,