void td_fill_rand_seeds(struct thread_data *td)
{
+ if (td->o.allrand_repeatable) {
+ for (int i = 0; i < FIO_RAND_NR_OFFS; i++)
+ td->rand_seeds[i] = FIO_RANDSEED * td->thread_number
+ + i;
+ }
+
if (td->o.use_os_rand)
td_fill_rand_seeds_os(td);
else
td_new->o.new_group = 0;
if (file_alloced) {
- td_new->o.filename = NULL;
td_new->files_index = 0;
td_new->files_size = 0;
- td_new->files = NULL;
+ if (td_new->files) {
+ struct fio_file *f;
+ for_each_file(td_new, f, i) {
+ if (f->file_name)
+ free(f->file_name);
+ free(f);
+ }
+ td_new->files = NULL;
+ }
+ if (td_new->o.filename) {
+ free(td_new->o.filename);
+ td_new->o.filename = NULL;
+ }
}
job_add_num = numjobs - 1;