options: Add zonecapacity option for zonemode=zbd
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 74580f743bf94636ae9dc33d970dfa682d699921..b3951199bcc81a28f4728f2c327a30071faa252f 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -954,7 +954,7 @@ void json_array_add_disk_util(struct disk_util_stat *dus,
        obj = json_create_object();
        json_array_add_value_object(array, obj);
 
-       json_object_add_value_string(obj, "name", dus->name);
+       json_object_add_value_string(obj, "name", (const char *)dus->name);
        json_object_add_value_int(obj, "read_ios", dus->s.ios[0]);
        json_object_add_value_int(obj, "write_ios", dus->s.ios[1]);
        json_object_add_value_int(obj, "read_merges", dus->s.merges[0]);
@@ -1506,12 +1506,8 @@ static void json_add_job_opts(struct json_object *root, const char *name,
        json_object_add_value_object(root, name, dir_object);
 
        flist_for_each(entry, opt_list) {
-               const char *pos = "";
-
                p = flist_entry(entry, struct print_option, list);
-               if (p->value)
-                       pos = p->value;
-               json_object_add_value_string(dir_object, p->name, pos);
+               json_object_add_value_string(dir_object, p->name, p->value);
        }
 }
 
@@ -2354,8 +2350,6 @@ void __show_running_run_stats(void)
        fio_sem_up(stat_sem);
 }
 
-static bool status_interval_init;
-static struct timespec status_time;
 static bool status_file_disabled;
 
 #define FIO_STATUS_FILE                "fio-dump-status"
@@ -2398,16 +2392,6 @@ static int check_status_file(void)
 
 void check_for_running_stats(void)
 {
-       if (status_interval) {
-               if (!status_interval_init) {
-                       fio_gettime(&status_time, NULL);
-                       status_interval_init = true;
-               } else if (mtime_since_now(&status_time) >= status_interval) {
-                       show_running_run_stats();
-                       fio_gettime(&status_time, NULL);
-                       return;
-               }
-       }
        if (check_status_file()) {
                show_running_run_stats();
                return;
@@ -2749,7 +2733,7 @@ static unsigned long add_log_sample(struct thread_data *td,
                        return diff;
        }
 
-       _add_stat_to_log(iolog, elapsed, td->o.log_max != 0, priority_bit);
+       __add_stat_to_log(iolog, ddir, elapsed, td->o.log_max != 0, priority_bit);
 
        iolog->avg_last[ddir] = elapsed - (this_window - iolog->avg_msec);
        return iolog->avg_msec;