projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
client: parse env variables before sending job-file contents to server
[fio.git]
/
time.c
diff --git
a/time.c
b/time.c
index 07984190d67a914173e1980f0ed0461b45ea5ee8..c8876829a367ede755453f6b255b2f4139ee8a74 100644
(file)
--- a/
time.c
+++ b/
time.c
@@
-97,16
+97,17
@@
bool in_ramp_time(struct thread_data *td)
return td->o.ramp_time && !td->ramp_time_over;
}
return td->o.ramp_time && !td->ramp_time_over;
}
-static
void
parent_update_ramp(struct thread_data *td)
+static
bool
parent_update_ramp(struct thread_data *td)
{
struct thread_data *parent = td->parent;
if (!parent || parent->ramp_time_over)
{
struct thread_data *parent = td->parent;
if (!parent || parent->ramp_time_over)
- return;
+ return
false
;
reset_all_stats(parent);
reset_all_stats(parent);
- parent->ramp_time_over =
1
;
+ parent->ramp_time_over =
true
;
td_set_runstate(parent, TD_RAMP);
td_set_runstate(parent, TD_RAMP);
+ return true;
}
bool ramp_time_over(struct thread_data *td)
}
bool ramp_time_over(struct thread_data *td)
@@
-115,10
+116,18
@@
bool ramp_time_over(struct thread_data *td)
return true;
if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
return true;
if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
- td->ramp_time_over =
1
;
+ td->ramp_time_over =
true
;
reset_all_stats(td);
td_set_runstate(td, TD_RAMP);
reset_all_stats(td);
td_set_runstate(td, TD_RAMP);
- parent_update_ramp(td);
+
+ /*
+ * If we have a parent, the parent isn't doing IO. Hence
+ * the parent never enters do_io(), which will switch us
+ * from RAMP -> RUNNING. Do this manually here.
+ */
+ if (parent_update_ramp(td))
+ td_set_runstate(td, TD_RUNNING);
+
return true;
}
return true;
}