// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2021-2024 Oracle. All Rights Reserved. * Author: Darrick J. Wong <djwong@kernel.org>
*/ #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 0xABAADDAD struct xb_key {
uint32_t xb_magic; /* XB_KEY_MAGIC */
uint32_t xb_size; /* size of the blob, in bytes */
loff_t xb_offset; /* byte offset of this key */ /* blob comes after here */
} __packed;
/* Initialize a blob storage object. */ int
xfblob_create( constchar *description, struct xfblob **blobp)
{ struct xfblob *blob; struct xfile *xfile; int error;
error = xfile_create(description, 0, &xfile); if (error) return error;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.