Lines Matching refs:uuid
6 #include <linux/uuid.h>
15 #include "uuid-tree.h"
17 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
20 key->objectid = get_unaligned_le64(uuid);
21 key->offset = get_unaligned_le64(uuid + sizeof(u64));
25 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, u8 *uuid,
47 btrfs_uuid_to_key(uuid, type, &key);
64 "uuid item with illegal size %lu!",
85 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
98 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, type, subid_cpu);
107 btrfs_uuid_to_key(uuid, type, &key);
134 "insert uuid item failed %d (0x%016llx, 0x%016llx) type %u!",
149 int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
170 btrfs_uuid_to_key(uuid, type, &key);
180 btrfs_warn(fs_info, "error %d while searching for uuid item!",
194 btrfs_warn(fs_info, "uuid item with illegal size %lu!",
231 static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type,
237 /* 1 - for the uuid item */
244 ret = btrfs_uuid_tree_remove(trans, uuid, type, subid);
260 u8 *uuid, u8 type, u64 subvolid)
279 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE))
283 if (memcmp(uuid, subvol_root->root_item.received_uuid,
340 "uuid item with illegal size %lu!",
345 u8 uuid[BTRFS_UUID_SIZE];
349 put_unaligned_le64(key.objectid, uuid);
350 put_unaligned_le64(key.offset, uuid + sizeof(u64));
354 ret = btrfs_check_uuid_tree_entry(fs_info, uuid,
360 ret = btrfs_uuid_iter_rem(root, uuid, key.type,