summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/repair.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-12-15 21:03:39 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-12-15 21:03:39 +0300
commit48a72f60861f790dd7c2db04d69c3a1ce606984e (patch)
treef74e39bb8710f48c1109f9682766787ff5b4798c /fs/xfs/scrub/repair.h
parent8f71bede8efd820627ac05c19eac2758214bc896 (diff)
downloadlinux-48a72f60861f790dd7c2db04d69c3a1ce606984e.tar.xz
xfs: refactor repair forcing tests into a repair.c helper
There are a couple of conditions that userspace can set to force repairs of metadata. These really belong in the repair code and not open-coded into the check code, so refactor them into a helper. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/repair.h')
-rw-r--r--fs/xfs/scrub/repair.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h
index 8aa8b8889e39..51ba3df5998c 100644
--- a/fs/xfs/scrub/repair.h
+++ b/fs/xfs/scrub/repair.h
@@ -28,6 +28,7 @@ static inline int xrep_notsupported(struct xfs_scrub *sc)
/* Repair helpers */
int xrep_attempt(struct xfs_scrub *sc, struct xchk_stats_run *run);
+bool xrep_will_attempt(struct xfs_scrub *sc);
void xrep_failure(struct xfs_mount *mp);
int xrep_roll_ag_trans(struct xfs_scrub *sc);
int xrep_roll_trans(struct xfs_scrub *sc);
@@ -117,6 +118,7 @@ int xrep_reinit_pagi(struct xfs_scrub *sc);
#else
#define xrep_ino_dqattach(sc) (0)
+#define xrep_will_attempt(sc) (false)
static inline int
xrep_attempt(