From 78a6469cfc9094763320e61c60f9aaef0ece9689 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 5 Feb 2014 13:15:22 -0700 Subject: [PATCH] More precise fix for verify_backlog verification failure Commit c2703bf3 could be a bit more precise - we only need to add to the byte count if verify_backlog is enabled, since that is the case where do_io() will run both the IO and verify IO. Signed-off-by: Jens Axboe --- backend.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend.c b/backend.c index 84509575..62fa17c3 100644 --- a/backend.c +++ b/backend.c @@ -651,8 +651,14 @@ static uint64_t do_io(struct thread_data *td) lat_target_init(td); + /* + * If verify_backlog is enabled, we'll run the verify in this + * handler as well. For that case, we may need up to twice the + * amount of bytes. + */ total_bytes = td->o.size; - if (td->o.verify != VERIFY_NONE && td_write(td)) + if (td->o.verify != VERIFY_NONE && + (td_write(td) && td->o.verify_backlog)) total_bytes += td->o.size; while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) || -- 2.25.1