Lines Matching refs:ipo

25 void queue_io_piece(struct thread_data *td, struct io_piece *ipo)  in queue_io_piece()  argument
27 flist_add_tail(&ipo->list, &td->io_log_list); in queue_io_piece()
28 td->total_io_size += ipo->len; in queue_io_piece()
95 static int ipo_special(struct thread_data *td, struct io_piece *ipo) in ipo_special() argument
103 if (ipo->ddir != DDIR_INVAL) in ipo_special()
106 f = td->files[ipo->fileno]; in ipo_special()
108 switch (ipo->file_action) { in ipo_special()
122 log_err("fio: bad file action %d\n", ipo->file_action); in ipo_special()
131 struct io_piece *ipo; in read_iolog_get() local
137 ipo = flist_first_entry(&td->io_log_list, struct io_piece, list); in read_iolog_get()
138 flist_del(&ipo->list); in read_iolog_get()
139 remove_trim_entry(td, ipo); in read_iolog_get()
141 ret = ipo_special(td, ipo); in read_iolog_get()
143 free(ipo); in read_iolog_get()
146 free(ipo); in read_iolog_get()
150 io_u->ddir = ipo->ddir; in read_iolog_get()
151 if (ipo->ddir != DDIR_WAIT) { in read_iolog_get()
152 io_u->offset = ipo->offset; in read_iolog_get()
153 io_u->buflen = ipo->len; in read_iolog_get()
154 io_u->file = td->files[ipo->fileno]; in read_iolog_get()
158 if (ipo->delay) in read_iolog_get()
159 iolog_delay(td, ipo->delay); in read_iolog_get()
162 if (ipo->delay > elapsed) in read_iolog_get()
163 usec_sleep(td, (ipo->delay - elapsed) * 1000); in read_iolog_get()
166 free(ipo); in read_iolog_get()
178 struct io_piece *ipo; in prune_io_piece_log() local
182 ipo = rb_entry(n, struct io_piece, rb_node); in prune_io_piece_log()
184 remove_trim_entry(td, ipo); in prune_io_piece_log()
186 free(ipo); in prune_io_piece_log()
190 ipo = flist_first_entry(&td->io_hist_list, struct io_piece, list); in prune_io_piece_log()
191 flist_del(&ipo->list); in prune_io_piece_log()
192 remove_trim_entry(td, ipo); in prune_io_piece_log()
194 free(ipo); in prune_io_piece_log()
204 struct io_piece *ipo, *__ipo; in log_io_piece() local
206 ipo = malloc(sizeof(struct io_piece)); in log_io_piece()
207 init_ipo(ipo); in log_io_piece()
208 ipo->file = io_u->file; in log_io_piece()
209 ipo->offset = io_u->offset; in log_io_piece()
210 ipo->len = io_u->buflen; in log_io_piece()
211 ipo->numberio = io_u->numberio; in log_io_piece()
212 ipo->flags = IP_F_IN_FLIGHT; in log_io_piece()
214 io_u->ipo = ipo; in log_io_piece()
217 flist_add_tail(&ipo->trim_list, &td->trim_list); in log_io_piece()
236 (file_randommap(td, ipo->file) || td->o.verify == VERIFY_NONE)) { in log_io_piece()
237 INIT_FLIST_HEAD(&ipo->list); in log_io_piece()
238 flist_add_tail(&ipo->list, &td->io_hist_list); in log_io_piece()
239 ipo->flags |= IP_F_ONLIST; in log_io_piece()
244 RB_CLEAR_NODE(&ipo->rb_node); in log_io_piece()
257 if (ipo->file < __ipo->file) in log_io_piece()
259 else if (ipo->file > __ipo->file) in log_io_piece()
261 else if (ipo->offset < __ipo->offset) { in log_io_piece()
263 overlap = ipo->offset + ipo->len > __ipo->offset; in log_io_piece()
265 else if (ipo->offset > __ipo->offset) { in log_io_piece()
267 overlap = __ipo->offset + __ipo->len > ipo->offset; in log_io_piece()
275 ipo->offset, ipo->len); in log_io_piece()
284 rb_link_node(&ipo->rb_node, parent, p); in log_io_piece()
285 rb_insert_color(&ipo->rb_node, &td->io_hist_tree); in log_io_piece()
286 ipo->flags |= IP_F_ONRB; in log_io_piece()
292 struct io_piece *ipo = io_u->ipo; in unlog_io_piece() local
294 if (!ipo) in unlog_io_piece()
297 if (ipo->flags & IP_F_ONRB) in unlog_io_piece()
298 rb_erase(&ipo->rb_node, &td->io_hist_tree); in unlog_io_piece()
299 else if (ipo->flags & IP_F_ONLIST) in unlog_io_piece()
300 flist_del(&ipo->list); in unlog_io_piece()
302 free(ipo); in unlog_io_piece()
303 io_u->ipo = NULL; in unlog_io_piece()
309 struct io_piece *ipo = io_u->ipo; in trim_io_piece() local
311 if (!ipo) in trim_io_piece()
314 ipo->len = io_u->xfer_buflen - io_u->resid; in trim_io_piece()
351 struct io_piece *ipo; in read_iolog2() local
420 ipo = malloc(sizeof(*ipo)); in read_iolog2()
421 init_ipo(ipo); in read_iolog2()
422 ipo->ddir = rw; in read_iolog2()
424 ipo->delay = offset; in read_iolog2()
426 ipo->offset = offset; in read_iolog2()
427 ipo->len = bytes; in read_iolog2()
430 ipo->fileno = fileno; in read_iolog2()
431 ipo->file_action = file_action; in read_iolog2()
435 queue_io_piece(td, ipo); in read_iolog2()