xfs: bail out of scrub immediately if scan incomplete
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Mar 2021 16:51:52 +0000 (09:51 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 25 Mar 2021 23:47:49 +0000 (16:47 -0700)
If a scrubber cannot complete its check and signals an incomplete check,
we must bail out immediately without updating health status, trying a
repair, etc. because our scan is incomplete and we therefore do not know
much more.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/scrub.c

index 8ebf35b..47c68c7 100644 (file)
@@ -517,7 +517,7 @@ retry_op:
                        goto out;
                sc.flags |= XCHK_TRY_HARDER;
                goto retry_op;
-       } else if (error)
+       } else if (error || (sm->sm_flags & XFS_SCRUB_OFLAG_INCOMPLETE))
                goto out_teardown;
 
        xchk_update_health(&sc);