From: Jens Axboe Date: Tue, 13 Jun 2006 12:53:38 +0000 (+0200) Subject: [PATCH] Stonewalling wasn't properly done in some circumstances X-Git-Tag: fio-1.6~9 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0c7e37a04aa04ba22e812f8de7971fcef46b8191 [PATCH] Stonewalling wasn't properly done in some circumstances We don't want to stonewall individual jobs in a file, but that happened inadvertently with the multi file change. Get it right, stonewall the first job in all files except the first. --- diff --git a/init.c b/init.c index b310f663..2df509b2 100644 --- a/init.c +++ b/init.c @@ -625,7 +625,7 @@ static int str_ioengine_cb(struct thread_data *td, char *str) /* * This is our [ini] type file parser. */ -int parse_jobs_ini(char *file) +int parse_jobs_ini(char *file, int stonewall_flag) { unsigned int prioclass, prio, cpu, global, il; unsigned long long ull; @@ -635,7 +635,7 @@ int parse_jobs_ini(char *file) fpos_t off; FILE *f; char *p; - int ret = 0, stonewall = 1; + int ret = 0, stonewall; f = fopen(file, "r"); if (!f) { @@ -647,6 +647,7 @@ int parse_jobs_ini(char *file) name = malloc(256); tmpbuf = malloc(4096); + stonewall = stonewall_flag; while ((p = fgets(string, 4096, f)) != NULL) { if (ret) break; @@ -1157,7 +1158,7 @@ int parse_options(int argc, char *argv[]) for (i = 0; i < job_files; i++) { if (fill_def_thread()) return 1; - if (parse_jobs_ini(ini_file[i])) + if (parse_jobs_ini(ini_file[i], i)) return 1; free(ini_file[i]); }