All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	Dmitry Fomichev <Dmitry.Fomichev@wdc.com>,
	Niklas Cassel <niklas.cassel@wdc.com>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH 1/2] Revert "Fix for loop count issue when do_verify=0 (#1093)"
Date: Fri,  1 Oct 2021 19:32:56 +0900	[thread overview]
Message-ID: <20211001103257.4130231-2-shinichiro.kawasaki@wdc.com> (raw)
In-Reply-To: <20211001103257.4130231-1-shinichiro.kawasaki@wdc.com>

This reverts commit 499cded5f435a0a7c379b606eb3e903d7f43c360.

The commit enabled clear_io_state() call in the loop of thread_main()
after completion of IOs, regardless of verify option. This sets zero to
td->nr_done_files even when the IOs are sequential workload with holes.
Such IOs depend on td->nr_done_files to judge job completion in
__get_next_file(). With zero value in td->nr_done_files, the sequential
IOs do not complete as expected, and results in failure of a test case

Revert the commit to avoid the failure. Regarding the loop count issue
with do_verify=0 option, another fix patch follows.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 backend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend.c b/backend.c
index 4c260747..86fa6d41 100644
--- a/backend.c
+++ b/backend.c
@@ -1920,13 +1920,13 @@ static void *thread_main(void *data)
 		if (td->error || td->terminate)
 			break;
 
-		clear_io_state(td, 0);
-		
 		if (!o->do_verify ||
 		    o->verify == VERIFY_NONE ||
 		    td_ioengine_flagged(td, FIO_UNIDIR))
 			continue;
 
+		clear_io_state(td, 0);
+
 		fio_gettime(&td->start, NULL);
 
 		do_verify(td, verify_bytes);
-- 
2.31.1


  reply	other threads:[~2021-10-01 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 10:32 [PATCH 0/2] Fix job completion failure for sequential IOs with holes Shin'ichiro Kawasaki
2021-10-01 10:32 ` Shin'ichiro Kawasaki [this message]
2021-10-01 10:32 ` [PATCH 2/2] Refer td->loops instead of td->o.loops to fix loop count issue Shin'ichiro Kawasaki
2021-10-01 17:17 ` [PATCH 0/2] Fix job completion failure for sequential IOs with holes Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211001103257.4130231-2-shinichiro.kawasaki@wdc.com \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Dmitry.Fomichev@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=niklas.cassel@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.