summaryrefslogtreecommitdiff
path: root/cconv.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-28 12:08:47 -0600
committerJens Axboe <axboe@fb.com>2014-04-28 12:08:47 -0600
commit77731b29c35286a43ca6109ebf13389169ec20e9 (patch)
treec185d32995a34d5fc80bbeb936e7e5edafa4ceb3 /cconv.c
parent8b89b91bb0b6e6321652619ce405a702c2b4e4e0 (diff)
Add option for io_limit
'size' denotes both the size of the region for IO, as well as the amount of IO to transfer. Sometimes it's useful to be able to set them separately instead. With this patch, you can do: size=100G io_limit=10G and have fio do 10G of IO between 0..100G of the address space. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'cconv.c')
-rw-r--r--cconv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cconv.c b/cconv.c
index ee3b0ca..2f7177d 100644
--- a/cconv.c
+++ b/cconv.c
@@ -80,6 +80,7 @@ void convert_thread_options_to_cpu(struct thread_options *o,
o->iodepth_batch = le32_to_cpu(top->iodepth_batch);
o->iodepth_batch_complete = le32_to_cpu(top->iodepth_batch_complete);
o->size = le64_to_cpu(top->size);
+ o->io_limit = le64_to_cpu(top->io_limit);
o->size_percent = le32_to_cpu(top->size_percent);
o->fill_device = le32_to_cpu(top->fill_device);
o->file_append = le32_to_cpu(top->file_append);
@@ -428,6 +429,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
memcpy(top->buffer_pattern, o->buffer_pattern, MAX_PATTERN_SIZE);
top->size = __cpu_to_le64(o->size);
+ top->io_limit = __cpu_to_le64(o->io_limit);
top->verify_backlog = __cpu_to_le64(o->verify_backlog);
top->start_delay = __cpu_to_le64(o->start_delay);
top->start_delay_high = __cpu_to_le64(o->start_delay_high);