Silence gcc 4.6 warnings
[fio.git] / options.c
index ae5bcc5bca06f409132b474e11555dce5c0f8c1f..a9b05349a808d09b0596202c3d015eeca2277229 100644 (file)
--- a/options.c
+++ b/options.c
@@ -482,6 +482,7 @@ static int str_sfr_cb(void *data, const char *str)
 
 static int check_dir(struct thread_data *td, char *fname)
 {
+#if 0
        char file[PATH_MAX], *dir;
        int elen = 0;
 
@@ -494,7 +495,6 @@ static int check_dir(struct thread_data *td, char *fname)
        sprintf(file + elen, "%s", fname);
        dir = dirname(file);
 
-#if 0
        {
        struct stat sb;
        /*
@@ -675,6 +675,11 @@ static int str_verify_pattern_cb(void *data, const char *input)
                }
        }
        td->o.verify_pattern_bytes = i;
+       /*
+        * VERIFY_META could already be set
+        */
+       if (td->o.verify == VERIFY_NONE)
+               td->o.verify = VERIFY_PATTERN;
        return 0;
 }
 
@@ -913,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",
@@ -941,12 +946,12 @@ static struct fio_option options[FIO_MAX_OPTS] = {
 #endif
 #ifdef FIO_HAVE_WINDOWSAIO
                          { .ival = "windowsaio",
-                               .help = "Windows native asynchronous IO"
+                           .help = "Windows native asynchronous IO"
                          },
+#endif
                          { .ival = "mmap",
                            .help = "Memory mapped IO"
                          },
-#endif
 #ifdef FIO_HAVE_SPLICE
                          { .ival = "splice",
                            .help = "splice/vmsplice based IO",
@@ -1032,6 +1037,7 @@ static struct fio_option options[FIO_MAX_OPTS] = {
        },
        {
                .name   = "fill_device",
+               .alias  = "fill_fs",
                .type   = FIO_OPT_BOOL,
                .off1   = td_var_offset(fill_device),
                .help   = "Write until an ENOSPC error occurs",
@@ -1109,6 +1115,14 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .def    = "1",
                .parent = "rw",
        },
+       {
+               .name   = "use_os_rand",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(use_os_rand),
+               .help   = "Set to use OS random generator",
+               .def    = "0",
+               .parent = "rw",
+       },
        {
                .name   = "norandommap",
                .type   = FIO_OPT_STR_SET,
@@ -1466,6 +1480,14 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .help   = "Exit on a single verify failure, don't continue",
                .parent = "verify",
        },
+       {
+               .name   = "verify_dump",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(verify_dump),
+               .def    = "1",
+               .help   = "Dump contents of good and bad blocks on failure",
+               .parent = "verify",
+       },
        {
                .name   = "verify_async",
                .type   = FIO_OPT_INT,