Lines Matching refs:uuid
6 #include <linux/uuid.h>
14 #include "uuid-tree.h"
16 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
19 key->objectid = get_unaligned_le64(uuid);
20 key->offset = get_unaligned_le64(uuid + sizeof(u64));
24 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, u8 *uuid,
46 btrfs_uuid_to_key(uuid, type, &key);
63 "uuid item with illegal size %lu!",
84 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
97 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, type, subid_cpu);
106 btrfs_uuid_to_key(uuid, type, &key);
133 "insert uuid item failed %d (0x%016llx, 0x%016llx) type %u!",
148 int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
169 btrfs_uuid_to_key(uuid, type, &key);
179 btrfs_warn(fs_info, "error %d while searching for uuid item!",
193 btrfs_warn(fs_info, "uuid item with illegal size %lu!",
230 static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type,
236 /* 1 - for the uuid item */
243 ret = btrfs_uuid_tree_remove(trans, uuid, type, subid);
259 u8 *uuid, u8 type, u64 subvolid)
278 if (memcmp(uuid, subvol_root->root_item.uuid, BTRFS_UUID_SIZE))
282 if (memcmp(uuid, subvol_root->root_item.received_uuid,
339 "uuid item with illegal size %lu!",
344 u8 uuid[BTRFS_UUID_SIZE];
348 put_unaligned_le64(key.objectid, uuid);
349 put_unaligned_le64(key.offset, uuid + sizeof(u64));
353 ret = btrfs_check_uuid_tree_entry(fs_info, uuid,
359 ret = btrfs_uuid_iter_rem(root, uuid, key.type,