On Wed, May 16, 2018 at 02:39:44PM +0800, Jie Wang wrote: > From: w00251574 <wangji...@huawei.com>
(Maybe you'd prefer to still use "Jie Wang" here? :) > > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by: Jie Wang <wangji...@huawei.com> [...] > diff --git a/util/aio-posix.c b/util/aio-posix.c > index d8f0cb4af8..bd81455851 100644 > --- a/util/aio-posix.c > +++ b/util/aio-posix.c > @@ -713,6 +713,13 @@ void aio_context_setup(AioContext *ctx) > #endif > } > > +void aio_context_destroy(AioContext *ctx) > +{ > +#ifdef CONFIG_EPOLL_CREATE1 > + close(ctx->epollfd); Would it be better to call aio_epoll_disable() here? Otherwise it looks good to me. > +#endif > +} > + Regards, -- Peter Xu