Home | History | Annotate | Download | only in fio

Lines Matching defs:flow

18 	struct fio_flow *flow = td->flow;
21 if (!flow)
24 sign = td->o.flow > 0 ? 1 : -1;
25 if (sign * flow->flow_counter > td->o.flow_watermark) {
35 * matter if the flow count is slightly inaccurate */
36 flow->flow_counter += td->o.flow;
42 struct fio_flow *flow = NULL;
51 flow = flist_entry(n, struct fio_flow, list);
52 if (flow->id == id)
55 flow = NULL;
58 if (!flow) {
59 flow = smalloc(sizeof(*flow));
60 if (!flow) {
64 flow->refs = 0;
65 INIT_FLIST_HEAD(&flow->list);
66 flow->id = id;
67 flow->flow_counter = 0;
69 flist_add_tail(&flow->list, flow_list);
72 flow->refs++;
74 return flow;
77 static void flow_put(struct fio_flow *flow)
84 if (!--flow->refs) {
85 flist_del(&flow->list);
86 sfree(flow);
94 if (td->o.flow)
95 td->flow = flow_get(td->o.flow_id);
100 if (td->flow) {
101 flow_put(td->flow);
102 td->flow = NULL;
116 log_err("fio: failed to allocate flow lock\n");