]>
Commit | Line | Data |
---|---|---|
959ef981 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2000470d DW |
2 | /* |
3 | * Copyright (C) 2018 Oracle. All Rights Reserved. | |
2000470d | 4 | * Author: Darrick J. Wong <darrick.wong@oracle.com> |
2000470d DW |
5 | */ |
6 | #ifndef XFS_SCRUB_READ_VERIFY_H_ | |
7 | #define XFS_SCRUB_READ_VERIFY_H_ | |
8 | ||
9 | struct scrub_ctx; | |
10 | struct read_verify_pool; | |
f1bb1696 | 11 | struct disk; |
2000470d DW |
12 | |
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); | |
17 | ||
8cab77d3 DW |
18 | int read_verify_pool_alloc(struct scrub_ctx *ctx, struct disk *disk, |
19 | size_t miniosz, read_verify_ioerr_fn_t ioerr_fn, | |
20 | unsigned int submitter_threads, | |
21 | struct read_verify_pool **prvp); | |
4cd869e5 | 22 | void read_verify_pool_abort(struct read_verify_pool *rvp); |
8cab77d3 | 23 | int read_verify_pool_flush(struct read_verify_pool *rvp); |
2000470d DW |
24 | void read_verify_pool_destroy(struct read_verify_pool *rvp); |
25 | ||
8cab77d3 | 26 | int read_verify_schedule_io(struct read_verify_pool *rvp, uint64_t start, |
f1bb1696 | 27 | uint64_t length, void *end_arg); |
8cab77d3 DW |
28 | int read_verify_force_io(struct read_verify_pool *rvp); |
29 | int read_verify_bytes(struct read_verify_pool *rvp, uint64_t *bytes); | |
2000470d DW |
30 | |
31 | #endif /* XFS_SCRUB_READ_VERIFY_H_ */ |