X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=options.c;h=c3fdb56314a5007c00bab2bdee57817816c9e9ee;hb=86f40280e27474c666fea75cc705caeaf94f6346;hp=2e1e709e91a0d60470ac99085ad42c5c046aa9a4;hpb=068420271828b3b2426ffc3ccf64404cb9d340fb;p=fio.git diff --git a/options.c b/options.c index 2e1e709e..c3fdb563 100644 --- a/options.c +++ b/options.c @@ -689,12 +689,32 @@ static int str_verify_pattern_cb(void *data, const char *input) } } } + + /* + * Fill the pattern all the way to the end. This greatly reduces + * the number of memcpy's we have to do when verifying the IO. + */ + while (i > 1 && i * 2 <= MAX_PATTERN_SIZE) { + memcpy(&td->o.verify_pattern[i], &td->o.verify_pattern[0], i); + i *= 2; + } + if (i == 1) { + /* + * The code in verify_io_u_pattern assumes a single byte pattern + * fills the whole verify pattern buffer. + */ + memset(td->o.verify_pattern, td->o.verify_pattern[0], + MAX_PATTERN_SIZE); + } + 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; } @@ -1670,6 +1690,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .name = "zonesize", .type = FIO_OPT_STR_VAL, .off1 = td_var_offset(zone_size), + .help = "Amount of data to read per zone", + .def = "0", + }, + { + .name = "zonerange", + .type = FIO_OPT_STR_VAL, + .off1 = td_var_offset(zone_range), .help = "Give size of an IO zone", .def = "0", }, @@ -1950,6 +1977,13 @@ static struct fio_option options[FIO_MAX_OPTS] = { .cb = str_write_iops_log_cb, .help = "Write log of IOPS during run", }, + { + .name = "log_avg_msec", + .type = FIO_OPT_INT, + .off1 = td_var_offset(log_avg_msec), + .help = "Average bw/iops/lat logs over this period of time", + .def = "0", + }, { .name = "hugepage-size", .type = FIO_OPT_INT,