Streamline thread_data data direction setting and checking
[fio.git] / log.c
diff --git a/log.c b/log.c
index dd63c3891b67c65d6fd2903b8bfab0d349a246cb..513128d69b273bf1a3c0e21194b4dfa93aa2c5d7 100644 (file)
--- a/log.c
+++ b/log.c
@@ -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
         */
         * 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;
        }
                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)
        if (!reads && !writes)
                return 1;
        else if (reads && !writes)
-               td->ddir = DDIR_READ;
+               td->td_ddir = TD_DDIR_READ;
        else if (!reads && writes)
        else if (!reads && writes)
-               td->ddir = DDIR_READ;
+               td->td_ddir = TD_DDIR_READ;
        else
        else
-               td->iomix = 1;
+               td->td_ddir = TD_DDIR_RW;
 
        return 0;
 }
 
        return 0;
 }