]> git.ipfire.org Git - thirdparty/qemu.git/commit
aio: add errp argument to aio_context_setup()
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 4 Nov 2025 02:29:27 +0000 (21:29 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 11 Nov 2025 21:06:09 +0000 (22:06 +0100)
commit421dcc8023aa3751763d12aa0e13d8dcbb393b4c
tree0558a12bc392a668547217f4b095169047ad6d5c
parent3769b9abe9e03acc3cbf4a22a8754a2c09482c7d
aio: add errp argument to aio_context_setup()

When aio_context_new() -> aio_context_setup() fails at startup it
doesn't really matter whether errors are returned to the caller or the
process terminates immediately.

However, it is not acceptable to terminate when hotplugging --object
iothread at runtime. Refactor aio_context_setup() so that errors can be
propagated. The next commit will set errp when fdmon_io_uring_setup()
fails.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20251104022933.618123-10-stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/block/aio.h
util/aio-posix.c
util/aio-win32.c
util/async.c