Hi, Peter Xu: If call aio_epoll_disable() here, aio_epoll_disable() will return before close ctx->epollfd, Because the ctx->epoll_enabled is false in the moment. In the process of addIOThread, aio_context_setup created epoll without call aio_epoll_try_enable, so ctx->epoll_enabled have no chance to set true.
On 2018/5/16 16:36, Jie Wang wrote: > +void aio_context_destroy(AioContext *ctx) > +{ > +#ifdef CONFIG_EPOLL_CREATE1 > + if (ctx->epollfd >= 0) { > + close(ctx->epollfd); > + } > +#endif > +} > + > void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, > int64_t grow, int64_t shrink, Error **errp)