提交 9428c460 编写于 作者: P Peter Krempa

virDomainCheckpointRedefinePrep: Set 'current' checkpoint if there isn't any

When redefining checkpoints from scratch we'd not set the 'current'
checkpoint if there wasn't any. This meant that the code wasn't ever
able to set a 'current' checkpoint as any other one looks up if the
parent of the redefined checkpoint is current.

Since the backup code then requires the current checkpoint to start the
lookup we'd not be able to perform a backup after restoring the
checkpoint hierarchy.
Reported-by: NEyal Shenitzky <eshenitz@redhat.com>
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 135a0b3f
......@@ -550,6 +550,10 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
*update_current = true;
}
/* set the first redefined checkpoint as current */
if (virDomainCheckpointGetCurrent(vm->checkpoints) == NULL)
*update_current = true;
other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);
if (other) {
otherdef = virDomainCheckpointObjGetDef(other);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册