/* * We only care for queue traces, most of the others are side effects * due to internal workings of the block layer. */ static void handle_trace(struct thread_data *td, struct blk_io_trace *t, unsigned long *ios, unsigned int *bs) { static unsigned long long last_ttime; unsigned long long delay; if ((t->action & 0xffff) != __BLK_TA_QUEUE) return; if (!(t->action & BLK_TC_ACT(BLK_TC_NOTIFY))) { if (!last_ttime || td->o.no_stall) { last_ttime = t->time; delay = 0; } else { delay = t->time - last_ttime; last_ttime = t->time; } } if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY)) handle_trace_notify(t); else if (t->action & BLK_TC_ACT(BLK_TC_DISCARD)) handle_trace_discard(td, t, delay, ios, bs); else handle_trace_fs(td, t, delay, ios, bs); }
/* * We only care for queue traces, most of the others are side effects * due to internal workings of the block layer. */ static void handle_trace(struct thread_data *td, struct blk_io_trace *t, unsigned long long ttime, unsigned long *ios, unsigned int *bs) { if ((t->action & 0xffff) != __BLK_TA_QUEUE) return; if (t->action & BLK_TC_ACT(BLK_TC_PC)) return; if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY)) handle_trace_notify(t); else if (t->action & BLK_TC_ACT(BLK_TC_DISCARD)) handle_trace_discard(td, t, ttime, ios); else handle_trace_fs(td, t, ttime, ios, bs); }