]>
Commit | Line | Data |
---|---|---|
ee310b0c DW |
1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | /* | |
3 | * Copyright (C) 2018 Oracle. All Rights Reserved. | |
4 | * Author: Darrick J. Wong <darrick.wong@oracle.com> | |
5 | */ | |
6 | #ifndef XFS_SCRUB_REPAIR_H_ | |
7 | #define XFS_SCRUB_REPAIR_H_ | |
8 | ||
9 | struct xfs_action_list { | |
10 | struct list_head list; | |
11 | size_t nr; | |
12 | bool sorted; | |
13 | }; | |
14 | ||
15 | bool xfs_action_lists_alloc(size_t nr, struct xfs_action_list **listsp); | |
16 | void xfs_action_lists_free(struct xfs_action_list **listsp); | |
17 | ||
18 | void xfs_action_list_init(struct xfs_action_list *alist); | |
19 | size_t xfs_action_list_length(struct xfs_action_list *alist); | |
20 | void xfs_action_list_add(struct xfs_action_list *dest, | |
21 | struct action_item *item); | |
22 | void xfs_action_list_splice(struct xfs_action_list *dest, | |
23 | struct xfs_action_list *src); | |
24 | ||
25 | void xfs_action_list_find_mustfix(struct xfs_action_list *actions, | |
26 | struct xfs_action_list *immediate_alist, | |
27 | unsigned long long *broken_primaries, | |
28 | unsigned long long *broken_secondaries); | |
29 | ||
30 | /* Passed through to xfs_repair_metadata() */ | |
31 | #define ALP_REPAIR_ONLY (XRM_REPAIR_ONLY) | |
06e49f3e | 32 | #define ALP_COMPLAIN_IF_UNFIXED (XRM_COMPLAIN_IF_UNFIXED) |
ee310b0c DW |
33 | #define ALP_NOPROGRESS (1U << 31) |
34 | ||
35 | bool xfs_action_list_process(struct scrub_ctx *ctx, int fd, | |
36 | struct xfs_action_list *alist, unsigned int repair_flags); | |
37 | void xfs_action_list_defer(struct scrub_ctx *ctx, xfs_agnumber_t agno, | |
38 | struct xfs_action_list *alist); | |
39 | bool xfs_action_list_process_or_defer(struct scrub_ctx *ctx, xfs_agnumber_t agno, | |
40 | struct xfs_action_list *alist); | |
41 | ||
42 | #endif /* XFS_SCRUB_REPAIR_H_ */ |