]> git.proxmox.com Git - mirror_qemu.git/commit
block: Consistently call bdrv_activate() outside coroutine
authorKevin Wolf <kwolf@redhat.com>
Thu, 4 May 2023 11:57:32 +0000 (13:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 10 May 2023 12:16:53 +0000 (14:16 +0200)
commitda4afaff074e56b0fa0d25abf865784148018895
tree4925a8d084e0d7f6356606aa1be88f3f43751e76
parent0050c163ff6d8167e07c9fc4be7f728316140cb6
block: Consistently call bdrv_activate() outside coroutine

Migration code can call bdrv_activate() in coroutine context, whereas
other callers call it outside of coroutines. As it calls other code that
is not supposed to run in coroutines, standardise on running outside of
coroutines.

This adds a no_co_wrapper to switch to the main loop before calling
bdrv_activate().

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/block-backend.c
include/block/block-global-state.h