1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2021-2024 Oracle. All Rights Reserved.
6 #ifndef __XFS_SCRUB_XFBLOB_H__
7 #define __XFS_SCRUB_XFBLOB_H__
14 typedef loff_t xfblob_cookie;
16 int xfblob_create(const char *descr, struct xfblob **blobp);
17 void xfblob_destroy(struct xfblob *blob);
18 int xfblob_load(struct xfblob *blob, xfblob_cookie cookie, void *ptr,
20 int xfblob_store(struct xfblob *blob, xfblob_cookie *cookie, const void *ptr,
22 int xfblob_free(struct xfblob *blob, xfblob_cookie cookie);
23 unsigned long long xfblob_bytes(struct xfblob *blob);
24 void xfblob_truncate(struct xfblob *blob);
29 xfblob_cookie *cookie,
30 const struct xfs_name *xname)
32 return xfblob_store(blob, cookie, xname->name, xname->len);
39 struct xfs_name *xname,
42 int ret = xfblob_load(blob, cookie, (void *)xname->name, size);
50 #endif /* __XFS_SCRUB_XFBLOB_H__ */