Lines Matching defs:ch

58 	struct bdev_aio_io_channel	*ch;
172 struct spdk_io_channel *ch, struct bdev_aio_task *aio_task,
176 struct bdev_aio_io_channel *aio_ch = spdk_io_channel_get_ctx(ch);
188 aio_task->ch = aio_ch;
199 struct spdk_io_channel *ch, struct bdev_aio_task *aio_task,
203 struct bdev_aio_io_channel *aio_ch = spdk_io_channel_get_ctx(ch);
221 aio_task->ch = aio_ch;
229 struct spdk_io_channel *ch, struct bdev_aio_task *aio_task,
232 struct bdev_aio_io_channel *aio_ch = spdk_io_channel_get_ctx(ch);
243 rc = bdev_aio_submit_io(type, fdisk, ch, aio_task, iov, iovcnt, nbytes, offset);
366 aio_task->ch->io_inflight--;
463 aio_task->ch->io_inflight--;
537 struct spdk_io_channel *ch = spdk_io_channel_iter_get_channel(i);
538 struct bdev_aio_io_channel *aio_ch = spdk_io_channel_get_ctx(ch);
589 bdev_aio_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io,
602 ch,
616 _bdev_aio_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
663 bdev_aio_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
665 if (_bdev_aio_submit_request(ch, bdev_io) < 0) {
693 bdev_aio_create_io(struct bdev_aio_io_channel *ch)
695 ch->kqfd = kqueue();
696 if (ch->kqfd < 0) {
705 bdev_aio_destroy_io(struct bdev_aio_io_channel *ch)
707 close(ch->kqfd);
711 bdev_aio_create_io(struct bdev_aio_io_channel *ch)
713 if (io_setup(SPDK_AIO_QUEUE_DEPTH, &ch->io_ctx) < 0) {
723 bdev_aio_destroy_io(struct bdev_aio_io_channel *ch)
725 io_destroy(ch->io_ctx);
732 struct bdev_aio_io_channel *ch = ctx_buf;
735 rc = bdev_aio_create_io(ch);
740 ch->group_ch = spdk_io_channel_get_ctx(spdk_get_io_channel(&aio_if));
741 TAILQ_INSERT_TAIL(&ch->group_ch->io_ch_head, ch, link);
749 struct bdev_aio_io_channel *ch = ctx_buf;
751 bdev_aio_destroy_io(ch);
753 assert(ch->group_ch);
754 TAILQ_REMOVE(&ch->group_ch->io_ch_head, ch, link);
756 spdk_put_io_channel(spdk_io_channel_from_ctx(ch->group_ch));
835 bdev_aio_register_interrupt(struct bdev_aio_group_channel *ch)
844 ch->intr = SPDK_INTERRUPT_REGISTER(efd, bdev_aio_group_interrupt, ch);
845 if (ch->intr == NULL) {
849 ch->efd = efd;
855 bdev_aio_unregister_interrupt(struct bdev_aio_group_channel *ch)
857 spdk_interrupt_unregister(&ch->intr);
858 close(ch->efd);
859 ch->efd = -1;
865 struct bdev_aio_group_channel *ch = ctx_buf;
868 TAILQ_INIT(&ch->io_ch_head);
869 /* Initialize ch->efd to be invalid and unused. */
870 ch->efd = -1;
872 rc = bdev_aio_register_interrupt(ch);
879 ch->poller = SPDK_POLLER_REGISTER(bdev_aio_group_poll, ch, 0);
880 spdk_poller_register_interrupt(ch->poller, NULL, NULL);
888 struct bdev_aio_group_channel *ch = ctx_buf;
890 if (!TAILQ_EMPTY(&ch->io_ch_head)) {
894 spdk_poller_unregister(&ch->poller);
896 bdev_aio_unregister_interrupt(ch);