Lines Matching refs:ch

232 bdev_daos_writev(struct bdev_daos *daos, struct bdev_daos_io_channel *ch,  in bdev_daos_writev()  argument
241 assert(ch != NULL); in bdev_daos_writev()
252 if ((rc = daos_event_init(&task->ev, ch->queue, NULL))) { in bdev_daos_writev()
267 if ((rc = dfs_write(ch->dfs, ch->obj, &task->sgl, offset, &task->ev))) { in bdev_daos_writev()
278 bdev_daos_readv(struct bdev_daos *daos, struct bdev_daos_io_channel *ch, in bdev_daos_readv() argument
287 assert(ch != NULL); in bdev_daos_readv()
298 if ((rc = daos_event_init(&task->ev, ch->queue, NULL))) { in bdev_daos_readv()
313 if ((rc = dfs_read(ch->dfs, ch->obj, &task->sgl, offset, &task->read_size, &task->ev))) { in bdev_daos_readv()
324 bdev_daos_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io, in bdev_daos_get_buf_cb() argument
328 struct bdev_daos_io_channel *dch = spdk_io_channel_get_ctx(ch); in bdev_daos_get_buf_cb()
352 struct spdk_io_channel *ch = spdk_io_channel_iter_get_channel(i); in _bdev_daos_get_io_inflight() local
353 struct bdev_daos_io_channel *dch = spdk_io_channel_get_ctx(ch); in _bdev_daos_get_io_inflight()
408 bdev_daos_unmap(struct bdev_daos_io_channel *ch, uint64_t nbytes, in bdev_daos_unmap() argument
414 if ((rc = dfs_punch(ch->dfs, ch->obj, offset, nbytes))) { in bdev_daos_unmap()
421 _bdev_daos_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io) in _bdev_daos_submit_request() argument
423 struct bdev_daos_io_channel *dch = spdk_io_channel_get_ctx(ch); in _bdev_daos_submit_request()
479 bdev_daos_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io) in bdev_daos_submit_request() argument
482 struct spdk_thread *submit_td = spdk_io_channel_get_thread(ch); in bdev_daos_submit_request()
489 _bdev_daos_submit_request(ch, bdev_io); in bdev_daos_submit_request()
498 struct bdev_daos_io_channel *ch = arg; in bdev_daos_channel_poll() local
500 assert(ch != NULL); in bdev_daos_channel_poll()
501 assert(ch->disk != NULL); in bdev_daos_channel_poll()
503 int rc = daos_eq_poll(ch->queue, 0, DAOS_EQ_NOWAIT, in bdev_daos_channel_poll()
508 ch->disk->disk.name, DP_RC(rc)); in bdev_daos_channel_poll()
588 bdev_daos_io_channel_setup_daos(struct bdev_daos_io_channel *ch) in bdev_daos_io_channel_setup_daos() argument
591 struct bdev_daos *daos = ch->disk; in bdev_daos_io_channel_setup_daos()
605 if ((rc = daos_pool_connect(daos->pool_name, NULL, DAOS_PC_RW, &ch->pool, &pinfo, NULL))) { in bdev_daos_io_channel_setup_daos()
611 if ((rc = daos_cont_open(ch->pool, daos->cont_name, DAOS_COO_RW, &ch->cont, &cinfo, NULL))) { in bdev_daos_io_channel_setup_daos()
618 if ((rc = dfs_mount(ch->pool, ch->cont, O_RDWR, &ch->dfs))) { in bdev_daos_io_channel_setup_daos()
623 if ((rc = dfs_open(ch->dfs, NULL, daos->disk.name, mode, fd_oflag, daos->oclass, in bdev_daos_io_channel_setup_daos()
624 0, NULL, &ch->obj))) { in bdev_daos_io_channel_setup_daos()
628 if ((rc = daos_eq_create(&ch->queue))) { in bdev_daos_io_channel_setup_daos()
638 dfs_release(ch->obj); in bdev_daos_io_channel_setup_daos()
640 dfs_umount(ch->dfs); in bdev_daos_io_channel_setup_daos()
642 daos_cont_close(ch->cont, NULL); in bdev_daos_io_channel_setup_daos()
644 daos_pool_disconnect(ch->pool, NULL); in bdev_daos_io_channel_setup_daos()
653 struct bdev_daos_io_channel *ch = ctx_buf; in bdev_daos_io_channel_create_cb() local
655 ch->disk = io_device; in bdev_daos_io_channel_create_cb()
657 if ((rc = bdev_daos_io_channel_setup_daos(ch))) { in bdev_daos_io_channel_create_cb()
662 ch->disk->disk.name); in bdev_daos_io_channel_create_cb()
664 ch->poller = SPDK_POLLER_REGISTER(bdev_daos_channel_poll, ch, 0); in bdev_daos_io_channel_create_cb()
673 struct bdev_daos_io_channel *ch = ctx_buf; in bdev_daos_io_channel_destroy_cb() local
677 spdk_poller_unregister(&ch->poller); in bdev_daos_io_channel_destroy_cb()
679 if ((rc = daos_eq_destroy(ch->queue, DAOS_EQ_DESTROY_FORCE))) { in bdev_daos_io_channel_destroy_cb()
682 if ((rc = dfs_release(ch->obj))) { in bdev_daos_io_channel_destroy_cb()
685 if ((rc = dfs_umount(ch->dfs))) { in bdev_daos_io_channel_destroy_cb()
688 if ((rc = daos_cont_close(ch->cont, NULL))) { in bdev_daos_io_channel_destroy_cb()
691 if ((rc = daos_pool_disconnect(ch->pool, NULL))) { in bdev_daos_io_channel_destroy_cb()
709 struct bdev_daos_io_channel ch = {}; in create_bdev_daos() local
794 rc = bdev_daos_io_channel_create_cb(daos, &ch); in create_bdev_daos()
800 bdev_daos_io_channel_destroy_cb(daos, &ch); in create_bdev_daos()
831 struct spdk_io_channel *ch; in bdev_daos_resize() local
854 ch = bdev_daos_get_io_channel(bdev); in bdev_daos_resize()
855 dch = spdk_io_channel_get_ctx(ch); in bdev_daos_resize()
859 spdk_put_io_channel(ch); in bdev_daos_resize()