]> git.proxmox.com Git - mirror_qemu.git/commit - block/linux-aio.c
linux-aio: use LinuxAioState from the running thread
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Fri, 3 Feb 2023 13:17:28 +0000 (08:17 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Apr 2023 11:17:28 +0000 (13:17 +0200)
commitab50533b6946b1adeb8eef62c6b16689abcd1e70
treef26f82f922d324d83cb181a9c1176833afd562ba
parente95200c1c524403e42e8712c7391a8acd5825656
linux-aio: use LinuxAioState from the running thread

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, and document the functions
to make clear that they work in the current thread's AioContext.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20230203131731.851116-2-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/file-posix.c
block/linux-aio.c
include/block/aio.h
include/block/raw-aio.h
include/sysemu/block-backend-io.h