On Thu, Oct 09, 2025 at 06:19:15PM +0200, Kevin Wolf wrote:
> Am 10.09.2025 um 19:56 hat Stefan Hajnoczi geschrieben:
> > 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 <[email protected]>
> > Reviewed-by: Eric Blake <[email protected]>
> 
> > @@ -369,7 +370,7 @@ static const FDMonOps fdmon_io_uring_ops = {
> >      .gsource_dispatch = fdmon_io_uring_gsource_dispatch,
> >  };
> >  
> > -bool fdmon_io_uring_setup(AioContext *ctx)
> > +void fdmon_io_uring_setup(AioContext *ctx, Error **errp)
> >  {
> >      int ret;
> 
> Same as in the previous patch, it would be more conventional to keep the
> bool return code in addition to the Error **. Either way:

Will fix in v5.

> 
> Reviewed-by: Kevin Wolf <[email protected]>
> 

Attachment: signature.asc
Description: PGP signature

Reply via email to