X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=log.c;h=829de94c66093d619ff351a690e8137a6bd97ca5;hp=4a64132c82e85569a6c9e52850251efb7364d36a;hb=825f818eab0cef7683b8ef359642a45ddef8ea8e;hpb=49ffb4a2e1ac3026d77d9e1c03edc2753fcec41b diff --git a/log.c b/log.c index 4a64132c..829de94c 100644 --- 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; @@ -133,7 +133,8 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u) 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) @@ -143,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; }