summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomohiro Kusumi <tkusumi@tuxera.com>2017-08-30 00:12:13 +0300
committerJens Axboe <axboe@kernel.dk>2017-08-29 15:14:52 -0600
commit2c0795e8803650b7e4b989917b721d03286fa92b (patch)
treed53b31ce600eb567a190be6a6828652212459825
parent8e8891105157dba405f5a120902df01fdb2a4a39 (diff)
downloadfio-2c0795e8803650b7e4b989917b721d03286fa92b.tar.gz
fio-2c0795e8803650b7e4b989917b721d03286fa92b.tar.bz2
add ifdef __sun__ for Solaris specific code
ENOTTY on direct I/O setup failure via directio(3C) is Solaris (ZFS) specific (as also mentioned in ZoL commit[1]). Linux and many others which support O_DIRECT never come here, but others supporting direct I/O via OS specific way don't necessarily have the same ENOTTY behavior or ZFS itself. This commit brings back the original log before 42f1ee68 for others. [1] https://github.com/zfsonlinux/zfs/commit/a08c76a8ad63c28384ead72b53a3d7ef73f39357 Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--ioengines.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ioengines.c b/ioengines.c
index 6e6e3dea..6e135af4 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -505,12 +505,15 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f)
if (ret) {
td_verror(td, ret, "fio_set_odirect");
+#if defined(__sun__)
if (ret == ENOTTY) { /* ENOTTY suggests RAW device or ZFS */
log_err("fio: doing directIO to RAW devices or ZFS not supported\n");
} else {
log_err("fio: the file system does not seem to support direct IO\n");
}
-
+#else
+ log_err("fio: the file system does not seem to support direct IO\n");
+#endif
goto err;
}
}