fio: add multi directory support
[fio.git] / iolog.c
diff --git a/iolog.c b/iolog.c
index 65933672fa3e3da4ef8a5b59b6f70636f076a955..eeaca291e21eb6503712f29a602ca5ad121a2615 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -188,6 +188,10 @@ void log_io_piece(struct thread_data *td, struct io_u *io_u)
        ipo->file = io_u->file;
        ipo->offset = io_u->offset;
        ipo->len = io_u->buflen;
+       ipo->numberio = io_u->numberio;
+       ipo->flags = IP_F_IN_FLIGHT;
+
+       io_u->ipo = ipo;
 
        if (io_u_should_trim(td, io_u)) {
                flist_add_tail(&ipo->trim_list, &td->trim_list);
@@ -208,7 +212,7 @@ void log_io_piece(struct thread_data *td, struct io_u *io_u)
         * drop the old one, which we rely on the rb insert/lookup for
         * handling.
         */
-       if ((!td_random(td) || !td->o.overwrite) &&
+       if (((!td->o.verifysort) || !td_random(td) || !td->o.overwrite) &&
              (file_randommap(td, ipo->file) || td->o.verify == VERIFY_NONE)) {
                INIT_FLIST_HEAD(&ipo->list);
                flist_add_tail(&ipo->list, &td->io_hist_list);
@@ -320,7 +324,7 @@ static int read_iolog2(struct thread_data *td, FILE *f)
                        rw = DDIR_INVAL;
                        if (!strcmp(act, "add")) {
                                td->o.nr_files++;
-                               fileno = add_file(td, fname);
+                               fileno = add_file(td, fname, 0);
                                file_action = FIO_LOG_ADD_FILE;
                                continue;
                        } else if (!strcmp(act, "open")) {