[libvirt] [PATCH 4/7] qemu: snapshot: Reject revertion from clearly bad states
Eric Blake
eblake at redhat.com
Fri Jul 18 22:33:58 UTC 2014
On 07/18/2014 10:11 AM, Peter Krempa wrote:
> Report errors on some states snapshots done by qemu should never reach
> ---
> src/qemu/qemu_driver.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> +
> + case VIR_DOMAIN_NOSTATE:
> + case VIR_DOMAIN_BLOCKED:
> + case VIR_DOMAIN_LAST:
> + virReportError(VIR_ERR_INTERNAL_ERROR,
> + _("Invalid target domain state '%s'. Refusing "
> + "snapshot revertion "),
s/revertion /reversion/
(typo and trailing space)
> + virDomainStateTypeToString(snap->def->state));
> + goto cleanup;
> }
ACK with that fixed. It might also be nice to patch
qemuDomainSnapshotCreateXML with the _REDEFINE flag to likewise reject
modifying an existing snapshot into one of these states.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140718/01437885/attachment-0001.sig>
More information about the libvir-list
mailing list