From b3f378e90231ecb2082ec565bafb3f721c4f1902 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 20 Jul 2007 12:39:22 +0200 Subject: [PATCH] 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 --- fio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.25.1