[PATCH 2/4] add fio_set_directio() error message for platforms without direct I/O

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tomohiro Kusumi <tkusumi@xxxxxxxxxx>

This lets platforms without dio (e.g. OpenBSD) fail with an explicit
message, otherwise they fail without a clue about dio even with
--debug=all enabled.

"if (!OS_O_DIRECT)" is needed so that only platforms without both
O_DIRECT and FIO_OS_DIRECTIO print this message if/when called.

Signed-off-by: Tomohiro Kusumi <tkusumi@xxxxxxxxxx>
---
 filesetup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/filesetup.c b/filesetup.c
index b51ab35..c5eb7cf 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -1868,6 +1868,8 @@ int fio_set_directio(struct thread_data *td, struct fio_file *f)
 
 	return 0;
 #else
+	if (!OS_O_DIRECT)
+		log_err("fio: the file system does not seem to support direct IO\n");
 	return -1;
 #endif
 }
-- 
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux