Lines Matching refs:uuid
6 #include <linux/uuid.h>
14 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
17 key->objectid = get_unaligned_le64(uuid);
18 key->offset = get_unaligned_le64(uuid + sizeof(u64));
22 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, u8 *uuid,
44 btrfs_uuid_to_key(uuid, type, &key);
61 "uuid item with illegal size %lu!",
82 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
95 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, type, subid_cpu);
104 btrfs_uuid_to_key(uuid, type, &key);
131 "insert uuid item failed %d (0x%016llx, 0x%016llx) type %u!",
147 int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
168 btrfs_uuid_to_key(uuid, type, &key);
178 btrfs_warn(fs_info, "error %d while searching for uuid item!",
192 btrfs_warn(fs_info, "uuid item with illegal size %lu!",
229 static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type,
235 /* 1 - for the uuid item */
242 ret = btrfs_uuid_tree_remove(trans, uuid, type, subid);
258 u8 *uuid, u8 type, u64 subvolid)
277 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE))
281 if (memcmp(uuid, subvol_root->root_item.received_uuid,
338 "uuid item with illegal size %lu!",
343 u8 uuid[BTRFS_UUID_SIZE];
347 put_unaligned_le64(key.objectid, uuid);
348 put_unaligned_le64(key.offset, uuid + sizeof(u64));
352 ret = btrfs_check_uuid_tree_entry(fs_info, uuid,
358 ret = btrfs_uuid_iter_rem(root, uuid, key.type,