aboutsummaryrefslogtreecommitdiffstats
path: root/scrub/phase1.c
diff options
context:
space:
mode:
Diffstat (limited to 'scrub/phase1.c')
-rw-r--r--scrub/phase1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/scrub/phase1.c b/scrub/phase1.c
index 6b986dd278..547767b811 100644
--- a/scrub/phase1.c
+++ b/scrub/phase1.c
@@ -179,6 +179,17 @@ _("Kernel metadata scrubbing facility is required."));
return false;
}
+ /* Do we need kernel-assisted metadata repair? */
+ if (ctx->mode != SCRUB_MODE_DRY_RUN && !xfs_can_repair(ctx)) {
+ if (ctx->mode == SCRUB_MODE_PREEN)
+ str_error(ctx, ctx->mntpoint,
+_("Kernel metadata optimization facility is required."));
+ else
+ str_error(ctx, ctx->mntpoint,
+_("Kernel metadata repair facility is required."));
+ return false;
+ }
+
/* Go find the XFS devices if we have a usable fsmap. */
fs_table_initialise(0, NULL, 0, NULL);
errno = 0;