projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mmap engine: remove code duplication
[fio.git]
/
io_ddir.h
diff --git
a/io_ddir.h
b/io_ddir.h
index d2ee40ceefa5db7aaf93f10bacd6c0c29e6dc7ad..620a9ee32d51ec8f18d94c565da7b962f015adfe 100644
(file)
--- a/
io_ddir.h
+++ b/
io_ddir.h
@@
-5,6
+5,7
@@
enum fio_ddir {
DDIR_READ = 0,
DDIR_WRITE,
DDIR_SYNC,
DDIR_READ = 0,
DDIR_WRITE,
DDIR_SYNC,
+ DDIR_DATASYNC,
DDIR_INVAL = -1,
};
DDIR_INVAL = -1,
};
@@
-24,4
+25,9
@@
enum td_ddir {
#define td_random(td) ((td)->o.td_ddir & TD_DDIR_RAND)
#define file_randommap(td, f) (!(td)->o.norandommap && (f)->file_map)
#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
#endif