On Mon, Jul 21, 2025 at 05:07:55PM -0400, Stefan Hajnoczi wrote: > io_uring may not be available at runtime due to system policies (e.g. > the io_uring_disabled sysctl) or creation could fail due to file > descriptor resource limits. > > Handle failure scenarios as follows: > > If another AioContext already has io_uring, then fail AioContext > creation so that the aio_add_sqe() API is available uniformly from all > QEMU threads. Otherwise fall back to epoll(7) if io_uring is > unavailable. > > Notes: > - Update the comment about selecting the fastest fdmon implementation. > At this point it's not about speed anymore, it's about aio_add_sqe() > API availability. > - Uppercase the error message when converting from error_report() to > error_setg_errno() for consistency (but there are instances of > lowercase in the codebase). > - It's easier to move the #ifdefs from aio-posix.h to aio-posix.c. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > util/aio-posix.h | 12 ++---------- > util/aio-posix.c | 29 ++++++++++++++++++++++++++--- > util/fdmon-io_uring.c | 8 ++++---- > 3 files changed, 32 insertions(+), 17 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org