Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Chris Worley <worleys@gmail.com>
Cc: fio@vger.kernel.org
Subject: Re: Proper use of "--verify" switch
Date: Fri, 4 Sep 2009 20:53:19 +0200	[thread overview]
Message-ID: <20090904185319.GC18599@kernel.dk> (raw)
In-Reply-To: <f3177b9e0909041140nb792fdav610cec98f69c2836@mail.gmail.com>

On Fri, Sep 04 2009, Chris Worley wrote:
> Are there example uses, specifically for mixed read/write cases?
> 
> I've found I can do sequential writes followed by sequential reads w/o
> issue, but have errors in other cases.
> 
> Just some usage hints would be nice.

I think the major issue here is that fio can be used to verify a
previously written file, so it'll attach a verify handler to the IO
piece even for the reads in a mixed workload. Not sure how best to
handle that, the below patch will disable that 'feature' if we are doing
a mixed read/write workload. Which probably does make sense, since it's
fairly nonsensical to expect partial read verifies from a previous file
while overwriting other parts of it...

Does it work?

diff --git a/fio.c b/fio.c
index dfd15e0..3a9a3ba 100644
--- a/fio.c
+++ b/fio.c
@@ -606,7 +606,8 @@ static void do_io(struct thread_data *td)
 		 * Add verification end_io handler, if asked to verify
 		 * a previously written file.
 		 */
-		if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ) {
+		if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ &&
+		    !td_rw(td)) {
 			if (td->o.verify_async)
 				io_u->end_io = verify_io_u_async;
 			else

-- 
Jens Axboe


      reply	other threads:[~2009-09-04 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 18:40 Proper use of "--verify" switch Chris Worley
2009-09-04 18:53 ` Jens Axboe [this message]

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=20090904185319.GC18599@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=fio@vger.kernel.org \
    --cc=worleys@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox