• E
    snapshot: track current snapshot across restarts · 6766ff10
    Eric Blake 提交于
    Audit all changes to the qemu vm->current_snapshot, and make them
    update the saved xml file for both the previous and the new
    snapshot, so that there is always at most one snapshot with
    <active>1</active> in the xml, and that snapshot is used as the
    current snapshot even across libvirtd restarts.
    
    This patch does not fix the case of virDomainSnapshotDelete(,CHILDREN)
    where one of the children is the current snapshot; that will be later.
    
    * src/conf/domain_conf.h (_virDomainSnapshotDef): Alter member
    type and name.
    * src/conf/domain_conf.c (virDomainSnapshotDefParseString)
    (virDomainSnapshotDefFormat): Update clients.
    * docs/schemas/domainsnapshot.rng: Tighten rng.
    * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Reload current
    snapshot.
    (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot)
    (qemuDomainSnapshotDiscard): Track current snapshot.
    6766ff10
domain_conf.c 368.0 KB