[PATCH] Allow proper sharing of files
diff --git a/fio-ini.c b/fio-ini.c
index 611bdca..0c83f70 100644
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -213,9 +213,9 @@
if (td->filetype == FIO_TYPE_FILE) {
if (td->directory[0] != '\0')
- sprintf(td->file_name, "%s/%s.%d", td->directory, jobname, td->thread_number);
+ sprintf(td->file_name, "%s/%s.%d", td->directory, jobname, td->jobnum);
else
- sprintf(td->file_name, "%s.%d", jobname, td->thread_number);
+ sprintf(td->file_name, "%s.%d", jobname, td->jobnum);
} else
strcpy(td->file_name, jobname);
@@ -263,6 +263,7 @@
td_new->numjobs = 1;
td_new->stonewall = 0;
+ td_new->jobnum = numjobs;
if (add_job(td_new, jobname, prioclass, prio))
goto err;
diff --git a/fio.h b/fio.h
index 0844e6a..a183d72 100644
--- a/fio.h
+++ b/fio.h
@@ -146,6 +146,7 @@
unsigned int use_thread;
unsigned int iodepth;
os_cpu_mask_t cpumask;
+ unsigned int jobnum;
struct drand48_data bsrange_state;
struct drand48_data verify_state;