From 3f344202f614ef3275e7000738d998ca85ebb9cf Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 20 Mar 2007 14:38:11 +0100 Subject: [PATCH] Fix divide-by-zero Another file creation crap out, this really needs a rewrite and soon. Signed-off-by: Jens Axboe --- filesetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesetup.c b/filesetup.c index 6c0af85c..289db878 100644 --- a/filesetup.c +++ b/filesetup.c @@ -178,7 +178,7 @@ static int create_files(struct thread_data *td) * unless specifically asked for overwrite, let normal io extend it */ can_extend = !td->o.overwrite && !(td->io_ops->flags & FIO_NOEXTEND); - if (can_extend) { + if (can_extend && new_files) { for_each_file(td, f, i) { if (fill_file_size(td, f, &total_file_size, new_files)) { log_info("fio: limited to %d files\n", i); -- 2.25.1