Lines Matching refs:flow
18 struct fio_flow *flow = td->flow; in flow_threshold_exceeded() local
21 if (!flow) in flow_threshold_exceeded()
24 sign = td->o.flow > 0 ? 1 : -1; in flow_threshold_exceeded()
25 if (sign * flow->flow_counter > td->o.flow_watermark) { in flow_threshold_exceeded()
36 flow->flow_counter += td->o.flow; in flow_threshold_exceeded()
42 struct fio_flow *flow = NULL; in flow_get() local
51 flow = flist_entry(n, struct fio_flow, list); in flow_get()
52 if (flow->id == id) in flow_get()
55 flow = NULL; in flow_get()
58 if (!flow) { in flow_get()
59 flow = smalloc(sizeof(*flow)); in flow_get()
60 if (!flow) { in flow_get()
64 flow->refs = 0; in flow_get()
65 INIT_FLIST_HEAD(&flow->list); in flow_get()
66 flow->id = id; in flow_get()
67 flow->flow_counter = 0; in flow_get()
69 flist_add_tail(&flow->list, flow_list); in flow_get()
72 flow->refs++; in flow_get()
74 return flow; in flow_get()
77 static void flow_put(struct fio_flow *flow) in flow_put() argument
84 if (!--flow->refs) { in flow_put()
85 flist_del(&flow->list); in flow_put()
86 sfree(flow); in flow_put()
94 if (td->o.flow) in flow_init_job()
95 td->flow = flow_get(td->o.flow_id); in flow_init_job()
100 if (td->flow) { in flow_exit_job()
101 flow_put(td->flow); in flow_exit_job()
102 td->flow = NULL; in flow_exit_job()