From 44cc9c8fccd1862045ef029dc9a484c4a2e46731 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 28 Apr 2015 15:23:21 -0600 Subject: [PATCH] Add recommendation to set direct=0 if first O_DIRECT fails Fio currently tells you: "fio: first direct IO errored. File system may not support direct IO, or iomem_align= is bad." but it doesn't offer a remedy. Add a suggestion to set direct=0 if this happens. It can happen because of a badly configured job, or from blktrace replay because the latter adds direct=1 automatically. But that may fail, if the trace contains IO that isn't sector aligned. Signed-off-by: Jens Axboe --- ioengines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ioengines.c b/ioengines.c index b724e0e9..958731dc 100644 --- a/ioengines.c +++ b/ioengines.c @@ -327,7 +327,8 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) td->o.odirect) { log_info("fio: first direct IO errored. File system may not " - "support direct IO, or iomem_align= is bad.\n"); + "support direct IO, or iomem_align= is bad. Try " + "setting direct=0.\n"); } if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) { -- 2.25.1