X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=05c73ef84f827963fca281ce00fbd7623a02c06a;hp=4dd0c9ae13a38e3d66af6f1b782b03f464daeddd;hb=c4ec0a1d623193b4d344e31b07c6720ecf90323f;hpb=292cc475b1f26ae4c94c3028fc33dee96b22655b diff --git a/init.c b/init.c index 4dd0c9ae..05c73ef8 100644 --- a/init.c +++ b/init.c @@ -100,7 +100,7 @@ static struct option l_opts[FIO_NR_OPTIONS] = { }, { .name = (char *) "minimal", - .has_arg = optional_argument, + .has_arg = no_argument, .val = 'm' | FIO_CLIENT_FLAG, }, { @@ -635,6 +635,12 @@ static int fixup_options(struct thread_data *td) if (td->o.oatomic) td->o.odirect = 1; + /* + * If randseed is set, that overrides randrepeat + */ + if (td->o.rand_seed) + td->o.rand_repeatable = 0; + return ret; } @@ -830,10 +836,15 @@ static int setup_random_seeds(struct thread_data *td) unsigned long seed; unsigned int i; - if (!td->o.rand_repeatable) + if (!td->o.rand_repeatable && !td->o.rand_seed) return init_random_state(td, td->rand_seeds, sizeof(td->rand_seeds)); - for (seed = 0x89, i = 0; i < 4; i++) + if (!td->o.rand_seed) + seed = 0x89; + else + seed = td->o.rand_seed; + + for (i = 0; i < 4; i++) seed *= 0x9e370001UL; for (i = 0; i < FIO_RAND_NR_OFFS; i++) { @@ -1382,7 +1393,7 @@ static void usage(const char *name) printf("%s [options] [job options] \n", name); printf(" --debug=options\tEnable debug logging. May be one/more of:\n" "\t\t\tprocess,file,io,mem,blktrace,verify,random,parse,\n" - "\t\t\tdiskutil,job,mutex,profile,time,net\n"); + "\t\t\tdiskutil,job,mutex,profile,time,net,rate\n"); printf(" --parse-only\t\tParse options only, don't start any IO\n"); printf(" --output\t\tWrite output to file\n"); printf(" --runtime\t\tRuntime in seconds\n"); @@ -1421,7 +1432,8 @@ static void usage(const char *name) "\t\t\t(option=system,percpu) or run unit work\n" "\t\t\tcalibration only (option=calibrate)\n"); printf("\nFio was written by Jens Axboe "); - printf("\n Jens Axboe \n"); + printf("\n Jens Axboe "); + printf("\n Jens Axboe \n"); } #ifdef FIO_INC_DEBUG @@ -1482,6 +1494,10 @@ struct debug_level debug_levels[] = { .help = "Network logging", .shift = FD_NET, }, + { .name = "rate", + .help = "Rate logging", + .shift = FD_RATE, + }, { .name = NULL, }, };