Flexible I/O Tester development
 help / color / mirror / Atom feed
* [RFC PATCH] Loop Iteration Offset Bug
@ 2014-10-23 18:51 Brian Fulton
  2014-10-24 20:48 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Fulton @ 2014-10-23 18:51 UTC (permalink / raw)
  To: fio; +Cc: axboe, Akash Verma

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

I have a proposal for a fix for the loop offset bug described here:
http://www.spinics.net/lists/fio/msg03386.html

- Brian


From 7272b3862cc3b3c22ddfb2d5b78348fe69c3fa2b Mon Sep 17 00:00:00 2001
From: Brian Fulton <bfulton@google.com>
Date: Thu, 23 Oct 2014 11:40:59 -0700
Subject: [PATCH 1/1] Reset file descriptor offset value to the initial value
 when file is closed and io state is cleared. This fixes the bug where
 previous offset values persist between loop iterations.

---
 libfio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libfio.c b/libfio.c
index 9ed802a..b823bd4 100644
--- a/libfio.c
+++ b/libfio.c
@@ -108,8 +108,10 @@ void clear_io_state(struct thread_data *td)
  reset_io_counters(td);

  close_files(td);
- for_each_file(td, f, i)
+ for_each_file(td, f, i) {
  fio_file_clear_done(f);
+ f->file_offset = get_start_offset(td, f);
+ }

  /*
  * Set the same seed to get repeatable runs
-- 
2.1.0.rc2.206.gedb03e5

[-- Attachment #2: Type: text/html, Size: 1926 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [RFC PATCH] Loop Iteration Offset Bug
@ 2014-10-23 18:56 Brian Fulton
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Fulton @ 2014-10-23 18:56 UTC (permalink / raw)
  To: fio; +Cc: axboe, Akash Verma

I have a proposal for a fix for the loop offset bug described here:
http://www.spinics.net/lists/fio/msg03386.html

- Brian


From 7272b3862cc3b3c22ddfb2d5b78348fe69c3fa2b Mon Sep 17 00:00:00 2001
From: Brian Fulton <bfulton@google.com>
Date: Thu, 23 Oct 2014 11:40:59 -0700
Subject: [PATCH 1/1] Reset file descriptor offset value to the initial value
 when file is closed and io state is cleared. This fixes the bug where
 previous offset values persist between loop iterations.

---
 libfio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libfio.c b/libfio.c
index 9ed802a..b823bd4 100644
--- a/libfio.c
+++ b/libfio.c
@@ -108,8 +108,10 @@ void clear_io_state(struct thread_data *td)
  reset_io_counters(td);

  close_files(td);
- for_each_file(td, f, i)
+ for_each_file(td, f, i) {
  fio_file_clear_done(f);
+ f->file_offset = get_start_offset(td, f);
+ }

  /*
   * Set the same seed to get repeatable runs


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

end of thread, other threads:[~2014-10-24 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 18:51 [RFC PATCH] Loop Iteration Offset Bug Brian Fulton
2014-10-24 20:48 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2014-10-23 18:56 Brian Fulton

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