diff options
author | Jens Axboe <axboe@fb.com> | 2015-02-24 14:50:57 -0800 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-03-06 17:58:17 -0800 |
commit | 842d2e2a85cb0f1ef11409a4f3b09d8a2e7a68cc (patch) | |
tree | df08823cf71cee2700a06da1aeed5bafa062119b | |
parent | 90e390ea777a0effb12a0c35ac9d6ab5eef6dc84 (diff) | |
download | fio-842d2e2a85cb0f1ef11409a4f3b09d8a2e7a68cc.tar.gz |
Make 'loops' honor full write+verify loops
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | backend.c | 6 | ||||
-rw-r--r-- | fio.h | 1 | ||||
-rw-r--r-- | init.c | 4 |
3 files changed, 9 insertions, 2 deletions
@@ -658,10 +658,10 @@ static unsigned int exceeds_number_ios(struct thread_data *td) if (!td->o.number_ios) return 0; - number_ios = ddir_rw_sum(td->this_io_blocks); + number_ios = ddir_rw_sum(td->io_blocks); number_ios += td->io_u_queued + td->io_u_in_flight; - return number_ios >= td->o.number_ios; + return number_ios >= (td->o.number_ios * td->loops); } static int io_issue_bytes_exceeded(struct thread_data *td) @@ -682,6 +682,7 @@ static int io_issue_bytes_exceeded(struct thread_data *td) else limit = td->o.size; + limit *= td->loops; return bytes >= limit || exceeds_number_ios(td); } @@ -703,6 +704,7 @@ static int io_complete_bytes_exceeded(struct thread_data *td) else limit = td->o.size; + limit *= td->loops; return bytes >= limit || exceeds_number_ios(td); } @@ -240,6 +240,7 @@ struct thread_data { */ uint64_t io_issues[DDIR_RWDIR_CNT]; uint64_t io_issue_bytes[DDIR_RWDIR_CNT]; + uint64_t loops; /* * Completions @@ -763,6 +763,10 @@ static int fixup_options(struct thread_data *td) fio_gtod_offload = 1; } + td->loops = o->loops; + if (!td->loops) + td->loops = 1; + return ret; } |