mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 21:47:16 +03:00
blockjob: wait for pivot to complete
https://bugzilla.redhat.com/show_bug.cgi?id=1119173 documents that commit eaba79d 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: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
a0b5ace28c
commit
97c59b9c46
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user