return 0;
}
+static void cleanup_allocs(struct thread_data *td)
+{
+ if (td->directory)
+ free(td->directory);
+ if (td->iolog_file)
+ free(td->iolog_file);
+ if (td->exec_prerun)
+ free(td->exec_prerun);
+ if (td->exec_postrun)
+ free(td->exec_postrun);
+ if (td->ioscheduler)
+ free(td->ioscheduler);
+ if (td->sysfs_root)
+ free(td->sysfs_root);
+}
+
static int create_file(struct thread_data *td, unsigned long long size,
int extend)
{
}
if (td->mmap)
munmap(td->mmap, td->file_size);
- if (td->directory)
- free(td->directory);
- if (td->iolog_file)
- free(td->iolog_file);
- if (td->exec_prerun)
- free(td->exec_prerun);
- if (td->exec_postrun)
- free(td->exec_postrun);
- if (td->ioscheduler)
- free(td->ioscheduler);
- if (td->sysfs_root)
- free(td->sysfs_root);
+ cleanup_allocs(td);
cleanup_io(td);
cleanup_io_u(td);
td_set_runstate(td, TD_EXITED);
rs = &runstats[i];
if (rs->max_run[0])
- rs->agg[0] = (rs->io_mb[0]*1024*1000) / rs->max_run[0];
+ rs->agg[0] = (rs->io_mb[0]*1024*1024) / rs->max_run[0];
if (rs->max_run[1])
- rs->agg[1] = (rs->io_mb[1]*1024*1000) / rs->max_run[1];
+ rs->agg[1] = (rs->io_mb[1]*1024*1024) / rs->max_run[1];
}
/*