[PATCH] Make it easier to match up filename and job number
authorJens Axboe <axboe@suse.de>
Fri, 9 Jun 2006 09:37:28 +0000 (11:37 +0200)
committerJens Axboe <axboe@suse.de>
Fri, 9 Jun 2006 09:37:28 +0000 (11:37 +0200)
fio.h
init.c

diff --git a/fio.h b/fio.h
index 2d57227..49603eb 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -191,7 +191,6 @@ struct thread_data {
        unsigned int numjobs;
        unsigned int iodepth;
        os_cpu_mask_t cpumask;
-       unsigned int jobnum;
        unsigned int iolog;
        unsigned int read_iolog;
        unsigned int write_iolog;
diff --git a/init.c b/init.c
index ee9ab7d..570095a 100644 (file)
--- a/init.c
+++ b/init.c
@@ -137,9 +137,9 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
                char tmp[PATH_MAX];
 
                if (td->directory && td->directory[0] != '\0')
-                       sprintf(tmp, "%s/%s.%d", td->directory, jobname, td->jobnum);
+                       sprintf(tmp, "%s/%s.%d", td->directory, jobname, td->thread_number);
                else
-                       sprintf(tmp, "%s.%d", jobname, td->jobnum);
+                       sprintf(tmp, "%s.%d", jobname, td->thread_number);
                td->file_name = strdup(tmp);
        } else
                td->file_name = strdup(jobname);
@@ -195,7 +195,6 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
 
                td_new->numjobs = 1;
                td_new->stonewall = 0;
-               td_new->jobnum = numjobs;
                job_add_num = numjobs - 1;
 
                if (add_job(td_new, jobname, job_add_num))
@@ -616,7 +615,7 @@ int parse_jobs_ini(char *file)
                /*
                 * Seperate multiple job files by a stonewall
                 */
-               if (stonewall) {
+               if (!global && stonewall) {
                        td->stonewall = stonewall;
                        stonewall = 0;
                }