Lines Matching refs:uuid

7 #include <linux/uuid.h>
15 #include "uuid-tree.h"
18 static void btrfs_uuid_to_key(const u8 *uuid, u8 type, struct btrfs_key *key)
21 key->objectid = get_unaligned_le64(uuid);
22 key->offset = get_unaligned_le64(uuid + sizeof(u64));
26 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, const u8 *uuid,
48 btrfs_uuid_to_key(uuid, type, &key);
65 "uuid item with illegal size %lu!",
86 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, const u8 *uuid, u8 type,
99 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, type, subid_cpu);
108 btrfs_uuid_to_key(uuid, type, &key);
135 "insert uuid item failed %d (0x%016llx, 0x%016llx) type %u!",
148 int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, const 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 const 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,
449 if (!btrfs_is_empty_uuid(root_item.uuid) ||
456 * 1 - subvol uuid item
457 * 1 - received_subvol uuid item
470 if (!btrfs_is_empty_uuid(root_item.uuid)) {
471 ret = btrfs_uuid_tree_add(trans, root_item.uuid,
560 task = kthread_run(btrfs_uuid_scan_kthread, fs_info, "btrfs-uuid");