aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-10-16 22:35:26 -0400
committerEric Sandeen <sandeen@sandeen.net>2019-10-16 22:35:26 -0400
commit601ebcd8f062423c6cdae176c19e8f78002ecb3f (patch)
treebf2c1da1017ba71c701fe33c3bdc557e036ab7aa
parent8cab77d356b7d9dba0caadcfefad16ffbdaf6e62 (diff)
downloadxfsprogs-dev-601ebcd8f062423c6cdae176c19e8f78002ecb3f.tar.gz
xfs_scrub: fix queue-and-stash of non-contiguous verify requests
read_verify_schedule_io is supposed to have the ability to decide that a retained aggregate extent verification request is not sufficiently contiguous with the request that is being scheduled, and therefore it needs to queue the retained request and use the new request to start building a new aggregate request. Unfortunately, it stupidly returns after queueing the IO, so we lose the incoming request. Fix the code so we only do that if there's a run time error. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--scrub/read_verify.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/scrub/read_verify.c b/scrub/read_verify.c
index c19b228937..eadeb7e568 100644
--- a/scrub/read_verify.c
+++ b/scrub/read_verify.c
@@ -269,8 +269,13 @@ read_verify_schedule_io(
rv->io_length = max(req_end, rv_end) - rv->io_start;
} else {
/* Otherwise, issue the stashed IO (if there is one) */
- if (rv->io_length > 0)
- return read_verify_queue(rvp, rv);
+ if (rv->io_length > 0) {
+ int res;
+
+ res = read_verify_queue(rvp, rv);
+ if (res)
+ return res;
+ }
/* Stash the new IO. */
rv->io_start = start;