]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: don't call FITRIM after runtime errors
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:12 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:09 +0000 (17:01 -0700)
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

index 288800a76cffc952b28e3ca3ca1ac1830847f80d..75400c968595a433b7e0a517965e1c441bb485af 100644 (file)
@@ -39,6 +39,9 @@ fstrim_ok(
        if (ctx->unfixable_errors != 0)
                return false;
 
+       if (ctx->runtime_errors != 0)
+               return false;
+
        return true;
 }