]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: drivePivot: Fix assumption when 'block-job-complete' fails
authorPeter Krempa <pkrempa@redhat.com>
Wed, 1 Apr 2015 17:00:20 +0000 (19:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2015 08:00:56 +0000 (10:00 +0200)
commit8a609afb6f2a0c28ee0985a48f04bd018f46bcc1
treed9528a938312f40633588c9310be75cb8ef4eb5d
parent065a81082d55f9c521b8be954d35229a633b7f92
qemu: drivePivot: Fix assumption when 'block-job-complete' fails

QEMU does not abandon the mirror. The job carries on in the synchronised
phase and it might be either pivoted again or cancelled. The commit
hints that the described behavior was happening in a downstream version.

If the command returns false there are two possible options:
1) qemu did not reach the point where it would ask the block job to
pivot
2) pivotting failed in the actual qemu coroutine

If either of those would happen we return failure and reset the
condition that waits for the block job to complete. This makes the API
fail but in case where qemu would actually abandon the mirror the fact
is notified via the event and handled asynchronously.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1202704
src/qemu/qemu_driver.c