X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=flow.c;h=e0ac13521f453ed32f2e1ce2fbcdaeb93e70adcc;hp=b7a2fb12287332eb01d7fe48cf0f0ad5eb7902dc;hb=4717fc5db6601707d6e4fe7ea1e383f1847f5620;hpb=fba5c5ff89163062922c3e560e871c087f2177c3 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;