提交 97c59b9c 编写于 作者: E Eric Blake

blockjob: wait for pivot to complete

https://bugzilla.redhat.com/show_bug.cgi?id=1119173 documents that
commit eaba79d2 was flawed in the implementation of the
VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC flag when it comes to completing
a blockcopy.  Basically, the qemu pivot action is async (the QMP
command returns immediately, but the user must wait for the
BLOCK_JOB_COMPLETE event to know that all I/O related to the job
has finally been flushed), but the libvirt command was documented
as synchronous by default.  As active block commit will also be
using this code, it is worth fixing now.

* src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Don't skip wait
loop after pivot.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 a0b5ace2
......@@ -14981,7 +14981,7 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
if (disk->mirror && mode == BLOCK_JOB_ABORT &&
(flags & VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT)) {
ret = qemuDomainBlockPivot(conn, driver, vm, device, disk);
goto endjob;
goto waitjob;
}
if (base &&
......@@ -15038,6 +15038,7 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
disk->mirroring = false;
}
waitjob:
/* With synchronous block cancel, we must synthesize an event, and
* we silently ignore the ABORT_ASYNC flag. With asynchronous
* block cancel, the event will come from qemu, but without the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册