[PATCH] Change O_DIRECT vs buffered setup
Change the default from O_DIRECT IO to normal buffered IO. That makes
more sense, as O_DIRECT is a special case and should be manually
enabled as such.
Do this by adding a option negate switch, so we don't need two sets
of parameters to control these options.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/init.c b/init.c
index c272526..5d6b0a9 100644
--- a/init.c
+++ b/init.c
@@ -151,7 +151,15 @@
.name = "direct",
.type = FIO_OPT_BOOL,
.off1 = td_var_offset(odirect),
- .help = "Use O_DIRECT IO",
+ .help = "Use O_DIRECT IO (negates buffered)",
+ .def = "0",
+ },
+ {
+ .name = "buffered",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(odirect),
+ .neg = 1,
+ .help = "Use buffered IO (negates direct)",
.def = "1",
},
{