xfs_scrub: don't call FITRIM after runtime errors
Don't call FITRIM if there have been runtime errors -- we don't want to
touch anything after any kind of unfixable problem.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/scrub/phase8.c b/scrub/phase8.c
index 288800a..75400c9 100644
--- a/scrub/phase8.c
+++ b/scrub/phase8.c
@@ -39,6 +39,9 @@
if (ctx->unfixable_errors != 0)
return false;
+ if (ctx->runtime_errors != 0)
+ return false;
+
return true;
}