Lines Matching refs:fifo
21 static int refill_fifo(struct thread_data *td, struct fifo *fifo, int fd) in refill_fifo() argument
28 if (total > fifo_room(fifo)) in refill_fifo()
29 total = fifo_room(fifo); in refill_fifo()
38 ret = fifo_put(fifo, buf, ret); in refill_fifo()
47 static int trace_fifo_get(struct thread_data *td, struct fifo *fifo, int fd, in trace_fifo_get() argument
50 if (fifo_len(fifo) < len) { in trace_fifo_get()
51 int ret = refill_fifo(td, fifo, fd); in trace_fifo_get()
57 return fifo_get(fifo, buf, len); in trace_fifo_get()
63 static int discard_pdu(struct thread_data *td, struct fifo *fifo, int fd, in discard_pdu() argument
70 return trace_fifo_get(td, fifo, fd, NULL, t->pdu_len); in discard_pdu()
426 struct fifo *fifo; in load_blktrace() local
437 fifo = fifo_alloc(TRACE_FIFO_SIZE); in load_blktrace()
452 int ret = trace_fifo_get(td, fifo, fd, &t, sizeof(t)); in load_blktrace()
476 ret = discard_pdu(td, fifo, fd, &t); in load_blktrace()
507 fifo_free(fifo); in load_blktrace()
567 fifo_free(fifo); in load_blktrace()