iolog bug: TD_DDIR_READ should be TD_DDIR_WRITE
authorJens Axboe <jens.axboe@oracle.com>
Tue, 15 May 2007 09:12:19 +0000 (11:12 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 15 May 2007 09:12:19 +0000 (11:12 +0200)
It's a typo, if we don't have reads stored but writes, then the
global direction should naturally be TD_DDIR_WRITE.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
log.c

diff --git a/log.c b/log.c
index fbc407d221f3b1e1bbee83c453e44085b95df1ce..c0e9d4ae61dc8b6b5f7d1890991745979872a7f0 100644 (file)
--- a/log.c
+++ b/log.c
@@ -158,7 +158,7 @@ static int init_iolog_read(struct thread_data *td)
        else if (reads && !writes)
                td->o.td_ddir = TD_DDIR_READ;
        else if (!reads && writes)
        else if (reads && !writes)
                td->o.td_ddir = TD_DDIR_READ;
        else if (!reads && writes)
-               td->o.td_ddir = TD_DDIR_READ;
+               td->o.td_ddir = TD_DDIR_WRITE;
        else
                td->o.td_ddir = TD_DDIR_RW;
 
        else
                td->o.td_ddir = TD_DDIR_RW;