projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c4693e
)
filesetup: align a size given as a percentage to the block size
author
Jens Axboe
<axboe@fb.com>
Wed, 18 May 2016 21:06:05 +0000
(15:06 -0600)
committer
Jens Axboe
<axboe@fb.com>
Wed, 18 May 2016 21:06:05 +0000
(15:06 -0600)
We want it to be a nice multiple of (at least) our minimum block
size.
Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 9c37ae57e24af13cc411a8f3f8398e06f5963626..f721c36abbb045ca7b4e4a618c64b0199d5148e3 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-894,8
+894,10
@@
int setup_files(struct thread_data *td)
if (f->io_size == -1ULL)
total_size = -1ULL;
else {
- if (o->size_percent)
- f->io_size = (f->io_size * o->size_percent) / 100;
+ if (o->size_percent) {
+ f->io_size = (f->io_size * o->size_percent) / 100;
+ f->io_size -= (f->io_size % td_min_bs(td));
+ }
total_size += f->io_size;
}