mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
virDomainCheckpointRedefineCommit: Don't check ABI of definition in checkpoint
Checking the definition ABI when redefining checkpoints doesn't make much sense for the following reasons: * the domain definition in the checkpoint is mostly unused (a relic adopted from the snapshot code) * can be very easily overridden by deleting the checkpoint metadata before redefinition Rather than complicating the logic when we'll be taking into account that the domain definition may be missing, let's just remove the check. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
9a58f1a53c
commit
9fd8ba3b2d
@ -530,8 +530,7 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
|
||||
|
||||
virDomainMomentObjPtr
|
||||
virDomainCheckpointRedefineCommit(virDomainObjPtr vm,
|
||||
virDomainCheckpointDefPtr *defptr,
|
||||
virDomainXMLOptionPtr xmlopt)
|
||||
virDomainCheckpointDefPtr *defptr)
|
||||
{
|
||||
virDomainCheckpointDefPtr def = *defptr;
|
||||
virDomainMomentObjPtr other = NULL;
|
||||
@ -541,10 +540,6 @@ virDomainCheckpointRedefineCommit(virDomainObjPtr vm,
|
||||
other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);
|
||||
if (other) {
|
||||
otherdef = virDomainCheckpointObjGetDef(other);
|
||||
if (!virDomainDefCheckABIStability(otherdef->parent.dom,
|
||||
def->parent.dom, xmlopt))
|
||||
return NULL;
|
||||
|
||||
/* Drop and rebuild the parent relationship, but keep all
|
||||
* child relations by reusing chk. */
|
||||
virDomainMomentDropParent(other);
|
||||
|
@ -96,7 +96,6 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
|
||||
|
||||
virDomainMomentObjPtr
|
||||
virDomainCheckpointRedefineCommit(virDomainObjPtr vm,
|
||||
virDomainCheckpointDefPtr *defptr,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
virDomainCheckpointDefPtr *defptr);
|
||||
|
||||
VIR_ENUM_DECL(virDomainCheckpoint);
|
||||
|
@ -439,8 +439,7 @@ qemuCheckpointRedefineValidateBitmaps(virDomainObjPtr vm,
|
||||
|
||||
|
||||
static virDomainMomentObjPtr
|
||||
qemuCheckpointRedefine(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuCheckpointRedefine(virDomainObjPtr vm,
|
||||
virDomainCheckpointDefPtr *def,
|
||||
bool *update_current,
|
||||
bool validate_bitmaps)
|
||||
@ -452,7 +451,7 @@ qemuCheckpointRedefine(virQEMUDriverPtr driver,
|
||||
qemuCheckpointRedefineValidateBitmaps(vm, *def) < 0)
|
||||
return NULL;
|
||||
|
||||
return virDomainCheckpointRedefineCommit(vm, def, driver->xmlopt);
|
||||
return virDomainCheckpointRedefineCommit(vm, def);
|
||||
}
|
||||
|
||||
|
||||
@ -605,7 +604,7 @@ qemuCheckpointCreateXML(virDomainPtr domain,
|
||||
return NULL;
|
||||
|
||||
if (redefine) {
|
||||
chk = qemuCheckpointRedefine(driver, vm, &def, &update_current, validate_bitmaps);
|
||||
chk = qemuCheckpointRedefine(vm, &def, &update_current, validate_bitmaps);
|
||||
} else {
|
||||
chk = qemuCheckpointCreate(driver, vm, &def);
|
||||
}
|
||||
|
@ -8991,7 +8991,7 @@ testDomainCheckpointCreateXML(virDomainPtr domain,
|
||||
if (virDomainCheckpointRedefinePrep(vm, def, &update_current) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(chk = virDomainCheckpointRedefineCommit(vm, &def, privconn->xmlopt)))
|
||||
if (!(chk = virDomainCheckpointRedefineCommit(vm, &def)))
|
||||
goto cleanup;
|
||||
} else {
|
||||
if (!(def->parent.dom = virDomainDefCopy(vm->def,
|
||||
|
Loading…
Reference in New Issue
Block a user