Add missing types to log_io_u()
[fio.git] / log.c
diff --git a/log.c b/log.c
index 80d3742f76485ff45130b6a586c6120bcd74de7f..829de94c66093d619ff351a690e8137a6bd97ca5 100644 (file)
--- a/log.c
+++ b/log.c
@@ -21,9 +21,9 @@ void queue_io_piece(struct thread_data *td, struct io_piece *ipo)
 void log_io_u(struct thread_data *td, struct io_u *io_u)
 {
        const char *act[] = { "read", "write", "sync", "datasync",
-                               "sync_file_range" };
+                               "sync_file_range", "wait", "trim" };
 
-       assert(io_u->ddir <= 4);
+       assert(io_u->ddir <= 6);
 
        if (!td->o.write_iolog_file)
                return;
@@ -131,10 +131,10 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u)
                        io_u->buflen = ipo->len;
                        io_u->file = td->files[ipo->fileno];
                        get_file(io_u->file);
-
                        dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,
                                                io_u->buflen, io_u->file->file_name);
-                       if (ipo->delay) iolog_delay(td, ipo->delay);
+                       if (ipo->delay)
+                               iolog_delay(td, ipo->delay);
                } else {
                        elapsed = mtime_since_genesis();
                        if (ipo->delay > elapsed)
@@ -144,7 +144,7 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u)
 
                free(ipo);
                
-               if (ipo->ddir != DDIR_WAIT)
+               if (io_u->ddir != DDIR_WAIT)
                        return 0;
        }