From: Jens Axboe Date: Mon, 11 Jun 2012 06:53:53 +0000 (+0200) Subject: Add a more verbose/immediate warning if we fail open with O_DIRECT X-Git-Tag: fio-2.0.9~18 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a93c5f049da63a60f9962177d8ada50094d234de;hp=d39879467ccb7f136815be0ba7fd283524c2dafb Add a more verbose/immediate warning if we fail open with O_DIRECT If we get EINVAL with O_DIRECT open of the file, then that means that the file system does not support direct IO. Warn as such from fio. Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index a1ad0263..b1f73f71 100644 --- a/filesetup.c +++ b/filesetup.c @@ -526,6 +526,11 @@ open_again: snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name); + if (__e == EINVAL && (flags & OS_O_DIRECT)) { + log_err("fio: looks like your file system does not " \ + "support direct=1/buffered=0\n"); + } + td_verror(td, __e, buf); }