• Home
  • Raw
  • Download

Lines Matching refs:key

72 			struct btrfs_root_item *item, struct btrfs_key *key)  in btrfs_find_last_root()  argument
107 if (key) in btrfs_find_last_root()
108 memcpy(key, &found_key, sizeof(found_key)); in btrfs_find_last_root()
128 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
142 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
151 (unsigned long long)key->objectid, key->type, in btrfs_update_root()
152 (unsigned long long)key->offset); in btrfs_update_root()
168 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
182 key, sizeof(*item)); in btrfs_update_root()
206 struct btrfs_key *key, struct btrfs_root_item *item) in btrfs_insert_root() argument
212 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
225 struct btrfs_key key; in btrfs_find_dead_roots() local
233 key.objectid = objectid; in btrfs_find_dead_roots()
234 btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); in btrfs_find_dead_roots()
235 key.offset = 0; in btrfs_find_dead_roots()
241 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_find_dead_roots()
256 btrfs_item_key_to_cpu(leaf, &key, slot); in btrfs_find_dead_roots()
257 if (btrfs_key_type(&key) != BTRFS_ROOT_ITEM_KEY) in btrfs_find_dead_roots()
260 if (key.objectid < objectid) in btrfs_find_dead_roots()
263 if (key.objectid > objectid) in btrfs_find_dead_roots()
270 memcpy(&found_key, &key, sizeof(key)); in btrfs_find_dead_roots()
271 key.offset++; in btrfs_find_dead_roots()
299 struct btrfs_key key; in btrfs_find_orphan_roots() local
309 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_find_orphan_roots()
310 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_find_orphan_roots()
311 key.offset = 0; in btrfs_find_orphan_roots()
317 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
333 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
336 if (key.objectid != BTRFS_ORPHAN_OBJECTID || in btrfs_find_orphan_roots()
337 key.type != BTRFS_ORPHAN_ITEM_KEY) in btrfs_find_orphan_roots()
340 root_key.objectid = key.offset; in btrfs_find_orphan_roots()
341 key.offset++; in btrfs_find_orphan_roots()
367 struct btrfs_key *key) in btrfs_del_root() argument
377 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
400 struct btrfs_key key; in btrfs_del_root_ref() local
409 key.objectid = root_id; in btrfs_del_root_ref()
410 key.type = BTRFS_ROOT_BACKREF_KEY; in btrfs_del_root_ref()
411 key.offset = ref_id; in btrfs_del_root_ref()
413 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
434 if (key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_del_root_ref()
436 key.objectid = ref_id; in btrfs_del_root_ref()
437 key.type = BTRFS_ROOT_REF_KEY; in btrfs_del_root_ref()
438 key.offset = root_id; in btrfs_del_root_ref()
451 struct btrfs_key key; in btrfs_find_root_ref() local
454 key.objectid = root_id; in btrfs_find_root_ref()
455 key.type = BTRFS_ROOT_REF_KEY; in btrfs_find_root_ref()
456 key.offset = ref_id; in btrfs_find_root_ref()
458 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_root_ref()
482 struct btrfs_key key; in btrfs_add_root_ref() local
493 key.objectid = root_id; in btrfs_add_root_ref()
494 key.type = BTRFS_ROOT_BACKREF_KEY; in btrfs_add_root_ref()
495 key.offset = ref_id; in btrfs_add_root_ref()
497 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
514 if (key.type == BTRFS_ROOT_BACKREF_KEY) { in btrfs_add_root_ref()
516 key.objectid = ref_id; in btrfs_add_root_ref()
517 key.type = BTRFS_ROOT_REF_KEY; in btrfs_add_root_ref()
518 key.offset = root_id; in btrfs_add_root_ref()