Lines Matching refs:key

136 		      *root, struct btrfs_key *key, struct btrfs_root_item  in btrfs_update_root()  argument
150 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
159 key->objectid, key->type, key->offset); in btrfs_update_root()
175 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
189 key, sizeof(*item)); in btrfs_update_root()
213 struct btrfs_key *key, struct btrfs_root_item *item) in btrfs_insert_root() argument
219 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
226 struct btrfs_key key; in btrfs_find_orphan_roots() local
240 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_find_orphan_roots()
241 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_find_orphan_roots()
242 key.offset = 0; in btrfs_find_orphan_roots()
248 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
264 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
267 if (key.objectid != BTRFS_ORPHAN_OBJECTID || in btrfs_find_orphan_roots()
268 key.type != BTRFS_ORPHAN_ITEM_KEY) in btrfs_find_orphan_roots()
271 root_key.objectid = key.offset; in btrfs_find_orphan_roots()
272 key.offset++; in btrfs_find_orphan_roots()
328 struct btrfs_key *key) in btrfs_del_root() argument
336 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
357 struct btrfs_key key; in btrfs_del_root_ref() local
366 key.objectid = root_id; in btrfs_del_root_ref()
367 key.type = BTRFS_ROOT_BACKREF_KEY; in btrfs_del_root_ref()
368 key.offset = ref_id; in btrfs_del_root_ref()
370 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
391 if (key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_del_root_ref()
393 key.objectid = ref_id; in btrfs_del_root_ref()
394 key.type = BTRFS_ROOT_REF_KEY; in btrfs_del_root_ref()
395 key.offset = root_id; in btrfs_del_root_ref()
424 struct btrfs_key key; in btrfs_add_root_ref() local
435 key.objectid = root_id; in btrfs_add_root_ref()
436 key.type = BTRFS_ROOT_BACKREF_KEY; in btrfs_add_root_ref()
437 key.offset = ref_id; in btrfs_add_root_ref()
439 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
456 if (key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_add_root_ref()
458 key.objectid = ref_id; in btrfs_add_root_ref()
459 key.type = BTRFS_ROOT_REF_KEY; in btrfs_add_root_ref()
460 key.offset = root_id; in btrfs_add_root_ref()