memcpy(&td->ts.stat_sample_time, &td->start, sizeof(td->start));
memcpy(&td->tv_cache, &td->start, sizeof(td->start));
- if (td->o.ratemin)
+ if (td->o.ratemin[0] || td->o.ratemin[1])
memcpy(&td->lastrate, &td->ts.stat_sample_time,
sizeof(td->lastrate));
* its own files. so close them, if we opened them
* for creation
*/
- for_each_file(td, f, i)
- td_io_close_file(td, f);
+ for_each_file(td, f, i) {
+ if (fio_file_open(f))
+ td_io_close_file(td, f);
+ else
+ assert(f->fd == -1);
+ }
}
init_disk_util(td);