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