]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: fix race between disk mirror fail and cancel
authorMichael Chapman <mike@very.puzzling.org>
Mon, 30 Mar 2015 02:41:00 +0000 (13:41 +1100)
committerJán Tomko <jtomko@redhat.com>
Wed, 8 Apr 2015 07:45:47 +0000 (09:45 +0200)
commite5d729ba42d86eb3afa9799bca2944700fde41bb
treeed1070105f6ab0f7a26b6ab2baa194e30a19be3e
parent77ddd0bba2379b4ba33980d8f3976f9344451cca
qemu: fix race between disk mirror fail and cancel

If a VM migration is aborted, a disk mirror may be failed by QEMU before
libvirt has a chance to cancel it. The disk->mirrorState remains at
_ABORT in this case, and this breaks subsequent mirrorings of that disk.

We should instead check the mirrorState directly and transition to _NONE
if it is already aborted. Do the check *after* aborting the block job in
QEMU to avoid a race.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
src/qemu/qemu_migration.c