summaryrefslogtreecommitdiff
path: root/io_u.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-08-09 12:53:44 -0600
committerJens Axboe <axboe@kernel.dk>2013-08-09 12:53:44 -0600
commitddf24e42b5f801e6a66f8976c97edcb88080ecdf (patch)
tree8e9c84664613e121e79b0cfdc8eda288df267ff9 /io_u.c
parentd2d982d3c510e23a4344b24ba1a29b5c6f0fbaa0 (diff)
downloadfio-ddf24e42b5f801e6a66f8976c97edcb88080ecdf.tar.gz
Add number_ios= option
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_u.c')
-rw-r--r--io_u.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io_u.c b/io_u.c
index a35aafd2..c50a17df 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1413,6 +1413,9 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u,
add_bw_sample(td, idx, bytes, &icd->time);
add_iops_sample(td, idx, bytes, &icd->time);
+
+ if (td->o.number_ios && !--td->o.number_ios)
+ td->done = 1;
}
static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir)