linux/fs/xfs/scrub/xfblob.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2021-2024 Oracle.  All Rights Reserved.
 * Author: Darrick J. Wong <[email protected]>
 */
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "scrub/scrub.h"
#include "scrub/xfile.h"
#include "scrub/xfarray.h"
#include "scrub/xfblob.h"

/*
 * XFS Blob Storage
 * ================
 * Stores and retrieves blobs using an xfile.  Objects are appended to the file
 * and the offset is returned as a magic cookie for retrieval.
 */

#define XB_KEY_MAGIC
struct xb_key {} __packed;

/* Initialize a blob storage object. */
int
xfblob_create(
	const char		*description,
	struct xfblob		**blobp)
{}

/* Destroy a blob storage object. */
void
xfblob_destroy(
	struct xfblob	*blob)
{}

/* Retrieve a blob. */
int
xfblob_load(
	struct xfblob	*blob,
	xfblob_cookie	cookie,
	void		*ptr,
	uint32_t	size)
{}

/* Store a blob. */
int
xfblob_store(
	struct xfblob	*blob,
	xfblob_cookie	*cookie,
	const void	*ptr,
	uint32_t	size)
{}

/* Free a blob. */
int
xfblob_free(
	struct xfblob	*blob,
	xfblob_cookie	cookie)
{}

/* How many bytes is this blob storage object consuming? */
unsigned long long
xfblob_bytes(
	struct xfblob		*blob)
{}

/* Drop all the blobs. */
void
xfblob_truncate(
	struct xfblob	*blob)
{}