Define OS preferred IO engine
authorJens Axboe <jaxboe@fusionio.com>
Wed, 19 Jan 2011 18:09:58 +0000 (11:09 -0700)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 19 Jan 2011 18:09:58 +0000 (11:09 -0700)
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
options.c
os/os-windows.h
os/os.h

index 67d0d2ddb2ad22b8bd5789c9691fb1334476e195..de2d037093481bc4bfe4797f69ac089b74b5db4f 100644 (file)
--- a/options.c
+++ b/options.c
@@ -918,7 +918,7 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .type   = FIO_OPT_STR_STORE,
                .off1   = td_var_offset(ioengine),
                .help   = "IO engine to use",
-               .def    = "sync",
+               .def    = FIO_PREFERRED_ENGINE,
                .posval = {
                          { .ival = "sync",
                            .help = "Use read/write",
index 9edacf335090882d82e53201b01e8cec1bb2b28b..e790a51322b3ce10b422c7c3894526cdba481036 100644 (file)
@@ -22,6 +22,8 @@
 \r
 #define OS_CLOCK CLOCK_REALTIME\r
 \r
+#define FIO_PREFERRED_ENGINE   "windowsaio"\r
+\r
 typedef off_t off64_t;\r
 \r
 typedef struct {\r
diff --git a/os/os.h b/os/os.h
index 92b6950d305d077261633723b181f35e273b33ae..1569e409dd964c027b676227d44820e717165d2d 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -102,6 +102,10 @@ typedef unsigned long os_cpu_mask_t;
 #define fio_lookup_raw(dev, majdev, mindev)    1
 #endif
 
+#ifndef FIO_PREFERRED_ENGINE
+#define FIO_PREFERRED_ENGINE   "sync"
+#endif
+
 #ifndef FIO_HAVE_BLKTRACE
 static inline int is_blktrace(const char *fname)
 {