From: Jens Axboe Date: Fri, 21 Sep 2012 06:36:24 +0000 (+0200) Subject: Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio X-Git-Tag: fio-2.0.10~20^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=eebd2f2d8a022a248acac5685f73665aa0c6ee99;hp=0981fd718a4b03a807c1b4b2ae6d0e93deee28c5 Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio --- diff --git a/filesetup.c b/filesetup.c index 06b7d7fc..9679c88d 100644 --- a/filesetup.c +++ b/filesetup.c @@ -766,8 +766,11 @@ int setup_files(struct thread_data *td) 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; + } 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;