X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=32d1e5cdecaa999509651d931924bbd2f576bf5f;hp=40fcf1c35f61a5426648ee19dcfa9f680147bcf1;hb=9cc935a15e2ca54e6bdff4c18bd432dff3fbfaee;hpb=e4f26f0245491bcb4b10606e50f075c586687f16 diff --git a/init.c b/init.c index 40fcf1c3..32d1e5cd 100644 --- 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))