Lines Matching refs:key

105 	struct btrfs_disk_key key;
114 btrfs_node_key(buf, &key, 0);
115 if (memcmp(parent_key, &key, sizeof(key)))
120 btrfs_node_key(buf, &key, i);
122 if (btrfs_comp_keys(&key, &cpukey) >= 0)
136 struct btrfs_disk_key key;
163 btrfs_item_key(buf, &key, 0);
165 memcmp(parent_key, &key, sizeof(key))) {
167 fprintf(stderr, "leaf parent key incorrect %llu\n",
172 btrfs_item_key(buf, &key, i);
174 if (btrfs_comp_keys(&key, &cpukey) >= 0) {
176 fprintf(stderr, "bad key ordering %d %d\n", i, i+1);
200 btrfs_item_key(buf, &key, 0);
218 struct btrfs_disk_key key;
225 btrfs_node_key(parent, &key, path->slots[level + 1]);
226 key_ptr = &key;
238 * search for key in the extent_buffer. The items start at offset p,
242 * the place where you would insert key if it is not found in
245 * slot may point to max if the key is bigger than all of the keys
248 int item_size, const struct btrfs_key *key,
263 ret = btrfs_comp_keys(tmp, key);
282 int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
289 key, btrfs_header_nritems(eb),
295 key, btrfs_header_nritems(eb),
333 struct btrfs_key key;
337 key.type = key_type;
338 key.objectid = iobjectid;
339 key.offset = ioff;
348 ret = btrfs_search_slot(NULL, fs_root, &key, path, 0, 0);
361 if (found_key->type != key.type ||
362 found_key->objectid != key.objectid) {
374 * look for key in the tree. path is filled in with nodes along the way
375 * if key is found, we return zero and you can find the item in the leaf
378 * If the key isn't found, the path points to the slot where it should
390 struct btrfs_root *root, const struct btrfs_key *key,
430 ret = btrfs_bin_search(b, key, &slot);
471 int sret = split_leaf(trans, root, key,
497 const struct btrfs_key *key,
505 ret = btrfs_search_slot(NULL, root, key, p, 0, 0);