]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: prepare to remove transient snapshot metadata
authorEric Blake <eblake@redhat.com>
Wed, 21 Sep 2011 19:08:51 +0000 (13:08 -0600)
committerDaniel Veillard <veillard@redhat.com>
Thu, 22 Sep 2011 05:52:17 +0000 (13:52 +0800)
commitbcf974b94b413aaf4c2aae6696802e40081f8757
tree9ef5bd15c3d207a618da6177156d856db85e6953
parente6966fa79abe96edb9b5e9ca238b94f7495966c1
snapshot: prepare to remove transient snapshot metadata

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.
src/conf/domain_conf.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c