X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=flow.c;h=e0ac13521f453ed32f2e1ce2fbcdaeb93e70adcc;hp=b7a2fb12287332eb01d7fe48cf0f0ad5eb7902dc;hb=1767bd34cdc1a7607a8460b8173d08d7954adf99;hpb=95820b6e6c92025df8d89c0bf39b174e53137c41 diff --git a/flow.c b/flow.c index b7a2fb12..e0ac1352 100644 --- 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) { - if (td->o.flow_sleep) + if (td->o.flow_sleep) { + io_u_quiesce(td); usleep(td->o.flow_sleep); + } + 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"); + fio_mutex_up(flow_lock); return NULL; } flow->refs = 0;