projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add LICENSE file specyfing what I expect from people using fio
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index 64da8bb825e27732529ef69816f215a35a45d62f..9679c88d28245f287d64f13092a72631f7121fca 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-435,7
+435,7
@@
int generic_close_file(struct thread_data fio_unused *td, struct fio_file *f)
return ret;
}
return ret;
}
-
static
int file_lookup_open(struct fio_file *f, int flags)
+int file_lookup_open(struct fio_file *f, int flags)
{
struct fio_file *__f;
int from_hash;
{
struct fio_file *__f;
int from_hash;
@@
-766,8
+766,11
@@
int setup_files(struct thread_data *td)
if (f->io_size == -1ULL)
total_size = -1ULL;
if (f->io_size == -1ULL)
total_size = -1ULL;
- else
+ else {
+ if (td->o.size_percent)
+ f->io_size = (f->io_size * td->o.size_percent) / 100;
total_size += f->io_size;
total_size += f->io_size;
+ }
if (f->filetype == FIO_TYPE_FILE &&
(f->io_size + f->file_offset) > f->real_file_size &&
if (f->filetype == FIO_TYPE_FILE &&
(f->io_size + f->file_offset) > f->real_file_size &&
@@
-781,9
+784,6
@@
int setup_files(struct thread_data *td)
}
}
}
}
- if (td->o.size_percent)
- total_size = (total_size * td->o.size_percent) / 100;
-
if (!td->o.size || td->o.size > total_size)
td->o.size = total_size;
if (!td->o.size || td->o.size > total_size)
td->o.size = total_size;