Lines Matching refs:rw

159 static void inflight_merge(struct inflight *i, int rw, unsigned int size)  in inflight_merge()  argument
161 i->p->o.merges[rw]++; in inflight_merge()
240 static void __add_bs(struct btrace_out *o, unsigned int len, int rw) in __add_bs() argument
242 o->bs[rw] = realloc(o->bs[rw], (o->nr_bs[rw] + 1) * sizeof(struct bs)); in __add_bs()
243 o->bs[rw][o->nr_bs[rw]].bs = len; in __add_bs()
244 o->bs[rw][o->nr_bs[rw]].nr = 1; in __add_bs()
245 o->nr_bs[rw]++; in __add_bs()
248 static void add_bs(struct btrace_out *o, unsigned int len, int rw) in add_bs() argument
250 struct bs *bs = o->bs[rw]; in add_bs()
253 if (!o->nr_bs[rw]) { in add_bs()
254 __add_bs(o, len, rw); in add_bs()
258 for (i = 0; i < o->nr_bs[rw]; i++) { in add_bs()
265 __add_bs(o, len, rw); in add_bs()
344 int rw; in handle_trace_fs() local
351 rw = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0; in handle_trace_fs()
353 if (o->first_ttime[rw] == -1ULL) in handle_trace_fs()
354 o->first_ttime[rw] = t->time; in handle_trace_fs()
356 add_bs(o, t->bytes, rw); in handle_trace_fs()
357 o->ios[rw]++; in handle_trace_fs()
359 if (t->sector == o->last_end[rw] || o->last_end[rw] == -1ULL) in handle_trace_fs()
360 o->seq[rw]++; in handle_trace_fs()
362 o->last_end[rw] = t->sector + (t->bytes >> 9); in handle_trace_fs()
559 static unsigned long o_to_kb_rate(struct btrace_out *o, int rw) in o_to_kb_rate() argument
561 uint64_t usec = (o->last_ttime[rw] - o->first_ttime[rw]) / 1000ULL; in o_to_kb_rate()
571 val = o->kb[rw] * 1000ULL; in o_to_kb_rate()
791 static void remove_ddir(struct btrace_out *o, int rw) in remove_ddir() argument
793 o->ios[rw] = 0; in remove_ddir()