summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/blob.h
blob: c6f6c6a2e0845b2ec84ce0414a02a50dc1c28270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2019 Oracle.  All Rights Reserved.
 * Author: Darrick J. Wong <darrick.wong@oracle.com>
 */
#ifndef __XFS_SCRUB_BLOB_H__
#define __XFS_SCRUB_BLOB_H__

struct xblob {
	struct file	*filp;
	loff_t		last_offset;
};

typedef loff_t		xblob_cookie;

struct xblob *xblob_init(void);
void xblob_destroy(struct xblob *blob);
int xblob_get(struct xblob *blob, xblob_cookie cookie, void *ptr,
		uint32_t size);
int xblob_put(struct xblob *blob, xblob_cookie *cookie, void *ptr,
		uint32_t size);
int xblob_free(struct xblob *blob, xblob_cookie cookie);

#endif /* __XFS_SCRUB_BLOB_H__ */