Update documentation for random_distribution=gauss
[fio.git] / options.c
index a60b6e195c5506844bd3c06489085a04fb87516e..ac2da71f514ea22fcfe7b514b8dd0f6e36aa7f3c 100644 (file)
--- a/options.c
+++ b/options.c
 #include "options.h"
 #include "optgroup.h"
 
-#include "crc/crc32c.h"
-
 char client_sockaddr_str[INET6_ADDRSTRLEN] = { 0 };
 
-struct pattern_fmt_desc fmt_desc[] = {
-       {
-               .fmt   = "%o",
-               .len   = FIELD_SIZE(struct io_u *, offset),
-               .paste = paste_blockoff
-       }
-};
-
 /*
  * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
  */
@@ -51,7 +41,7 @@ static int bs_cmp(const void *p1, const void *p2)
        const struct bssplit *bsp1 = p1;
        const struct bssplit *bsp2 = p2;
 
-       return bsp1->perc < bsp2->perc;
+       return (int) bsp1->perc - (int) bsp2->perc;
 }
 
 static int bssplit_ddir(struct thread_options *o, int ddir, char *str)
@@ -964,13 +954,20 @@ static int str_dedupe_cb(void *data, unsigned long long *il)
 
 static int str_verify_pattern_cb(void *data, const char *input)
 {
+       struct pattern_fmt_desc fmt_desc[] = {
+               {
+                       .fmt   = "%o",
+                       .len   = FIELD_SIZE(struct io_u *, offset),
+                       .paste = paste_blockoff
+               }
+       };
        struct thread_data *td = data;
        int ret;
 
        td->o.verify_fmt_sz = ARRAY_SIZE(td->o.verify_fmt);
        ret = parse_and_fill_pattern(input, strlen(input), td->o.verify_pattern,
-                                    MAX_PATTERN_SIZE, fmt_desc, sizeof(fmt_desc),
-                                    td->o.verify_fmt, &td->o.verify_fmt_sz);
+                       MAX_PATTERN_SIZE, fmt_desc, sizeof(fmt_desc),
+                       td->o.verify_fmt, &td->o.verify_fmt_sz);
        if (ret < 0)
                return 1;
 
@@ -1243,6 +1240,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                            .help = "Use preadv/pwritev",
                          },
 #endif
+#ifdef CONFIG_PWRITEV
+                         { .ival = "pvsync2",
+                           .help = "Use preadv2/pwritev2",
+                         },
+#endif
 #ifdef CONFIG_LIBAIO
                          { .ival = "libaio",
                            .help = "Linux native asynchronous IO",
@@ -3076,6 +3078,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_LOG,
                .group  = FIO_OPT_G_INVALID,
        },
+       {
+               .name   = "log_max_value",
+               .lname  = "Log maximum instead of average",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(log_max),
+               .help   = "Log max sample in a window instead of average",
+               .def    = "0",
+               .category = FIO_OPT_C_LOG,
+               .group  = FIO_OPT_G_INVALID,
+       },
        {
                .name   = "log_offset",
                .lname  = "Log offset of IO",