• Home
  • Raw
  • Download

Lines Matching refs:bd

35 static void binject_buc_init(struct binject_data *bd, struct io_u *io_u)  in binject_buc_init()  argument
97 struct binject_data *bd = td->io_ops_data; in fio_binject_getevents() local
99 void *buf = bd->cmds; in fio_binject_getevents()
113 bd->fd_flags[i] = fio_set_fd_nonblocking(bf->fd, "binject"); in fio_binject_getevents()
115 bd->fd_flags[i] = -1; in fio_binject_getevents()
117 bd->pfds[i].fd = bf->fd; in fio_binject_getevents()
118 bd->pfds[i].events = POLLIN; in fio_binject_getevents()
123 ret = poll(bd->pfds, td->o.nr_files, -1); in fio_binject_getevents()
132 if (pollin_events(bd->pfds, td->o.nr_files)) in fio_binject_getevents()
150 bd->events[ev_index] = (struct io_u *) (unsigned long) buc->usr_ptr; in fio_binject_getevents()
159 if (bd->fd_flags[i] == -1) in fio_binject_getevents()
162 if (fcntl(bf->fd, F_SETFL, bd->fd_flags[i]) < 0) in fio_binject_getevents()
188 struct binject_data *bd = td->io_ops_data; in fio_binject_prep() local
198 binject_buc_init(bd, io_u); in fio_binject_prep()
201 binject_buc_init(bd, io_u); in fio_binject_prep()
207 binject_buc_init(bd, io_u); in fio_binject_prep()
237 struct binject_data *bd = td->io_ops_data; in fio_binject_event() local
239 return bd->events[event]; in fio_binject_event()
379 struct binject_data *bd = td->io_ops_data; in fio_binject_cleanup() local
381 if (bd) { in fio_binject_cleanup()
382 free(bd->events); in fio_binject_cleanup()
383 free(bd->cmds); in fio_binject_cleanup()
384 free(bd->fd_flags); in fio_binject_cleanup()
385 free(bd->pfds); in fio_binject_cleanup()
386 free(bd); in fio_binject_cleanup()
392 struct binject_data *bd; in fio_binject_init() local
394 bd = malloc(sizeof(*bd)); in fio_binject_init()
395 memset(bd, 0, sizeof(*bd)); in fio_binject_init()
397 bd->cmds = malloc(td->o.iodepth * sizeof(struct b_user_cmd)); in fio_binject_init()
398 memset(bd->cmds, 0, td->o.iodepth * sizeof(struct b_user_cmd)); in fio_binject_init()
400 bd->events = malloc(td->o.iodepth * sizeof(struct io_u *)); in fio_binject_init()
401 memset(bd->events, 0, td->o.iodepth * sizeof(struct io_u *)); in fio_binject_init()
403 bd->pfds = malloc(sizeof(struct pollfd) * td->o.nr_files); in fio_binject_init()
404 memset(bd->pfds, 0, sizeof(struct pollfd) * td->o.nr_files); in fio_binject_init()
406 bd->fd_flags = malloc(sizeof(int) * td->o.nr_files); in fio_binject_init()
407 memset(bd->fd_flags, 0, sizeof(int) * td->o.nr_files); in fio_binject_init()
409 td->io_ops_data = bd; in fio_binject_init()