From: Jens Axboe Date: Wed, 5 Feb 2014 20:15:22 +0000 (-0700) Subject: More precise fix for verify_backlog verification failure X-Git-Tag: fio-2.1.5~13 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=78a6469cfc9094763320e61c60f9aaef0ece9689 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 --- 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)) ||