#endif
memset(threads, 0, max_jobs * sizeof(struct thread_data));
- fio_debug_jobp = (void *) threads + max_jobs * sizeof(struct thread_data);
+ fio_debug_jobp = (unsigned int *)(threads + max_jobs);
*fio_debug_jobp = -1;
flow_init();
bool use64;
if (td->o.random_generator == FIO_RAND_GEN_TAUSWORTHE64)
- use64 = 1;
+ use64 = true;
else
- use64 = 0;
+ use64 = false;
init_rand_seed(&td->verify_state, td->rand_seeds[FIO_RAND_VER_OFF],
use64);
}
if (td->o.random_generator == FIO_RAND_GEN_TAUSWORTHE64)
- use64 = 1;
+ use64 = true;
else
- use64 = 0;
+ use64 = false;
td_fill_rand_seeds_internal(td, use64);
unsigned long seed;
unsigned int i;
- if (!td->o.rand_repeatable && !fio_option_is_set(&td->o, rand_seed))
- return init_random_state(td, td->rand_seeds, sizeof(td->rand_seeds));
+ if (!td->o.rand_repeatable && !fio_option_is_set(&td->o, rand_seed)) {
+ int ret = init_random_seeds(td->rand_seeds, sizeof(td->rand_seeds));
+ if (!ret)
+ td_fill_rand_seeds(td);
+ return ret;
+ }
seed = td->o.rand_seed;
for (i = 0; i < 4; i++)
td->ts.slat_stat[i].min_val = ULONG_MAX;
td->ts.lat_stat[i].min_val = ULONG_MAX;
td->ts.bw_stat[i].min_val = ULONG_MAX;
+ td->ts.iops_stat[i].min_val = ULONG_MAX;
}
td->ddir_seq_nr = o->ddir_seq_nr;
prev_group_jobs++;
if (setup_random_seeds(td)) {
- td_verror(td, errno, "init_random_state");
+ td_verror(td, errno, "setup_random_seeds");
goto err;
}
printf(" --version\t\tPrint version info and exit\n");
printf(" --help\t\tPrint this page\n");
printf(" --cpuclock-test\tPerform test/validation of CPU clock\n");
- printf(" --crctest=type\tTest speed of checksum functions\n");
+ printf(" --crctest=[type]\tTest speed of checksum functions\n");
printf(" --cmdhelp=cmd\t\tPrint command help, \"all\" for all of"
" them\n");
printf(" --enghelp=engine\tPrint ioengine help, or list"
break;
case 'V':
terse_version = atoi(optarg);
- if (!(terse_version == 2 || terse_version == 3 ||
- terse_version == 4)) {
+ if (!(terse_version >= 2 && terse_version <= 5)) {
log_err("fio: bad terse version format\n");
exit_val = 1;
do_exit++;