1
2
3
4
5
6 #ifndef __XFS_SCRUB_BTREE_H__
7 #define __XFS_SCRUB_BTREE_H__
8
9
10
11
12 bool xchk_btree_process_error(struct xfs_scrub *sc,
13 struct xfs_btree_cur *cur, int level, int *error);
14
15
16 bool xchk_btree_xref_process_error(struct xfs_scrub *sc,
17 struct xfs_btree_cur *cur, int level, int *error);
18
19
20 void xchk_btree_set_corrupt(struct xfs_scrub *sc,
21 struct xfs_btree_cur *cur, int level);
22
23
24 void xchk_btree_xref_set_corrupt(struct xfs_scrub *sc,
25 struct xfs_btree_cur *cur, int level);
26
27 struct xchk_btree;
28 typedef int (*xchk_btree_rec_fn)(
29 struct xchk_btree *bs,
30 union xfs_btree_rec *rec);
31
32 struct xchk_btree {
33
34 struct xfs_scrub *sc;
35 struct xfs_btree_cur *cur;
36 xchk_btree_rec_fn scrub_rec;
37 const struct xfs_owner_info *oinfo;
38 void *private;
39
40
41 union xfs_btree_rec lastrec;
42 bool firstrec;
43 union xfs_btree_key lastkey[XFS_BTREE_MAXLEVELS];
44 bool firstkey[XFS_BTREE_MAXLEVELS];
45 struct list_head to_check;
46 };
47 int xchk_btree(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
48 xchk_btree_rec_fn scrub_fn, const struct xfs_owner_info *oinfo,
49 void *private);
50
51 #endif