On 3/20/19 1:41 AM, Eric Blake wrote:
> Another step towards making the object list reusable for both
> snapshots and checkpoints: the list code only ever needs items that
> are in the common virDomainMomentDef base type. This undoes a lot of
> the churn in accessing common members added the earlier patch.
> 
> Signed-off-by: Eric Blake <ebl...@redhat.com>
> ---
>  src/conf/virdomainsnapshotobj.h     |   4 +-
>  src/conf/virdomainsnapshotobj.c     |   2 +-
>  src/conf/virdomainsnapshotobjlist.c |  19 +++--
>  src/qemu/qemu_command.c             |   2 +-
>  src/qemu/qemu_domain.c              |  16 ++---
>  src/qemu/qemu_driver.c              | 107 +++++++++++++++-------------
>  src/test/test_driver.c              |  52 +++++++-------
>  7 files changed, 105 insertions(+), 97 deletions(-)
> 

Thanks for the Texas two-step on this one ;-)

Reviewed-by: John Ferlan <jfer...@redhat.com>

John

just a quick note below....

[...]

> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index ece9c9329e..9ad7be5718 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c

[...]

> @@ -14635,6 +14636,7 @@ 
> qemuDomainSnapshotCreateActiveInternal(virQEMUDriverPtr driver,
>      qemuDomainObjPrivatePtr priv = vm->privateData;
>      virObjectEventPtr event = NULL;
>      bool resume = false;
> +    virDomainSnapshotDefPtr snapdef = virDomainSnapshotObjGetDef(snap);
>      int ret = -1;
> 
>      if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
> @@ -14663,13 +14665,13 @@ 
> qemuDomainSnapshotCreateActiveInternal(virQEMUDriverPtr driver,
>          goto cleanup;
>      }
> 
> -    ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->common.name);
> +    ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->name);

I will say this is confusing... at least the compiler will complain
bitterly about using @snapdef here.

>      if (qemuDomainObjExitMonitor(driver, vm) < 0)
>          ret = -1;
>      if (ret < 0)
>          goto cleanup;
> 
> -    if (!(snap->def->cookie = (virObjectPtr) qemuDomainSaveCookieNew(vm)))
> +    if (!(snapdef->cookie = (virObjectPtr) qemuDomainSaveCookieNew(vm)))
>          goto cleanup;
> 
>      if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_HALT) {

[...]

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

Reply via email to