Add support for fdatasync()
Adds a new option, fdatasync=. It's identical to the fsync= option,
but uses fdatasync() instead.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_ddir.h b/io_ddir.h
index d2ee40c..620a9ee 100644
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -5,6 +5,7 @@
DDIR_READ = 0,
DDIR_WRITE,
DDIR_SYNC,
+ DDIR_DATASYNC,
DDIR_INVAL = -1,
};
@@ -24,4 +25,9 @@
#define td_random(td) ((td)->o.td_ddir & TD_DDIR_RAND)
#define file_randommap(td, f) (!(td)->o.norandommap && (f)->file_map)
+static inline int ddir_sync(enum fio_ddir ddir)
+{
+ return ddir == DDIR_SYNC || ddir == DDIR_DATASYNC;
+}
+
#endif