提交 9a7e86c8 编写于 作者: K Kevin Wolf

block: Assert drain_all is only called from main AioContext

Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NFam Zheng <famz@redhat.com>
上级 8e77e0bc
......@@ -330,6 +330,12 @@ void bdrv_drain_all_begin(void)
BdrvNextIterator it;
GSList *aio_ctxs = NULL, *ctx;
/* BDRV_POLL_WHILE() for a node can only be called from its own I/O thread
* or the main loop AioContext. We potentially use BDRV_POLL_WHILE() on
* nodes in several different AioContexts, so make sure we're in the main
* context. */
assert(qemu_get_current_aio_context() == qemu_get_aio_context());
block_job_pause_all();
for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册