]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockjob: Synchronously update backing chain in XML on ABORT/PIVOT v1.2.14-rc2
authorPeter Krempa <pkrempa@redhat.com>
Mon, 30 Mar 2015 09:26:20 +0000 (11:26 +0200)
committerDaniel Veillard <veillard@redhat.com>
Tue, 31 Mar 2015 00:36:17 +0000 (08:36 +0800)
commit630ee5ac6cf4e3be3f3e986897a289865dd2604b
treebb3646e1beb229a54565056e5e8538f3ba086b41
parent0c4474df4e10d27e27dbcda80b1f9cc14f4bdd8a
qemu: blockjob: Synchronously update backing chain in XML on ABORT/PIVOT

When the synchronous pivot option is selected, libvirt would not update
the backing chain until the job was exitted. Some applications then
received invalid data as their job serialized first.

This patch removes polling to wait for the ABORT/PIVOT job completion
and replaces it with a condition. If a synchronous operation is
requested the update of the XML is executed in the job of the caller of
the synchronous request. Otherwise the monitor event callback uses a
separate worker to update the backing chain with a new job.

This is a regression since 1a92c719101e5bfa6fe2b78006ad04c7f075ea28

When the ABORT job is finished synchronously you get the following call
stack:
 #0  qemuBlockJobEventProcess
 #1  qemuDomainBlockJobImpl
 #2  qemuDomainBlockJobAbort
 #3  virDomainBlockJobAbort

While previously or while using the _ASYNC flag you'd get:
 #0  qemuBlockJobEventProcess
 #1  processBlockJobEvent
 #2  qemuProcessEventHandler
 #3  virThreadPoolWorker
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c