提交 d4a92a84 编写于 作者: F Fam Zheng 提交者: Michael S. Tsirkin

Revert "mirror: Workaround for unexpected iohandler events during completion"

This reverts commit ab27c3b5.

The virtio storage device host notifiers now work with
bdrv_drained_begin/end, so we don't need this hack any more.
Signed-off-by: NFam Zheng <famz@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 1c627137
...@@ -508,9 +508,6 @@ static void mirror_exit(BlockJob *job, void *opaque) ...@@ -508,9 +508,6 @@ static void mirror_exit(BlockJob *job, void *opaque)
block_job_completed(&s->common, data->ret); block_job_completed(&s->common, data->ret);
g_free(data); g_free(data);
bdrv_drained_end(src); bdrv_drained_end(src);
if (qemu_get_aio_context() == bdrv_get_aio_context(src)) {
aio_enable_external(iohandler_get_aio_context());
}
bdrv_unref(src); bdrv_unref(src);
} }
...@@ -734,12 +731,6 @@ immediate_exit: ...@@ -734,12 +731,6 @@ immediate_exit:
/* Before we switch to target in mirror_exit, make sure data doesn't /* Before we switch to target in mirror_exit, make sure data doesn't
* change. */ * change. */
bdrv_drained_begin(bs); bdrv_drained_begin(bs);
if (qemu_get_aio_context() == bdrv_get_aio_context(bs)) {
/* FIXME: virtio host notifiers run on iohandler_ctx, therefore the
* above bdrv_drained_end isn't enough to quiesce it. This is ugly, we
* need a block layer API change to achieve this. */
aio_disable_external(iohandler_get_aio_context());
}
block_job_defer_to_main_loop(&s->common, mirror_exit, data); block_job_defer_to_main_loop(&s->common, mirror_exit, data);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册