Merge branch 'master' of axboe@router:/data/git/disktools
authorJens Axboe <axboe@nelson.home.kernel.dk>
Mon, 7 Nov 2005 08:42:20 +0000 (09:42 +0100)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Mon, 7 Nov 2005 08:42:20 +0000 (09:42 +0100)
1  2 
fio.c

diff --cc fio.c
index f8bfef21595ba25695c7bf0f60ab332bb8d361f2,ad09746ecc61ca3f5bd53c11ebcb58a89dccc15e..748b6c428439bd14b681799d88caf72aff165d5a
--- 1/fio.c
--- 2/fio.c
+++ b/fio.c
@@@ -1404,10 -1447,13 +1449,13 @@@ static int setup_file(struct thread_dat
  
  static void clear_io_state(struct thread_data *td)
  {
+       if (!td->use_aio)
+               lseek(td->fd, SEEK_SET, 0);
        td->cur_off = 0;
 -      td->last_kb = 0;
 -      td->stat_io_kb = 0;
 -      td->this_io_kb = 0;
 +      td->last_sectors = 0;
 +      td->stat_io_sectors = 0;
 +      td->this_io_sectors = 0;
  }
  
  static void *thread_main(int shm_id, int offset, char *argv[])