Lines Matching refs:uuid_root

34 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, u8 *uuid,  in btrfs_uuid_tree_lookup()  argument
45 if (WARN_ON_ONCE(!uuid_root)) { in btrfs_uuid_tree_lookup()
57 ret = btrfs_search_slot(NULL, uuid_root, &key, path, 0, 0); in btrfs_uuid_tree_lookup()
72 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", in btrfs_uuid_tree_lookup()
94 struct btrfs_root *uuid_root, u8 *uuid, u8 type, in btrfs_uuid_tree_add() argument
105 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, type, subid_cpu); in btrfs_uuid_tree_add()
109 if (WARN_ON_ONCE(!uuid_root)) { in btrfs_uuid_tree_add()
122 ret = btrfs_insert_empty_item(trans, uuid_root, path, &key, in btrfs_uuid_tree_add()
134 btrfs_extend_item(uuid_root, path, sizeof(subid_le)); in btrfs_uuid_tree_add()
140 btrfs_warn(uuid_root->fs_info, "insert uuid item failed %d " in btrfs_uuid_tree_add()
158 struct btrfs_root *uuid_root, u8 *uuid, u8 type, in btrfs_uuid_tree_rem() argument
172 if (WARN_ON_ONCE(!uuid_root)) { in btrfs_uuid_tree_rem()
185 ret = btrfs_search_slot(trans, uuid_root, &key, path, -1, 1); in btrfs_uuid_tree_rem()
187 btrfs_warn(uuid_root->fs_info, "error %d while searching for uuid item!", in btrfs_uuid_tree_rem()
201 btrfs_warn(uuid_root->fs_info, "uuid item with illegal size %lu!", in btrfs_uuid_tree_rem()
223 ret = btrfs_del_item(trans, uuid_root, path); in btrfs_uuid_tree_rem()
231 btrfs_truncate_item(uuid_root, path, item_size - sizeof(subid), 1); in btrfs_uuid_tree_rem()
238 static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type, in btrfs_uuid_iter_rem() argument
245 trans = btrfs_start_transaction(uuid_root, 1); in btrfs_uuid_iter_rem()
251 ret = btrfs_uuid_tree_rem(trans, uuid_root, uuid, type, subid); in btrfs_uuid_iter_rem()
252 btrfs_end_transaction(trans, uuid_root); in btrfs_uuid_iter_rem()
262 struct btrfs_root *root = fs_info->uuid_root; in btrfs_uuid_tree_iterate()