projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gfio: fix link error
[fio.git]
/
flow.c
diff --git
a/flow.c
b/flow.c
index b7a2fb12287332eb01d7fe48cf0f0ad5eb7902dc..e0ac13521f453ed32f2e1ce2fbcdaeb93e70adcc 100644
(file)
--- a/
flow.c
+++ b/
flow.c
@@
-23,8
+23,11
@@
int flow_threshold_exceeded(struct thread_data *td)
sign = td->o.flow > 0 ? 1 : -1;
if (sign * flow->flow_counter > td->o.flow_watermark) {
sign = td->o.flow > 0 ? 1 : -1;
if (sign * flow->flow_counter > td->o.flow_watermark) {
- if (td->o.flow_sleep)
+ if (td->o.flow_sleep) {
+ io_u_quiesce(td);
usleep(td->o.flow_sleep);
usleep(td->o.flow_sleep);
+ }
+
return 1;
}
return 1;
}
@@
-56,6
+59,7
@@
static struct fio_flow *flow_get(unsigned int id)
flow = smalloc(sizeof(*flow));
if (!flow) {
log_err("fio: smalloc pool exhausted\n");
flow = smalloc(sizeof(*flow));
if (!flow) {
log_err("fio: smalloc pool exhausted\n");
+ fio_mutex_up(flow_lock);
return NULL;
}
flow->refs = 0;
return NULL;
}
flow->refs = 0;