--latency-log is now gone
[fio.git] / init.c
diff --git a/init.c b/init.c
index 4f8b38d6e6324f5acab8ccd074a23cdeaf74d3ca..c2d6109f079ac2c156cb306fc5e420ac364590d6 100644 (file)
--- a/init.c
+++ b/init.c
@@ -64,8 +64,6 @@ int write_bw_log = 0;
 int read_only = 0;
 int status_interval = 0;
 
-static int write_lat_log;
-
 static int prev_group_jobs;
 
 unsigned long fio_debug = 0;
@@ -1056,6 +1054,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        char fname[PATH_MAX];
        int numjobs, file_alloced;
        struct thread_options *o = &td->o;
+       char logname[PATH_MAX + 32];
 
        /*
         * the def_thread is just for options, it's not a real job
@@ -1145,20 +1144,27 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        if (setup_rate(td))
                goto err;
 
-       if (o->lat_log_file || write_lat_log) {
+       if (o->lat_log_file) {
+               snprintf(logname, sizeof(logname), "%s_lat.log", o->lat_log_file);
                setup_log(&td->lat_log, o->log_avg_msec, IO_LOG_TYPE_LAT,
-                               o->log_offset);
+                               o->log_offset, logname);
+               snprintf(logname, sizeof(logname), "%s_slat.log", o->lat_log_file);
                setup_log(&td->slat_log, o->log_avg_msec, IO_LOG_TYPE_SLAT,
-                               o->log_offset);
+                               o->log_offset, logname);
+               snprintf(logname, sizeof(logname), "%s_clat.log", o->lat_log_file);
                setup_log(&td->clat_log, o->log_avg_msec, IO_LOG_TYPE_CLAT,
-                               o->log_offset);
+                               o->log_offset, logname);
        }
-       if (o->bw_log_file || write_bw_log)
+       if (o->bw_log_file) {
+               snprintf(logname, sizeof(logname), "%s_bw.log", o->bw_log_file);
                setup_log(&td->bw_log, o->log_avg_msec, IO_LOG_TYPE_BW,
-                               o->log_offset);
-       if (o->iops_log_file)
+                               o->log_offset, logname);
+       }
+       if (o->iops_log_file) {
+               snprintf(logname, sizeof(logname), "%s_iops.log", o->iops_log_file);
                setup_log(&td->iops_log, o->log_avg_msec, IO_LOG_TYPE_IOPS,
-                               o->log_offset);
+                               o->log_offset, logname);
+       }
 
        if (!o->name)
                o->name = strdup(jobname);
@@ -1515,7 +1521,6 @@ static void usage(const char *name)
        printf("  --parse-only\t\tParse options only, don't start any IO\n");
        printf("  --output\t\tWrite output to file\n");
        printf("  --runtime\t\tRuntime in seconds\n");
-       printf("  --latency-log\t\tGenerate per-job latency logs\n");
        printf("  --bandwidth-log\tGenerate per-job bandwidth logs\n");
        printf("  --minimal\t\tMinimal (terse) output\n");
        printf("  --output-format=x\tOutput format (terse,json,normal)\n");
@@ -1756,7 +1761,9 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
                        }
                        break;
                case 'l':
-                       write_lat_log = 1;
+                       log_err("fio: --latency-log is deprecated. Use per-job latency log options.\n");
+                       do_exit++;
+                       exit_val = 1;
                        break;
                case 'b':
                        write_bw_log = 1;