]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub: read verification isn't ok if it hit runtime errors
authorDarrick J. Wong <djwong@kernel.org>
Thu, 4 Jun 2026 06:09:47 +0000 (23:09 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 11 Jun 2026 10:26:04 +0000 (12:26 +0200)
Codex complains that a read-verify pool couldn't possibly be ok if
someone set the runtime_error field to a nonzero value.  That's true, so
fix the predicate.

Cc: linux-xfs@vger.kernel.org # v7.0.0
Fixes: 58fca77c2d2ae8 ("xfs_scrub: move failmap and other outputs into read_verify_pool")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
scrub/read_verify.c

index 7dd588c1482af5229259c4e632298b17bff4e456..01e96f5bef40f69a38132bedbeb20fc0bb92beb9 100644 (file)
@@ -557,7 +557,7 @@ bool
 read_verify_ok(
        const struct read_verify_pool   *rvp)
 {
-       return rvp->failmap == NULL && !rvp->truncated;
+       return rvp->failmap == NULL && !rvp->truncated && !rvp->runtime_error;
 }
 
 /* Did the verification unexpectedly stop early due to short reads? */