diff mbox series

[6/7] xfs_scrub: don't call FITRIM after runtime errors

Message ID 172229848123.1349330.4056000330400170809.stgit@frogsfrogsfrogs (mailing list archive)
State Accepted, archived
Headers show
Series [1/7] xfs_scrub: move FITRIM to phase 8 | expand

Commit Message

Darrick J. Wong July 30, 2024, 1:10 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

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>
---
 scrub/phase8.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/scrub/phase8.c b/scrub/phase8.c
index 288800a76..75400c968 100644
--- a/scrub/phase8.c
+++ b/scrub/phase8.c
@@ -39,6 +39,9 @@  fstrim_ok(
 	if (ctx->unfixable_errors != 0)
 		return false;
 
+	if (ctx->runtime_errors != 0)
+		return false;
+
 	return true;
 }