Lines Matching refs:ld

53 	struct guasi_data *ld = td->io_ops->data;  in fio_guasi_event()  local
58 if (guasi_req_info(ld->reqs[event], &rinf) < 0) { in fio_guasi_event()
85 struct guasi_data *ld = td->io_ops->data; in fio_guasi_getevents() local
90 if (min > ld->max_reqs) in fio_guasi_getevents()
91 min = ld->max_reqs; in fio_guasi_getevents()
92 if (max > ld->max_reqs) in fio_guasi_getevents()
93 max = ld->max_reqs; in fio_guasi_getevents()
96 for (n = 0; n < ld->reqs_nr; n++) in fio_guasi_getevents()
97 guasi_req_free(ld->reqs[n]); in fio_guasi_getevents()
100 r = guasi_fetch(ld->hctx, ld->reqs + n, min - n, in fio_guasi_getevents()
110 ld->reqs_nr = n; in fio_guasi_getevents()
118 struct guasi_data *ld = td->io_ops->data; in fio_guasi_queue() local
123 if (ld->queued_nr == (int) td->o.iodepth) in fio_guasi_queue()
126 ld->io_us[ld->queued_nr] = io_u; in fio_guasi_queue()
127 ld->queued_nr++; in fio_guasi_queue()
151 struct guasi_data *ld = td->io_ops->data; in fio_guasi_commit() local
156 GDBG_PRINT(("fio_guasi_commit(%d)\n", ld->queued_nr)); in fio_guasi_commit()
157 for (i = 0; i < ld->queued_nr; i++) { in fio_guasi_commit()
158 io_u = ld->io_us[i]; in fio_guasi_commit()
163 io_u->greq = guasi__pread(ld->hctx, ld, io_u, 0, in fio_guasi_commit()
167 io_u->greq = guasi__pwrite(ld->hctx, ld, io_u, 0, in fio_guasi_commit()
171 io_u->greq = guasi__fsync(ld->hctx, ld, io_u, 0, f->fd); in fio_guasi_commit()
182 fio_guasi_queued(td, ld->io_us, i); in fio_guasi_commit()
183 ld->queued_nr = 0; in fio_guasi_commit()
201 struct guasi_data *ld = td->io_ops->data; in fio_guasi_cleanup() local
204 GDBG_PRINT(("fio_guasi_cleanup(%p)\n", ld)); in fio_guasi_cleanup()
205 if (ld) { in fio_guasi_cleanup()
206 for (n = 0; n < ld->reqs_nr; n++) in fio_guasi_cleanup()
207 guasi_req_free(ld->reqs[n]); in fio_guasi_cleanup()
208 guasi_free(ld->hctx); in fio_guasi_cleanup()
209 free(ld->reqs); in fio_guasi_cleanup()
210 free(ld->io_us); in fio_guasi_cleanup()
211 free(ld); in fio_guasi_cleanup()
213 GDBG_PRINT(("fio_guasi_cleanup(%p) DONE\n", ld)); in fio_guasi_cleanup()
219 struct guasi_data *ld = malloc(sizeof(*ld)); in fio_guasi_init() local
222 memset(ld, 0, sizeof(*ld)); in fio_guasi_init()
226 if ((ld->hctx = guasi_create(GFIO_MIN_THREADS, maxthr, 1)) == NULL) { in fio_guasi_init()
228 free(ld); in fio_guasi_init()
231 ld->max_reqs = td->o.iodepth; in fio_guasi_init()
232 ld->reqs = malloc(ld->max_reqs * sizeof(guasi_req_t)); in fio_guasi_init()
233 ld->io_us = malloc(ld->max_reqs * sizeof(struct io_u *)); in fio_guasi_init()
234 memset(ld->io_us, 0, ld->max_reqs * sizeof(struct io_u *)); in fio_guasi_init()
235 ld->queued_nr = 0; in fio_guasi_init()
236 ld->reqs_nr = 0; in fio_guasi_init()
238 td->io_ops->data = ld; in fio_guasi_init()
239 GDBG_PRINT(("fio_guasi_init(): depth=%d -> %p\n", td->o.iodepth, ld)); in fio_guasi_init()