Lines Matching refs:key
77 struct btrfs_root_item *item, struct btrfs_key *key) in btrfs_find_last_root() argument
107 memcpy(key, &found_key, sizeof(found_key)); in btrfs_find_last_root()
118 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
129 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
136 (unsigned long long)key->objectid, key->type, in btrfs_update_root()
137 (unsigned long long)key->offset); in btrfs_update_root()
153 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_insert_root() argument
157 ret = btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
173 struct btrfs_key key; in btrfs_find_dead_roots() local
181 key.objectid = objectid; in btrfs_find_dead_roots()
182 btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); in btrfs_find_dead_roots()
183 key.offset = 0; in btrfs_find_dead_roots()
189 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_find_dead_roots()
205 btrfs_item_key_to_cpu(leaf, &key, slot); in btrfs_find_dead_roots()
206 if (btrfs_key_type(&key) != BTRFS_ROOT_ITEM_KEY) in btrfs_find_dead_roots()
209 if (key.objectid < objectid) in btrfs_find_dead_roots()
212 if (key.objectid > objectid) in btrfs_find_dead_roots()
219 memcpy(&found_key, &key, sizeof(key)); in btrfs_find_dead_roots()
220 key.offset++; in btrfs_find_dead_roots()
249 struct btrfs_key *key) in btrfs_del_root() argument
259 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
281 struct btrfs_key key;
287 key.objectid = root_id;
288 key.type = type;
289 key.offset = ref_id;
291 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
306 struct btrfs_key key; in btrfs_find_root_ref() local
309 key.objectid = root_id; in btrfs_find_root_ref()
310 key.type = BTRFS_ROOT_REF_KEY; in btrfs_find_root_ref()
311 key.offset = ref_id; in btrfs_find_root_ref()
313 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_root_ref()
337 struct btrfs_key key; in btrfs_add_root_ref() local
347 key.objectid = root_id; in btrfs_add_root_ref()
348 key.type = type; in btrfs_add_root_ref()
349 key.offset = ref_id; in btrfs_add_root_ref()
351 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()