]>
Commit | Line | Data |
---|---|---|
5ef3b66a DW |
1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2 | /* | |
3 | * Copyright (c) 2019 Oracle, Inc. | |
4 | * All Rights Reserved. | |
5 | */ | |
6 | #ifndef __LIBFROG_SCRUB_H__ | |
7 | #define __LIBFROG_SCRUB_H__ | |
8 | ||
9 | /* Type info and names for the scrub types. */ | |
10 | enum xfrog_scrub_type { | |
11 | XFROG_SCRUB_TYPE_NONE, /* not metadata */ | |
12 | XFROG_SCRUB_TYPE_AGHEADER, /* per-AG header */ | |
13 | XFROG_SCRUB_TYPE_PERAG, /* per-AG metadata */ | |
14 | XFROG_SCRUB_TYPE_FS, /* per-FS metadata */ | |
15 | XFROG_SCRUB_TYPE_INODE, /* per-inode metadata */ | |
16 | }; | |
17 | ||
18 | /* Catalog of scrub types and names, indexed by XFS_SCRUB_TYPE_* */ | |
19 | struct xfrog_scrub_descr { | |
20 | const char *name; | |
21 | const char *descr; | |
22 | enum xfrog_scrub_type type; | |
8dd3922c | 23 | unsigned int flags; |
5ef3b66a DW |
24 | }; |
25 | ||
8dd3922c DW |
26 | /* |
27 | * The type of metadata checked by this scrubber is a summary of other types | |
28 | * of metadata. This scrubber should be run after all the others. | |
29 | */ | |
30 | #define XFROG_SCRUB_DESCR_SUMMARY (1 << 0) | |
31 | ||
5ef3b66a DW |
32 | extern const struct xfrog_scrub_descr xfrog_scrubbers[XFS_SCRUB_TYPE_NR]; |
33 | ||
34 | int xfrog_scrub_metadata(struct xfs_fd *xfd, struct xfs_scrub_metadata *meta); | |
35 | ||
36 | #endif /* __LIBFROG_SCRUB_H__ */ |