]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: reject unimplemented disk snapshot features
authorEric Blake <eblake@redhat.com>
Mon, 22 Aug 2011 20:26:52 +0000 (14:26 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 5 Sep 2011 13:03:04 +0000 (07:03 -0600)
commit7807e05d438d2c6262e3197d7affc3ccb88bd879
tree3c926da2cd2b64ad45fea11bc7f3509a54ae4ff3
parent35d52b56bba90f95b6dd31a1f30e3875ec2adc91
snapshot: reject unimplemented disk snapshot features

My RFC for snapshot support [1] proposes several rules for when it is
safe to delete or revert to an external snapshot, predicated on
the existence of new API flags.  These will be incrementally added
in future patches, but until then, blindly mishandling a disk
snapshot risks corrupting internal state, so it is better to
outright reject the attempts until the other pieces are in place,
thus incrementally relaxing the restrictions added in this patch.

[1] https://www.redhat.com/archives/libvir-list/2011-August/msg00361.html

* src/qemu/qemu_driver.c (qemuDomainSnapshotCountExternal): New
function.
(qemuDomainUndefineFlags, qemuDomainSnapshotDelete): Use it to add
safety valve.
(qemuDomainRevertToSnapshot, qemuDomainSnapshotCreateXML): Add safety
valve.
src/qemu/qemu_driver.c