Re: [PATCH 2/2] Fix migration in text mode and shared storage migration in json mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/24/2010 01:47 PM, Daniel P. Berrange wrote:
> The patches for shared storage migration were not correctly written
> for json mode. Thus the 'blk' and 'inc' parameters were never being
> set. In addition they didn't set the QEMU_MONITOR_MIGRATE_BACKGROUND
> so migration was synchronous. Due to multiple bugs in QEMU's JSON
> impl this wasn't noticed because it treated the sync migration requst
> as asynchronous anyway. Finally 'background' parameter was converted
> to take arbitrary flags but not renamed, and not all uses were changed
> to unsigned int.
> 
> * src/qemu/qemu_driver.c: Set QEMU_MONITOR_MIGRATE_BACKGROUND in
>   doNativeMigrate
> * src/qemu/qemu_monitor_json.c: Process QEMU_MONITOR_MIGRATE_NON_SHARED_DISK
>   and QEMU_MONITOR_MIGRATE_NON_SHARED_INC flags
> * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
>   src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c,
>   src/qemu/qemu_monitor_text.h: change 'int background' to
>   'unsigned int flags' in migration APIs. Add logging of flags
>   parameter
> ---
>  src/qemu/qemu_driver.c       |    2 +-
>  src/qemu/qemu_monitor.c      |   40 ++++++++++++++++++++--------------------
>  src/qemu/qemu_monitor.h      |    8 ++++----
>  src/qemu/qemu_monitor_json.c |   29 ++++++++++++++++-------------
>  src/qemu/qemu_monitor_json.h |    8 ++++----
>  src/qemu/qemu_monitor_text.c |   24 ++++++++++++------------
>  src/qemu/qemu_monitor_text.h |    8 ++++----
>  7 files changed, 61 insertions(+), 58 deletions(-)
> 
>  static int qemuMonitorJSONMigrate(qemuMonitorPtr mon,
> -                                  int background,
> +                                  unsigned int flags,
>                                    const char *uri)
>  {
>      int ret;
> -    virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("migrate",
> -                                                     "i:detach", background ? 1 : 0,
> -                                                     "s:uri", uri,
> -                                                     NULL);
> +    virJSONValuePtr cmd =
> +      qemuMonitorJSONMakeCommand("migrate",
> +				 "i:detach", flags & QEMU_MONITOR_MIGRATE_BACKGROUND ? 1 : 0,
> +				 "i:blk", flags & QEMU_MONITOR_MIGRATE_NON_SHARED_DISK ? 1 : 0,
> +				 "i:inc", flags & QEMU_MONITOR_MIGRATE_NON_SHARED_INC ? 1 : 0,
> +				 "s:uri", uri,
> +				 NULL);

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]