]>
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 | ||
83d2c80b | 9 | struct action_list { |
ee310b0c DW |
10 | struct list_head list; |
11 | size_t nr; | |
12 | bool sorted; | |
13 | }; | |
14 | ||
83d2c80b DW |
15 | int action_lists_alloc(size_t nr, struct action_list **listsp); |
16 | void action_lists_free(struct action_list **listsp); | |
ee310b0c | 17 | |
83d2c80b DW |
18 | void action_list_init(struct action_list *alist); |
19 | size_t action_list_length(struct action_list *alist); | |
20 | void action_list_add(struct action_list *dest, struct action_item *item); | |
21 | void action_list_splice(struct action_list *dest, struct action_list *src); | |
ee310b0c | 22 | |
83d2c80b DW |
23 | void action_list_find_mustfix(struct action_list *actions, |
24 | struct action_list *immediate_alist, | |
ee310b0c DW |
25 | unsigned long long *broken_primaries, |
26 | unsigned long long *broken_secondaries); | |
27 | ||
28 | /* Passed through to xfs_repair_metadata() */ | |
29 | #define ALP_REPAIR_ONLY (XRM_REPAIR_ONLY) | |
06e49f3e | 30 | #define ALP_COMPLAIN_IF_UNFIXED (XRM_COMPLAIN_IF_UNFIXED) |
ee310b0c DW |
31 | #define ALP_NOPROGRESS (1U << 31) |
32 | ||
83d2c80b DW |
33 | int action_list_process(struct scrub_ctx *ctx, int fd, |
34 | struct action_list *alist, unsigned int repair_flags); | |
35 | void action_list_defer(struct scrub_ctx *ctx, xfs_agnumber_t agno, | |
36 | struct action_list *alist); | |
37 | int action_list_process_or_defer(struct scrub_ctx *ctx, xfs_agnumber_t agno, | |
38 | struct action_list *alist); | |
ee310b0c DW |
39 | |
40 | #endif /* XFS_SCRUB_REPAIR_H_ */ |