Ensure we inherit global latency/bw log settings
authorJens Axboe <axboe@fb.com>
Tue, 1 Apr 2014 19:34:49 +0000 (13:34 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 1 Apr 2014 19:34:49 +0000 (13:34 -0600)
Note that you cannot use a filename with these, it's just
an on/off switch. For tighter control of where the log
is written (and its name), use the job option instead of
the command line on/off switch.

Signed-off-by: Jens Axboe <axboe@fb.com>
init.c

diff --git a/init.c b/init.c
index 72d106afbb4892f5ce586a8b3101efbe331b0478..c7e056fa60e399d20297c003615506887f1b4875 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1087,12 +1087,12 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        if (setup_rate(td))
                goto err;
 
        if (setup_rate(td))
                goto err;
 
-       if (o->lat_log_file) {
+       if (o->lat_log_file || write_lat_log) {
                setup_log(&td->lat_log, o->log_avg_msec, IO_LOG_TYPE_LAT);
                setup_log(&td->slat_log, o->log_avg_msec, IO_LOG_TYPE_SLAT);
                setup_log(&td->clat_log, o->log_avg_msec, IO_LOG_TYPE_CLAT);
        }
                setup_log(&td->lat_log, o->log_avg_msec, IO_LOG_TYPE_LAT);
                setup_log(&td->slat_log, o->log_avg_msec, IO_LOG_TYPE_SLAT);
                setup_log(&td->clat_log, o->log_avg_msec, IO_LOG_TYPE_CLAT);
        }
-       if (o->bw_log_file)
+       if (o->bw_log_file || write_bw_log)
                setup_log(&td->bw_log, o->log_avg_msec, IO_LOG_TYPE_BW);
        if (o->iops_log_file)
                setup_log(&td->iops_log, o->log_avg_msec, IO_LOG_TYPE_IOPS);
                setup_log(&td->bw_log, o->log_avg_msec, IO_LOG_TYPE_BW);
        if (o->iops_log_file)
                setup_log(&td->iops_log, o->log_avg_msec, IO_LOG_TYPE_IOPS);