[PATCH] Remove last remnants of file extending
[fio.git] / init.c
diff --git a/init.c b/init.c
index 40fcf1c35f61a5426648ee19dcfa9f680147bcf1..32d1e5cdecaa999509651d931924bbd2f576bf5f 100644 (file)
--- a/init.c
+++ b/init.c
@@ -122,6 +122,12 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
        if (td->zone_size && !td->sequential)
                td->zone_size = 0;
 
+       /*
+        * Reads can do overwrites, we always need to pre-create the file
+        */
+       if (td_read(td) || td_rw(td))
+               td->overwrite = 1;
+
        td->filetype = FIO_TYPE_FILE;
        if (!stat(jobname, &sb)) {
                if (S_ISBLK(sb.st_mode))