projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
iolog: convert drop warning to fio_did_warn()
[fio.git]
/
flow.c
diff --git
a/flow.c
b/flow.c
index 42b6dd75adbe63a4bbfc30ae26f5715a149e63d7..384187ef0a59095d7754c6435132afe00ef9fd09 100644
(file)
--- a/
flow.c
+++ b/
flow.c
@@
-16,13
+16,17
@@
static struct fio_mutex *flow_lock;
int flow_threshold_exceeded(struct thread_data *td)
{
struct fio_flow *flow = td->flow;
int flow_threshold_exceeded(struct thread_data *td)
{
struct fio_flow *flow = td->flow;
-
int sign
;
+
long long flow_counter
;
if (!flow)
return 0;
if (!flow)
return 0;
- sign = td->o.flow > 0 ? 1 : -1;
- if (sign * flow->flow_counter > td->o.flow_watermark) {
+ if (td->o.flow > 0)
+ flow_counter = flow->flow_counter;
+ else
+ flow_counter = -flow->flow_counter;
+
+ if (flow_counter > td->o.flow_watermark) {
if (td->o.flow_sleep) {
io_u_quiesce(td);
usleep(td->o.flow_sleep);
if (td->o.flow_sleep) {
io_u_quiesce(td);
usleep(td->o.flow_sleep);