]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: merge pre-snapshot checks
authorEric Blake <eblake@redhat.com>
Tue, 23 Oct 2012 15:12:26 +0000 (17:12 +0200)
committerEric Blake <eblake@redhat.com>
Fri, 2 Nov 2012 16:19:03 +0000 (10:19 -0600)
commitde76cae97110ac57ea636af54d5fd57c7cf52d72
treec0cc822c81451dc632848c6a0d29f1cecaab8d83
parente260e401a54b977ed622c34326c182553f5ddb1a
snapshot: merge pre-snapshot checks

Both system checkpoint snapshots and disk snapshots were iterating
over all disks, doing a final sanity check before doing any work.
But since future patches will allow offline snapshots to be either
external or internal, it makes sense to share the pass over all
disks, and then relax restrictions in that pass as new modes are
implemented.  Future patches can then handle external disks when
the domain is offline, then handle offline --disk-snapshot, and
finally, combine with migration to file to gain a complete external
system checkpoint snapshot of an active domain without using 'savevm'.

* src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare)
(qemuDomainSnapshotIsAllowed): Merge...
(qemuDomainSnapshotPrepare): ...into one function.
(qemuDomainSnapshotCreateXML): Update caller.
src/qemu/qemu_driver.c