steadystate: kill off ->attained
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 31042cab8f7e6f510c54a5ec1391f0527134e984..d91473657f0ce8cd0378669ab85b674574cbfd40 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1276,7 +1276,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts,
                json_object_add_value_string(tmp, "ss", ss_buf);
                json_object_add_value_int(tmp, "duration", (int)ss->dur);
                json_object_add_value_int(tmp, "steadystate_ramptime", ss->ramp_time / 1000000L);
-               json_object_add_value_int(tmp, "attained", ss->attained);
+               json_object_add_value_int(tmp, "attained", ss->mode & __FIO_SS_ATTAINED);
 
                snprintf(ss_buf, sizeof(ss_buf), "%f%s", (float) ss->criterion, ss->pct ? "%" : "");
                json_object_add_value_string(tmp, "criterion", ss_buf);
@@ -1294,7 +1294,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts,
                ** otherwise it actually points to the second element
                ** in the list
                */
-               if (ss->attained || ss->sum_y == 0)
+               if ((ss->mode & __FIO_SS_ATTAINED) || ss->sum_y == 0)
                        j = ss->head;
                else
                        j = ss->head == 0 ? ss->dur - 1 : ss->head - 1;