[PATCH] Improve job file parsing
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 738f3e20101eee5e3535f1ff52fd344286c45745..2605ece98b32025a754f52ca301522dc62d0fc68 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -211,7 +211,7 @@ static int fill_io_u(struct thread_data *td, struct fio_file *f,
                        /*
                         * If using a write iolog, store this entry.
                         */
-                       if (td->write_iolog)
+                       if (td->write_iolog_file)
                                write_iolog_put(td, io_u);
 
                        io_u->file = f;
@@ -229,6 +229,7 @@ struct io_u *__get_io_u(struct thread_data *td)
        if (!queue_full(td)) {
                io_u = list_entry(td->io_u_freelist.next, struct io_u, list);
 
+               io_u->buflen = 0;
                io_u->error = 0;
                io_u->resid = 0;
                list_del(&io_u->list);