linux/fs/btrfs/uuid-tree.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) STRATO AG 2013.  All rights reserved.
 */

#include <linux/uuid.h>
#include <asm/unaligned.h>
#include "messages.h"
#include "ctree.h"
#include "transaction.h"
#include "disk-io.h"
#include "fs.h"
#include "accessors.h"
#include "uuid-tree.h"

static void btrfs_uuid_to_key(const u8 *uuid, u8 type, struct btrfs_key *key)
{}

/* return -ENOENT for !found, < 0 for errors, or 0 if an item was found */
static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, const u8 *uuid,
				  u8 type, u64 subid)
{}

int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, const u8 *uuid, u8 type,
			u64 subid_cpu)
{}

int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, const u8 *uuid, u8 type,
			u64 subid)
{}

static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type,
			       u64 subid)
{}

/*
 * Check if there's an matching subvolume for given UUID
 *
 * Return:
 * 0	check succeeded, the entry is not outdated
 * > 0	if the check failed, the caller should remove the entry
 * < 0	if an error occurred
 */
static int btrfs_check_uuid_tree_entry(struct btrfs_fs_info *fs_info,
				       const u8 *uuid, u8 type, u64 subvolid)
{}

int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info)
{}