Flexible I/O Tester development
 help / color / mirror / Atom feed
* Proper use of "--verify" switch
@ 2009-09-04 18:40 Chris Worley
  2009-09-04 18:53 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Worley @ 2009-09-04 18:40 UTC (permalink / raw)
  To: fio

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.

Thanks,

Chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Proper use of "--verify" switch
  2009-09-04 18:40 Proper use of "--verify" switch Chris Worley
@ 2009-09-04 18:53 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-09-04 18:53 UTC (permalink / raw)
  To: Chris Worley; +Cc: fio

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-04 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-04 18:40 Proper use of "--verify" switch Chris Worley
2009-09-04 18:53 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox