aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-09-14 10:00:58 -0400
committerKevin Wolf <kwolf@redhat.com>2023-12-21 22:49:27 +0100
commitcd0c0db0aa905af9b72735d5ea40cb41206c7ca8 (patch)
tree62c3cfd84c94aef0a291a5be76217b27b7483b82 /qemu-io.c
parent7075d235114b40b30524cf1c5b61906c0bbf5f4d (diff)
downloadqemu-cd0c0db0aa905af9b72735d5ea40cb41206c7ca8.zip
qemu-cd0c0db0aa905af9b72735d5ea40cb41206c7ca8.tar.gz
qemu-cd0c0db0aa905af9b72735d5ea40cb41206c7ca8.tar.bz2
block/file-posix: set up Linux AIO and io_uring in the current thread
The file-posix block driver currently only sets up Linux AIO and io_uring in the BDS's AioContext. In the multi-queue block layer we must be able to submit I/O requests in AioContexts that do not have Linux AIO and io_uring set up yet since any thread can call into the block driver. Set up Linux AIO and io_uring for the current AioContext during request submission. We lose the ability to return an error from .bdrv_file_open() when Linux AIO and io_uring setup fails (e.g. due to resource limits). Instead the user only gets warnings and we fall back to aio=threads. This is still better than a fatal error after startup. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20230914140101.1065008-2-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
0 files changed, 0 insertions, 0 deletions