diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-05-21 17:07:33 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-10 09:58:02 -0700 |
commit | d9ef536ecbdf78641ef752f252f0640e85e4a817 (patch) | |
tree | 15b41a4a8461e0f4b4b73c1c78e262f128e436f2 /fs/xfs/scrub/repair.h | |
parent | 06289c402a64a211c8e8f32c7e789af4e2e27ba3 (diff) |
xfs: repair the rmapbt
Rebuild the reverse mapping btree from all primary metadata.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/repair.h')
-rw-r--r-- | fs/xfs/scrub/repair.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h index 334ff33031e6..866bec4aea74 100644 --- a/fs/xfs/scrub/repair.h +++ b/fs/xfs/scrub/repair.h @@ -54,6 +54,7 @@ int xrep_ino_dqattach(struct xfs_scrub *sc); int xrep_reset_perag_resv(struct xfs_scrub *sc); int xrep_xattr_reset_fork(struct xfs_scrub *sc, uint64_t nr_attrs); int xrep_metadata_inode_forks(struct xfs_scrub *sc); +int xrep_rmapbt_setup(struct xfs_scrub *sc, struct xfs_inode *ip); /* Metadata revalidators */ @@ -69,6 +70,7 @@ int xrep_agfl(struct xfs_scrub *sc); int xrep_agi(struct xfs_scrub *sc); int xrep_allocbt(struct xfs_scrub *sc); int xrep_iallocbt(struct xfs_scrub *sc); +int xrep_rmapbt(struct xfs_scrub *sc); int xrep_refcountbt(struct xfs_scrub *sc); int xrep_inode(struct xfs_scrub *sc); int xrep_bmap_data(struct xfs_scrub *sc); @@ -111,6 +113,16 @@ xrep_reset_perag_resv( return -EOPNOTSUPP; } +/* rmap setup function for CONFIG_XFS_REPAIR=n */ +static inline int +xrep_rmapbt_setup( + struct xfs_scrub *sc, + struct xfs_inode *ip) +{ + /* We don't support rmap repair, but we can still do a scan. */ + return xchk_setup_ag_btree(sc, ip, false); +} + #define xrep_revalidate_allocbt (NULL) #define xrep_revalidate_iallocbt (NULL) @@ -121,6 +133,7 @@ xrep_reset_perag_resv( #define xrep_agi xrep_notsupported #define xrep_allocbt xrep_notsupported #define xrep_iallocbt xrep_notsupported +#define xrep_rmapbt xrep_notsupported #define xrep_refcountbt xrep_notsupported #define xrep_inode xrep_notsupported #define xrep_bmap_data xrep_notsupported |