projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add directio support to Solaris
[fio.git]
/
os
/
os-solaris.h
diff --git
a/os/os-solaris.h
b/os/os-solaris.h
index 7fa0bb50e1b06f1b3642cbb5cab4a060bab71015..866e0c0e17b7dd5eefa741da991ca619dae69303 100644
(file)
--- a/
os/os-solaris.h
+++ b/
os/os-solaris.h
@@
-1,14
+1,13
@@
#ifndef FIO_OS_SOLARIS_H
#define FIO_OS_SOLARIS_H
#ifndef FIO_OS_SOLARIS_H
#define FIO_OS_SOLARIS_H
-#undef FIO_HAVE_LIBAIO
+#include <sys/types.h>
+#include <sys/fcntl.h>
+
#define FIO_HAVE_POSIXAIO
#define FIO_HAVE_SOLARISAIO
#define FIO_HAVE_POSIXAIO
#define FIO_HAVE_SOLARISAIO
-#undef FIO_HAVE_FADVISE
-#undef FIO_HAVE_CPU_AFFINITY
-#undef FIO_HAVE_DISK_UTIL
-#undef FIO_HAVE_SGIO
-#undef FIO_HAVE_ODIRECT
+#define FIO_HAVE_FALLOCATE
+#define FIO_HAVE_POSIXAIO_FSYNC
#define OS_MAP_ANON (MAP_ANON)
#define OS_MAP_ANON (MAP_ANON)
@@
-55,4
+54,14
@@
static inline long os_random_long(os_random_state_t *rs)
return val;
}
return val;
}
+#define FIO_OS_DIRECTIO
+extern int directio(int, int);
+static inline int fio_set_odirect(int fd)
+{
+ if (directio(fd, DIRECTIO_ON) < 0)
+ return errno;
+
+ return 0;
+}
+
#endif
#endif