projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing header inclusion for Android from 1c764dbe
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index 9c37ae57e24af13cc411a8f3f8398e06f5963626..012773b95eba7ff27c714e7a5085f15a939c0fb7 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 (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;
}
total_size += f->io_size;
}
@@
-1333,7
+1335,8
@@
int add_file(struct thread_data *td, const char *fname, int numjob, int inc)
dprint(FD_FILE, "add file %s\n", fname);
if (td->o.directory)
dprint(FD_FILE, "add file %s\n", fname);
if (td->o.directory)
- len = set_name_idx(file_name, PATH_MAX, td->o.directory, numjob);
+ len = set_name_idx(file_name, PATH_MAX, td->o.directory, numjob,
+ td->o.unique_filename);
sprintf(file_name + len, "%s", fname);
sprintf(file_name + len, "%s", fname);