steadystate: rename options->ss to options->ss_state since ss is used elsewhere to...
authorVincent Fu <Vincent.Fu@sandisk.com>
Thu, 8 Dec 2016 20:00:02 +0000 (15:00 -0500)
committerVincent Fu <Vincent.Fu@sandisk.com>
Thu, 8 Dec 2016 20:00:02 +0000 (15:00 -0500)
cconv.c
options.c
steadystate.c
thread_options.h

diff --git a/cconv.c b/cconv.c
index a01475a99e433ae82fa40478a8a16814a18be917..ebbac0aa1906c795b40ab6a13330b18c76c13f82 100644 (file)
--- a/cconv.c
+++ b/cconv.c
@@ -214,7 +214,7 @@ void convert_thread_options_to_cpu(struct thread_options *o,
        o->ramp_time = le64_to_cpu(top->ramp_time);
        o->ss_dur = le64_to_cpu(top->ss_dur);
        o->ss_ramp_time = le64_to_cpu(top->ss_ramp_time);
-       o->ss = le32_to_cpu(top->ss);
+       o->ss_state = le32_to_cpu(top->ss_state);
        o->ss_limit.u.f = fio_uint64_to_double(le64_to_cpu(top->ss_limit.u.i));
        o->zone_range = le64_to_cpu(top->zone_range);
        o->zone_size = le64_to_cpu(top->zone_size);
@@ -519,7 +519,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
        top->ramp_time = __cpu_to_le64(o->ramp_time);
        top->ss_dur = __cpu_to_le64(top->ss_dur);
        top->ss_ramp_time = __cpu_to_le64(top->ss_ramp_time);
-       top->ss = cpu_to_le32(top->ss);
+       top->ss_state = cpu_to_le32(top->ss_state);
        top->ss_limit.u.i = __cpu_to_le64(fio_double_to_uint64(o->ss_limit.u.f));
        top->zone_range = __cpu_to_le64(o->zone_range);
        top->zone_size = __cpu_to_le64(o->zone_size);
index 9d471bbdc8da612d9b5e3637a19eaa2f06d2368e..e0db19ba836286133d681b259b6c00afb4cd5aa1 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1069,8 +1069,8 @@ static int str_steadystate_cb(void *data, const char *str)
        char *pct;
        long long ll;
 
-       if (td->o.ss != FIO_SS_IOPS && td->o.ss != FIO_SS_IOPS_SLOPE &&
-           td->o.ss != FIO_SS_BW && td->o.ss != FIO_SS_BW_SLOPE) {
+       if (td->o.ss_state != FIO_SS_IOPS && td->o.ss_state != FIO_SS_IOPS_SLOPE &&
+           td->o.ss_state != FIO_SS_BW && td->o.ss_state != FIO_SS_BW_SLOPE) {
                /* should be impossible to get here */
                log_err("fio: unknown steady state criterion\n");
                return 1;
@@ -1099,9 +1099,9 @@ static int str_steadystate_cb(void *data, const char *str)
                if (parse_dryrun())
                        return 0;
 
-               td->o.ss |= __FIO_SS_PCT;
+               td->o.ss_state |= __FIO_SS_PCT;
                td->o.ss_limit.u.f = val;
-       } else if (td->o.ss & __FIO_SS_IOPS) {
+       } else if (td->o.ss_state & __FIO_SS_IOPS) {
                if (!str_to_float(nr, &val, 0)) {
                        log_err("fio: steadystate IOPS threshold postfix parsing failed\n");
                        free(nr);
@@ -1129,7 +1129,7 @@ static int str_steadystate_cb(void *data, const char *str)
                td->o.ss_limit.u.f = (double) ll;
        }
 
-       td->ss.state = td->o.ss;
+       td->ss.state = td->o.ss_state;
        return 0;
 }
 
@@ -4210,7 +4210,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .lname  = "Steady state threshold",
                .alias  = "ss",
                .type   = FIO_OPT_STR,
-               .off1   = offsetof(struct thread_options, ss),
+               .off1   = offsetof(struct thread_options, ss_state),
                .cb     = str_steadystate_cb,
                .help   = "Define the criterion and limit to judge when a job has reached steady state",
                .def    = "iops_slope:0.01%",
index bce35b9718f237512597cba8a7710d890d705280..951376f86796bebea605d80a3c8b279caa4040d2 100644 (file)
@@ -278,7 +278,7 @@ void steadystate_check(void)
                                        (unsigned long long) group_bw,
                                        ss->head, ss->tail);
 
-               if (td->o.ss & __FIO_SS_SLOPE)
+               if (ss->state & __FIO_SS_SLOPE)
                        ret = steadystate_slope(group_iops, group_bw, td);
                else
                        ret = steadystate_deviation(group_iops, group_bw, td);
@@ -317,7 +317,7 @@ int td_steadystate_init(struct thread_data *td)
                ss->limit = o->ss_limit.u.f;
                ss->ramp_time = o->ss_ramp_time;
 
-               ss->state = o->ss;
+               ss->state = o->ss_state;
                if (!td->ss.ramp_time)
                        ss->state |= __FIO_SS_RAMP_OVER;
 
index e28c59d01bccfe2b8db9d934310c9686a09db3a2..d1e74380a41d1edb28d4533a42d97012073d725c 100644 (file)
@@ -169,7 +169,7 @@ struct thread_options {
        unsigned long long start_delay_high;
        unsigned long long timeout;
        unsigned long long ramp_time;
-       unsigned int ss;
+       unsigned int ss_state;
        fio_fp64_t ss_limit;
        unsigned long long ss_dur;
        unsigned long long ss_ramp_time;
@@ -431,7 +431,7 @@ struct thread_options_pack {
        uint64_t ramp_time;
        uint64_t ss_dur;
        uint64_t ss_ramp_time;
-       uint32_t ss;
+       uint32_t ss_state;
        fio_fp64_t ss_limit;
        uint32_t overwrite;
        uint32_t bw_avg_time;