[libvirt] [PATCH] Fix up basic migration.

Chris Lalancette clalance at redhat.com
Fri May 21 13:22:00 UTC 2010


On 05/20/2010 05:35 PM, Eric Blake wrote:
> On 05/20/2010 01:57 PM, Chris Lalancette wrote:
>> Basic live migration was broken by the commit that added
>> non-shared block support.  It also added a couple of
>> built-in memory leaks.  This patch fixes these problems
>> and allows normal live migration to work again.
>>
>> Signed-off-by: Chris Lalancette <clalance at redhat.com>
>> ---
>>  src/qemu/qemu_driver.c       |    3 ---
>>  src/qemu/qemu_monitor_text.c |   10 +++++++---
>>  2 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index cfa5964..bbab893 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -10205,9 +10205,6 @@ static int doNativeMigrate(struct qemud_driver *driver,
>>      qemuDomainObjPrivatePtr priv = vm->privateData;
>>      unsigned int background_flags = 0;
>>  
>> -    virCheckFlags(VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC,
>> -                  -1);
>> -
> 
> Why are you removing the valid flag check altogether?  Is it a matter of
> adding more valid flags, or is this just a forwarding routine to other
> methods that also do a valid flag check?

Yeah, I guess I should have been a bit more explicit here.  There's no hard-and-fast
rules about virCheckFlags(), but the general usage of it seems to be directly at
the entry points to the driver (i.e. in qemuDomainSuspend(), etc).  doNativeMigrate()
is not an entry point, it is a helper function.  In addition, there is a long list
of flags that migration supports, so the above list is far from complete.  Would it
be better if I added the check to qemuDomainMigratePerform() (with the complete
list of flags), which is actually the entry point for this function?

-- 
Chris Lalancette




More information about the libvir-list mailing list