From: Darrick J. Wong Date: Mon, 29 Jul 2024 23:23:12 +0000 (-0700) Subject: xfs_scrub: don't call FITRIM after runtime errors X-Git-Tag: v6.10.0~14^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=232d3db1695506dc100c68fe86cd596d9659fc7b;p=thirdparty%2Fxfsprogs-dev.git 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 Reviewed-by: Christoph Hellwig --- diff --git a/scrub/phase8.c b/scrub/phase8.c index 288800a7..75400c96 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; }