[libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

Eric Blake eblake at redhat.com
Wed Mar 7 18:36:22 UTC 2012


On 03/07/2012 11:19 AM, Michal Privoznik wrote:
> Currently, startupPolicy='requisite' was determining cold boot
> by migrateForm != NULL. That means, if domain was started up
> with migrateForm set we didn't require disk source path and allowed

s/migrateForm/migrateFrom/ (twice)

> it to be dropped. However, on snapshot-revert domain wasn't migrated
> but according to documentation, requisite should drop disk source
> as well.
> ---
> 
> Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=798938
> 
>  src/qemu/qemu_driver.c    |   16 +++++++++-------
>  src/qemu/qemu_migration.c |    2 +-
>  src/qemu/qemu_process.c   |    3 ++-
>  src/qemu/qemu_process.h   |    1 +
>  4 files changed, 13 insertions(+), 9 deletions(-)
> 

> @@ -4107,8 +4107,9 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
>      }
>  
>      /* Set the migration source and start it up. */
> -    ret = qemuProcessStart(conn, driver, vm, "stdio", true,
> -                           false, *fd, path, NULL, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE);
> +    ret = qemuProcessStart(conn, driver, vm, "stdio", false, true,
> +                           false, *fd, path, NULL,

Yuck - we're starting to rack up so many bools that it's hard to tell
which one is which.  This patch can go in as-is, but I'd also like to
see a followup patch that refactors things into using an 'unsigned int
flags' with an internal enum for bit values (QEMU_START_COLD,
QEMU_START_PAUSED, QEMU_START_AUTODESTROY, ...).

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120307/1f370fff/attachment-0001.sig>


More information about the libvir-list mailing list