X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=backend.c;h=fdb7413d7719ff9ff4b46af8e611c072c6918435;hp=3430e6612d4312740f31045d6ebf6ff4ff96950b;hb=cf8a46a75f38afe07ebf823210f95543999e3116;hpb=bb1116fe9a53154447bb4305ed9d9fd42d2a6aa1 diff --git a/backend.c b/backend.c index 3430e661..fdb7413d 100644 --- a/backend.c +++ b/backend.c @@ -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); }