mirror of https://gitee.com/openkylin/libvirt.git
conf: snapshot: Don't clear current snapshot when redefining an existing one
There's no point in clearing the current snapshot when we are just changing the definition of the current snapshot as by the virtue of the 'update_current' flag the same snapshot would become current in qemuDomainSnapshotCreateXML. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
639d6e7045
commit
551dde9256
|
@ -983,7 +983,7 @@ virDomainSnapshotRedefinePrep(virDomainObjPtr vm,
|
|||
virDomainSnapshotDefPtr *defptr,
|
||||
virDomainMomentObjPtr *snap,
|
||||
virDomainXMLOptionPtr xmlopt,
|
||||
bool *update_current,
|
||||
bool *update_current G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virDomainSnapshotDefPtr def = *defptr;
|
||||
|
@ -1006,11 +1006,6 @@ virDomainSnapshotRedefinePrep(virDomainObjPtr vm,
|
|||
return -1;
|
||||
}
|
||||
if (other) {
|
||||
if (other == virDomainSnapshotGetCurrent(vm->snapshots)) {
|
||||
*update_current = true;
|
||||
virDomainSnapshotSetCurrent(vm->snapshots, NULL);
|
||||
}
|
||||
|
||||
/* Drop and rebuild the parent relationship, but keep all
|
||||
* child relations by reusing snap. */
|
||||
virDomainMomentDropParent(other);
|
||||
|
|
Loading…
Reference in New Issue