blob: 43000318ec470f490deaf3c0d47c5827e6edc604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2021 Oracle. All Rights Reserved.
* Author: Darrick J. Wong <djwong@kernel.org>
*/
#ifndef __XFS_SCRUB_XFILE_H__
#define __XFS_SCRUB_XFILE_H__
struct xfile {
struct file *file;
};
struct xfile *xfile_create(const char *description, loff_t size);
void xfile_destroy(struct xfile *xf);
int xfile_pread(struct xfile *xf, void *buf, size_t count, loff_t offset);
int xfile_pwrite(struct xfile *xf, void *buf, size_t count, loff_t offset);
void xfile_discard(struct xfile *xf, loff_t start, loff_t end);
loff_t xfile_seek_data(struct xfile *xf, loff_t pos);
int xfile_statx(struct xfile *xf, struct kstat *statbuf);
#endif /* __XFS_SCRUB_XFILE_H__ */
|