]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - scrub/repair.h
xfs_scrub: remove moveon from repair action list helpers
[thirdparty/xfsprogs-dev.git] / scrub / repair.h
CommitLineData
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 9struct action_list {
ee310b0c
DW
10 struct list_head list;
11 size_t nr;
12 bool sorted;
13};
14
83d2c80b
DW
15int action_lists_alloc(size_t nr, struct action_list **listsp);
16void action_lists_free(struct action_list **listsp);
ee310b0c 17
83d2c80b
DW
18void action_list_init(struct action_list *alist);
19size_t action_list_length(struct action_list *alist);
20void action_list_add(struct action_list *dest, struct action_item *item);
21void action_list_splice(struct action_list *dest, struct action_list *src);
ee310b0c 22
83d2c80b
DW
23void 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
33int action_list_process(struct scrub_ctx *ctx, int fd,
34 struct action_list *alist, unsigned int repair_flags);
35void action_list_defer(struct scrub_ctx *ctx, xfs_agnumber_t agno,
36 struct action_list *alist);
37int 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_ */