From 84784e07d285601946e42e8cbad2603bcc1905c6 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 13 Aug 2016 20:34:41 -0600 Subject: [PATCH] steadystate: rename 'steadystate' to 'steadystate_enabled' Signed-off-by: Jens Axboe --- fio.h | 3 --- helper_thread.c | 2 +- init.c | 2 +- steadystate.c | 4 ++-- steadystate.h | 4 +++- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fio.h b/fio.h index d099da82..aca5afa7 100644 --- a/fio.h +++ b/fio.h @@ -472,9 +472,6 @@ extern char *trigger_remote_cmd; extern long long trigger_timeout; extern char *aux_path; -extern bool steadystate; -#define STEADYSTATE_MSEC (1000) - extern struct thread_data *threads; static inline void fio_ro_check(const struct thread_data *td, struct io_u *io_u) diff --git a/helper_thread.c b/helper_thread.c index f88e781a..47ec728c 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -125,7 +125,7 @@ static void *helper_thread_main(void *data) if (!next_log) next_log = DISK_UTIL_MSEC; - if (steadystate) { + if (steadystate_enabled) { since_ss = mtime_since(&last_ss, &now); if (since_ss >= STEADYSTATE_MSEC || STEADYSTATE_MSEC - since_ss < 10) { steadystate_check(); diff --git a/init.c b/init.c index 91138650..64119eb2 100644 --- a/init.c +++ b/init.c @@ -1579,7 +1579,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, } if (o->ss_dur) { - steadystate = true; + steadystate_enabled = true; o->ss_dur /= 1000000L; /* put all steady state info in one place */ diff --git a/steadystate.c b/steadystate.c index 53d30342..528e9525 100644 --- a/steadystate.c +++ b/steadystate.c @@ -4,14 +4,14 @@ #include "steadystate.h" #include "helper_thread.h" -bool steadystate = false; +bool steadystate_enabled = false; void steadystate_setup(void) { int i, prev_groupid; struct thread_data *td, *prev_td; - if (!steadystate) + if (!steadystate_enabled) return; /* diff --git a/steadystate.h b/steadystate.h index aa31112b..5342b2cd 100644 --- a/steadystate.h +++ b/steadystate.h @@ -7,7 +7,7 @@ extern void steadystate_check(void); extern void steadystate_setup(void); extern void steadystate_alloc(struct thread_data *); -extern bool steadystate; +extern bool steadystate_enabled; /* * For steady state detection @@ -51,6 +51,8 @@ enum { FIO_STEADYSTATE_BW_SLOPE, }; +#define STEADYSTATE_MSEC 1000 + static inline bool steadystate_check_slope(struct thread_options *o) { return o->ss == FIO_STEADYSTATE_IOPS_SLOPE || -- 2.25.1