From 7d059f88c869f89a1456e492e0e4f11b3e2578ff Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 18 Jun 2007 09:48:57 +0200 Subject: [PATCH] libaio engine: print warning for depth > 1 and buffered IO Linux aio doesn't support queued buffered IO, it has to be O_DIRECT. So print a warning to that effect, so that users of fio don't get bad results by mistake. Signed-off-by: Jens Axboe --- engines/libaio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/libaio.c b/engines/libaio.c index 871c5a47..f8990c16 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -189,8 +189,14 @@ static void fio_libaio_cleanup(struct thread_data *td) static int fio_libaio_init(struct thread_data *td) { struct libaio_data *ld = malloc(sizeof(*ld)); + static int warn_print; int err; + if (td->o.iodepth > 1 && !td->o.odirect && !warn_print) { + log_info("fio: libaio engine is only async for non-buffered IO\n"); + warn_print = 1; + } + memset(ld, 0, sizeof(*ld)); err = io_queue_init(td->o.iodepth, &ld->aio_ctx); -- 2.25.1