diff mbox series

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

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

Commit Message

Darrick J. Wong July 2, 2024, 1:02 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>
---
 scrub/phase8.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Christoph Hellwig July 2, 2024, 5:28 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/scrub/phase8.c b/scrub/phase8.c
index 288800a76cff..75400c968595 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;
 }