Makes it easier to just inherit the allocations.
-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);
- if (td->file_name)
- free(td->file_name);
-}
-
static int create_file(struct thread_data *td, unsigned long long size,
int extend)
{
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->mmap)
munmap(td->mmap, td->file_size);
cleanup_io(td);
cleanup_io_u(td);
td_set_runstate(td, TD_EXITED);
cleanup_io(td);
cleanup_io_u(td);
td_set_runstate(td, TD_EXITED);
td->fd = -1;
td->thread_number = thread_number;
td->fd = -1;
td->thread_number = thread_number;
- td->directory = NULL;
- td->iolog_file = NULL;
- td->exec_prerun = NULL;
- td->exec_postrun = NULL;
- td->ioscheduler = NULL;
- td->sysfs_root = NULL;
- td->file_name = NULL;
-