• E
    snapshot: prepare to remove transient snapshot metadata · bcf974b9
    Eric Blake 提交于
    This patch is mostly code motion - moving some functions out
    of qemu_driver and into qemu_domain so they can be reused by
    multiple qemu_* files (since qemu_driver.h must not grow).
    It also adds a new helper function, qemuDomainRemoveInactive,
    which will be used in the next patch.
    
    * src/qemu/qemu_domain.h (qemuFindQemuImgBinary)
    (qemuDomainSnapshotWriteMetadata, qemuDomainSnapshotForEachQcow2)
    (qemuDomainSnapshotDiscard, qemuDomainSnapshotDiscardAll)
    (qemuDomainRemoveInactive): New prototypes.
    (struct qemu_snap_remove): New struct.
    * src/qemu/qemu_domain.c (qemuDomainRemoveInactive)
    (qemuDomainSnapshotDiscardAllMetadata): New functions.
    (qemuFindQemuImgBinary, qemuDomainSnapshotWriteMetadata)
    (qemuDomainSnapshotForEachQcow2, qemuDomainSnapshotDiscard)
    (qemuDomainSnapshotDiscardAll): Move here...
    * src/qemu/qemu_driver.c (qemuFindQemuImgBinary)
    (qemuDomainSnapshotWriteMetadata, qemuDomainSnapshotForEachQcow2)
    (qemuDomainSnapshotDiscard, qemuDomainSnapshotDiscardAll): ...from
    here.
    (qemuDomainUndefineFlags): Update caller.
    * src/conf/domain_conf.c (virDomainRemoveInactive): Doc fixes.
    bcf974b9
qemu_driver.c 328.3 KB