1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
6 #ifndef XFS_SCRUB_READ_VERIFY_H_
7 #define XFS_SCRUB_READ_VERIFY_H_
10 struct read_verify_pool
;
13 /* Function called when an IO error happens. */
14 typedef void (*read_verify_ioerr_fn_t
)(struct scrub_ctx
*ctx
,
15 struct disk
*disk
, uint64_t start
, uint64_t length
,
16 int error
, void *arg
);
18 struct read_verify_pool
*read_verify_pool_init(struct scrub_ctx
*ctx
,
19 struct disk
*disk
, size_t miniosz
,
20 read_verify_ioerr_fn_t ioerr_fn
,
21 unsigned int submitter_threads
);
22 void read_verify_pool_flush(struct read_verify_pool
*rvp
);
23 void read_verify_pool_destroy(struct read_verify_pool
*rvp
);
25 bool read_verify_schedule_io(struct read_verify_pool
*rvp
, uint64_t start
,
26 uint64_t length
, void *end_arg
);
27 bool read_verify_force_io(struct read_verify_pool
*rvp
);
28 uint64_t read_verify_bytes(struct read_verify_pool
*rvp
);
30 #endif /* XFS_SCRUB_READ_VERIFY_H_ */