| .. | .. |
|---|
| 6 | 6 | #ifndef __XFS_SCRUB_REPAIR_H__ |
|---|
| 7 | 7 | #define __XFS_SCRUB_REPAIR_H__ |
|---|
| 8 | 8 | |
|---|
| 9 | +#include "xfs_quota_defs.h" |
|---|
| 10 | + |
|---|
| 9 | 11 | static inline int xrep_notsupported(struct xfs_scrub *sc) |
|---|
| 10 | 12 | { |
|---|
| 11 | 13 | return -EOPNOTSUPP; |
|---|
| .. | .. |
|---|
| 15 | 17 | |
|---|
| 16 | 18 | /* Repair helpers */ |
|---|
| 17 | 19 | |
|---|
| 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); |
|---|
| 19 | 21 | void xrep_failure(struct xfs_mount *mp); |
|---|
| 20 | 22 | int xrep_roll_ag_trans(struct xfs_scrub *sc); |
|---|
| 21 | 23 | bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks, |
|---|
| 22 | 24 | enum xfs_ag_resv_type type); |
|---|
| 23 | 25 | 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); |
|---|
| 26 | 29 | int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb, |
|---|
| 27 | 30 | struct xfs_buf **bpp, xfs_btnum_t btnum, |
|---|
| 28 | 31 | const struct xfs_buf_ops *ops); |
|---|
| 29 | 32 | |
|---|
| 30 | | -struct xfs_bitmap; |
|---|
| 33 | +struct xbitmap; |
|---|
| 31 | 34 | |
|---|
| 32 | 35 | 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); |
|---|
| 36 | 39 | |
|---|
| 37 | 40 | struct xrep_find_ag_btree { |
|---|
| 38 | 41 | /* in: rmap owner of the btree we're looking for */ |
|---|
| .. | .. |
|---|
| 41 | 44 | /* in: buffer ops */ |
|---|
| 42 | 45 | const struct xfs_buf_ops *buf_ops; |
|---|
| 43 | 46 | |
|---|
| 44 | | - /* in: magic number of the btree */ |
|---|
| 45 | | - uint32_t magic; |
|---|
| 46 | | - |
|---|
| 47 | 47 | /* out: the highest btree block found and the tree height */ |
|---|
| 48 | 48 | xfs_agblock_t root; |
|---|
| 49 | 49 | unsigned int height; |
|---|
| .. | .. |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | int xrep_find_ag_btree_roots(struct xfs_scrub *sc, struct xfs_buf *agf_bp, |
|---|
| 53 | 53 | 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); |
|---|
| 55 | 55 | int xrep_ino_dqattach(struct xfs_scrub *sc); |
|---|
| 56 | 56 | |
|---|
| 57 | 57 | /* Metadata repairers */ |
|---|
| .. | .. |
|---|
| 66 | 66 | |
|---|
| 67 | 67 | static inline int xrep_attempt( |
|---|
| 68 | 68 | struct xfs_inode *ip, |
|---|
| 69 | | - struct xfs_scrub *sc, |
|---|
| 70 | | - bool *fixed) |
|---|
| 69 | + struct xfs_scrub *sc) |
|---|
| 71 | 70 | { |
|---|
| 72 | 71 | return -EOPNOTSUPP; |
|---|
| 73 | 72 | } |
|---|
| .. | .. |
|---|
| 78 | 77 | xrep_calc_ag_resblks( |
|---|
| 79 | 78 | struct xfs_scrub *sc) |
|---|
| 80 | 79 | { |
|---|
| 81 | | - ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)); |
|---|
| 82 | 80 | return 0; |
|---|
| 83 | 81 | } |
|---|
| 84 | 82 | |
|---|