forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/fs/xfs/scrub/repair.h
....@@ -6,6 +6,8 @@
66 #ifndef __XFS_SCRUB_REPAIR_H__
77 #define __XFS_SCRUB_REPAIR_H__
88
9
+#include "xfs_quota_defs.h"
10
+
911 static inline int xrep_notsupported(struct xfs_scrub *sc)
1012 {
1113 return -EOPNOTSUPP;
....@@ -15,24 +17,25 @@
1517
1618 /* Repair helpers */
1719
18
-int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub *sc, bool *fixed);
20
+int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub *sc);
1921 void xrep_failure(struct xfs_mount *mp);
2022 int xrep_roll_ag_trans(struct xfs_scrub *sc);
2123 bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks,
2224 enum xfs_ag_resv_type type);
2325 xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub *sc);
24
-int xrep_alloc_ag_block(struct xfs_scrub *sc, struct xfs_owner_info *oinfo,
25
- xfs_fsblock_t *fsbno, enum xfs_ag_resv_type resv);
26
+int xrep_alloc_ag_block(struct xfs_scrub *sc,
27
+ const struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno,
28
+ enum xfs_ag_resv_type resv);
2629 int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb,
2730 struct xfs_buf **bpp, xfs_btnum_t btnum,
2831 const struct xfs_buf_ops *ops);
2932
30
-struct xfs_bitmap;
33
+struct xbitmap;
3134
3235 int xrep_fix_freelist(struct xfs_scrub *sc, bool can_shrink);
33
-int xrep_invalidate_blocks(struct xfs_scrub *sc, struct xfs_bitmap *btlist);
34
-int xrep_reap_extents(struct xfs_scrub *sc, struct xfs_bitmap *exlist,
35
- struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
36
+int xrep_invalidate_blocks(struct xfs_scrub *sc, struct xbitmap *btlist);
37
+int xrep_reap_extents(struct xfs_scrub *sc, struct xbitmap *exlist,
38
+ const struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
3639
3740 struct xrep_find_ag_btree {
3841 /* in: rmap owner of the btree we're looking for */
....@@ -41,9 +44,6 @@
4144 /* in: buffer ops */
4245 const struct xfs_buf_ops *buf_ops;
4346
44
- /* in: magic number of the btree */
45
- uint32_t magic;
46
-
4747 /* out: the highest btree block found and the tree height */
4848 xfs_agblock_t root;
4949 unsigned int height;
....@@ -51,7 +51,7 @@
5151
5252 int xrep_find_ag_btree_roots(struct xfs_scrub *sc, struct xfs_buf *agf_bp,
5353 struct xrep_find_ag_btree *btree_info, struct xfs_buf *agfl_bp);
54
-void xrep_force_quotacheck(struct xfs_scrub *sc, uint dqtype);
54
+void xrep_force_quotacheck(struct xfs_scrub *sc, xfs_dqtype_t type);
5555 int xrep_ino_dqattach(struct xfs_scrub *sc);
5656
5757 /* Metadata repairers */
....@@ -66,8 +66,7 @@
6666
6767 static inline int xrep_attempt(
6868 struct xfs_inode *ip,
69
- struct xfs_scrub *sc,
70
- bool *fixed)
69
+ struct xfs_scrub *sc)
7170 {
7271 return -EOPNOTSUPP;
7372 }
....@@ -78,7 +77,6 @@
7877 xrep_calc_ag_resblks(
7978 struct xfs_scrub *sc)
8079 {
81
- ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR));
8280 return 0;
8381 }
8482