Fio version 1.15
[fio.git] / init.c
diff --git a/init.c b/init.c
index 27040326424a10ebc992e70c5fdc9929801309d9..520f7f086e7c8289bf662efe4b107c37e54c914e 100644 (file)
--- a/init.c
+++ b/init.c
@@ -17,7 +17,7 @@
 #include "fio.h"
 #include "parse.h"
 
-static char fio_version_string[] = "fio 1.14a";
+static char fio_version_string[] = "fio 1.15";
 
 #define FIO_RANDSEED           (0xb1899bedUL)
 
@@ -115,6 +115,9 @@ static struct thread_data *get_new_job(int global, struct thread_data *parent)
        td = &threads[thread_number++];
        *td = *parent;
 
+       dup_files(td, parent);
+       options_mem_dupe(td);
+
        td->thread_number = thread_number;
        return td;
 }
@@ -358,7 +361,6 @@ static int init_random_state(struct thread_data *td)
        return 0;
 }
 
-
 /*
  * Adds a job to the list of things todo. Sanitizes the various options
  * to make sure we don't have conflicts, and initializes various
@@ -369,7 +371,6 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
        const char *ddir_str[] = { NULL, "read", "write", "rw", NULL,
                                   "randread", "randwrite", "randrw" };
        unsigned int i;
-       struct fio_file *f;
        const char *engine;
        char fname[PATH_MAX];
        int numjobs, file_alloced;
@@ -412,13 +413,6 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
        if (fixup_options(td))
                goto err;
 
-       for_each_file(td, f, i) {
-               if (td->o.directory && f->filetype == FIO_TYPE_FILE) {
-                       sprintf(fname, "%s/%s", td->o.directory, f->file_name);
-                       f->file_name = strdup(fname);
-               }
-       }
-               
        td->mutex = fio_sem_init(0);
 
        td->ts.clat_stat[0].min_val = td->ts.clat_stat[1].min_val = ULONG_MAX;
@@ -487,6 +481,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
 
                td_new->o.numjobs = 1;
                td_new->o.stonewall = 0;
+               td_new->o.new_group = 0;
 
                if (file_alloced) {
                        td_new->o.filename = NULL;
@@ -808,6 +803,7 @@ int parse_options(int argc, char *argv[])
        }
 
        free(ini_file);
+       options_mem_free(&def_thread);
 
        if (!thread_number) {
                log_err("No jobs defined(s)\n");