td->loops = 1;
if (td->o.block_error_hist && td->o.nr_files != 1) {
- log_err("fio: block error histogram only available with "
+ log_err("fio: block error histogram only available "
"with a single file per job, but %d files "
"provided\n", td->o.nr_files);
ret = 1;
return 1;
}
+static void init_rand_file_service(struct thread_data *td)
+{
+ unsigned long nranges = td->o.nr_files << FIO_FSERVICE_SHIFT;
+ const unsigned int seed = td->rand_seeds[FIO_RAND_FILE_OFF];
+
+ if (td->o.file_service_type == FIO_FSERVICE_ZIPF) {
+ zipf_init(&td->next_file_zipf, nranges, td->zipf_theta, seed);
+ zipf_disable_hash(&td->next_file_zipf);
+ } else if (td->o.file_service_type == FIO_FSERVICE_PARETO) {
+ pareto_init(&td->next_file_zipf, nranges, td->pareto_h, seed);
+ zipf_disable_hash(&td->next_file_zipf);
+ } else if (td->o.file_service_type == FIO_FSERVICE_GAUSS) {
+ gauss_init(&td->next_file_gauss, nranges, td->gauss_dev, seed);
+ gauss_disable_hash(&td->next_file_gauss);
+ }
+}
+
+void td_fill_verify_state_seed(struct thread_data *td)
+{
+ bool use64;
+
+ if (td->o.random_generator == FIO_RAND_GEN_TAUSWORTHE64)
+ use64 = 1;
+ else
+ use64 = 0;
+
+ init_rand_seed(&td->verify_state, td->rand_seeds[FIO_RAND_VER_OFF],
+ use64);
+}
+
static void td_fill_rand_seeds_internal(struct thread_data *td, bool use64)
{
int i;
init_rand_seed(&td->bsrange_state, td->rand_seeds[FIO_RAND_BS_OFF], use64);
- init_rand_seed(&td->verify_state, td->rand_seeds[FIO_RAND_VER_OFF], use64);
+ td_fill_verify_state_seed(td);
init_rand_seed(&td->rwmix_state, td->rand_seeds[FIO_RAND_MIX_OFF], false);
if (td->o.file_service_type == FIO_FSERVICE_RANDOM)
init_rand_seed(&td->next_file_state, td->rand_seeds[FIO_RAND_FILE_OFF], use64);
+ else if (td->o.file_service_type & __FIO_FSERVICE_NONUNIFORM)
+ init_rand_file_service(td);
init_rand_seed(&td->file_size_state, td->rand_seeds[FIO_RAND_FILE_SIZE_OFF], use64);
init_rand_seed(&td->trim_state, td->rand_seeds[FIO_RAND_TRIM_OFF], use64);
seed *= 0x9e370001UL;
for (i = 0; i < FIO_RAND_NR_OFFS; i++) {
- td->rand_seeds[i] = seed;
+ td->rand_seeds[i] = seed * td->thread_number + i;
seed *= 0x9e370001UL;
}
};
const char *suf;
+ if (fio_option_is_set(o, bw_avg_time))
+ p.avg_msec = min(o->log_avg_msec, o->bw_avg_time);
+ else
+ o->bw_avg_time = p.avg_msec;
+
if (p.log_gz_store)
suf = "log.fz";
else
};
const char *suf;
+ if (fio_option_is_set(o, iops_avg_time))
+ p.avg_msec = min(o->log_avg_msec, o->iops_avg_time);
+ else
+ o->iops_avg_time = p.avg_msec;
+
if (p.log_gz_store)
suf = "log.fz";
else
!strncmp(argv[optind], "-", 1))
break;
- if (fio_client_add_ini_file(cur_client, argv[optind], 0))
+ if (fio_client_add_ini_file(cur_client, argv[optind], false))
break;
optind++;
}
break;
case 'R':
did_arg = 1;
- if (fio_client_add_ini_file(cur_client, optarg, 1)) {
+ if (fio_client_add_ini_file(cur_client, optarg, true)) {
do_exit++;
exit_val = 1;
}