From: Jens Axboe Date: Fri, 20 Jul 2007 10:39:22 +0000 (+0200) Subject: Don't align memory unless using raw io X-Git-Tag: fio-1.16.9~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b3f378e90231ecb2082ec565bafb3f721c4f1902 Don't align memory unless using raw io If it's not raw io, we didn't align the buffer size. So we cannot align. Signed-off-by: Jens Axboe --- diff --git a/fio.c b/fio.c index ead118ec..1e69ce42 100644 --- a/fio.c +++ b/fio.c @@ -638,7 +638,11 @@ static int init_io_u(struct thread_data *td) if (allocate_io_mem(td)) return 1; - p = ALIGN(td->orig_buffer); + if (td->o.odirect) + p = ALIGN(td->orig_buffer); + else + p = td->orig_buffer; + for (i = 0; i < max_units; i++) { if (td->terminate) return 1;