X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=log.c;h=191f806aa2e471747f8c561ba59365c4f2269ad9;hp=790d3a1e32c9d4c046bb17be0f10f44a74f5fef3;hb=5921e80c5dfc9f96d2f21da6ae58f2b5d3a0b373;hpb=748b23a36509240af1debf5f7f3ca8ef153548ea diff --git a/log.c b/log.c index 790d3a1e..191f806a 100644 --- a/log.c +++ b/log.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include "list.h" #include "fio.h" @@ -40,6 +41,13 @@ void log_file(struct thread_data *td, struct fio_file *f, if (!td->o.write_iolog_file) return; + + /* + * this happens on the pre-open/close done before the job starts + */ + if (!td->iolog_f) + return; + fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]); }