Add recommendation to set direct=0 if first O_DIRECT fails
authorJens Axboe <axboe@fb.com>
Tue, 28 Apr 2015 21:23:21 +0000 (15:23 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 28 Apr 2015 21:23:21 +0000 (15:23 -0600)
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 <axboe@fb.com>
ioengines.c

index b724e0e90e089668ef0a32acd1eb95c7133b4e09..958731dc3bfab9bda2d7765e61d3f31613b02946 100644 (file)
@@ -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 "
            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) {
        }
 
        if (!td->io_ops->commit || io_u->ddir == DDIR_TRIM) {