]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix up basic migration.
authorChris Lalancette <clalance@redhat.com>
Thu, 20 May 2010 19:25:41 +0000 (15:25 -0400)
committerChris Lalancette <clalance@redhat.com>
Tue, 25 May 2010 14:48:10 +0000 (10:48 -0400)
commit93500040f90fe2a7413da6f78543aab4644c5a82
treec1bea481e9315bc547128e25d0ab37d9e4ce418b
parentfb3ebd0397980ae035e66f0008b09e13377ef80f
Fix up basic migration.

Basic live migration was broken by the commit that added
non-shared block support in two ways:

1)  It added a virCheckFlags() to doNativeMigrate().  Besides
the fact that typical usage of virCheckFlags() is in driver
entry points, and doNativeMigrate() is not an entry point,
it was missing important flags like VIR_MIGRATE_LIVE.  Move
the virCheckFlags to the top-level qemuDomainMigratePrepare2
and friends.

2)  It also added a memory leak in qemuMonitorTextMigrate()
by not freeing the memory used by virBufferContentAndReset().
This is fixed by storing the pointer in a temporary variable
and freeing it at the end.

With this patch in place, normal live migration works again.

v3: Instead of the churn for virCheckFlagsUI and UL, instead
always promote flags to an unsigned long and always use %lx
for the fprintf.
v2: Add back flags check, which required adding virCheckFlagsUI
and virCheckFlagsUL

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/internal.h
src/qemu/qemu_driver.c
src/qemu/qemu_monitor_text.c