Re: [PATCH v4 1/3] linux-aio: use LinuxAioState from the running thread

2022-10-31 Thread Stefan Hajnoczi
On Mon, Oct 31, 2022 at 08:59:34AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -56,10 +59,8 @@ struct LinuxAioState { > io_context_t ctx; > EventNotifier e; > > -/* io queue for submit at batch. Protected by AioContext lock. */ > +/* All data is only used in one I/O thread.

[PATCH v4 1/3] linux-aio: use LinuxAioState from the running thread

2022-10-31 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini Remove usage of aio_context_acquire by always submitting asynchronous AIO to the current thread's LinuxAioState. In order to prevent mistakes from the caller side, avoid passing LinuxAioState in laio_io_{plug/unplug} and laio_co_submit. Signed-off-by: Paolo Bonzini Signed-o