]> git.ipfire.org Git - thirdparty/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)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 May 2023 17:50:38 +0000 (20:50 +0300)
commit38a598aee3c7d716524f1f7c75e9299a879fcc65
tree8feb59c523afc2af17a66dbc41f608238a02b502
parent2197a94cb461c3bfff9d183ae79d4c99964163c4
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>
(cherry picked from commit da4afaff074e56b0fa0d25abf865784148018895)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block/block-backend.c
include/block/block-global-state.h