We should only generate a block within the specific file size, not
the total io size.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
struct fio_file *f;
int i, err, need_create;
+ for_each_file(td, f, i)
+ f->file_size = td->total_file_size / td->nr_files;
+
/*
* unless specifically asked for overwrite, let normal io extend it
*/
- if (!td->overwrite) {
- for_each_file(td, f, i)
- f->file_size = td->total_file_size / td->nr_files;
-
+ if (!td->overwrite)
return 0;
- }
need_create = 0;
if (td->filetype == FIO_TYPE_FILE)
long r;
if (!td->sequential) {
- unsigned long long max_blocks = td->io_size / td->min_bs[ddir];
+ unsigned long long max_blocks = f->file_size / td->min_bs[ddir];
int loops = 50;
do {