Move handling of possible values into the option parser
[fio.git] / log.c
diff --git a/log.c b/log.c
index a705e5021415ad7069e169ba06906435724d1f37..513128d69b273bf1a3c0e21194b4dfa93aa2c5d7 100644 (file)
--- a/log.c
+++ b/log.c
@@ -5,7 +5,7 @@
 
 void write_iolog_put(struct thread_data *td, struct io_u *io_u)
 {
-       fprintf(td->iolog_f, "%u,%llu,%u\n", io_u->ddir, io_u->offset, io_u->buflen);
+       fprintf(td->iolog_f, "%u,%llu,%lu\n", io_u->ddir, io_u->offset, io_u->buflen);
 }
 
 int read_iolog_get(struct thread_data *td, struct io_u *io_u)
@@ -56,7 +56,7 @@ void log_io_piece(struct thread_data *td, struct io_u *io_u)
         * be laid out with the block scattered as written. it's faster to
         * read them in in that order again, so don't sort
         */
-       if (td->sequential || !td->overwrite) {
+       if (!td_random(td) || !td->overwrite) {
                list_add_tail(&ipo->list, &td->io_hist_list);
                return;
        }
@@ -137,11 +137,11 @@ static int init_iolog_read(struct thread_data *td)
        if (!reads && !writes)
                return 1;
        else if (reads && !writes)
-               td->ddir = DDIR_READ;
+               td->td_ddir = TD_DDIR_READ;
        else if (!reads && writes)
-               td->ddir = DDIR_READ;
+               td->td_ddir = TD_DDIR_READ;
        else
-               td->iomix = 1;
+               td->td_ddir = TD_DDIR_RW;
 
        return 0;
 }