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 a01475a..ebbac0a 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 9d471bb..e0db19b 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 bce35b9..951376f 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 e28c59d..d1e7438 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;