Fix O_DIRECT memory alignment
authorJens Axboe <jens.axboe@oracle.com>
Fri, 3 Jul 2009 06:30:15 +0000 (08:30 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 3 Jul 2009 06:30:15 +0000 (08:30 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 47f3985..aabfee6 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -799,7 +799,7 @@ static int init_io_u(struct thread_data *td)
        if (allocate_io_mem(td))
                return 1;
 
-       if (td->o.mem_align)
+       if (td->o.odirect || td->o.mem_align)
                p = PAGE_ALIGN(td->orig_buffer) + td->o.mem_align;
        else
                p = td->orig_buffer;