]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't try to find compression program for "raw" memory images
authorPeter Krempa <pkrempa@redhat.com>
Thu, 8 Dec 2016 10:25:09 +0000 (11:25 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 8 Dec 2016 16:12:54 +0000 (17:12 +0100)
There's nothing to compress if the requested snapshot memory format is
set to 'raw' explicitly. After commit 9e14689ea libvirt would try to
run /sbin/raw to process the memory stream if the qemu.conf option
snapshot_image_format is set.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1402726

src/qemu/qemu_driver.c

index a8ae3fe0d009bcfb2a2db1828df9ab3f0a037527..2997f1f95d7edb4b7b73b7562fbde13decd9403b 100644 (file)
@@ -3291,6 +3291,9 @@ qemuGetCompressionProgram(const char *imageFormat,
     if ((ret = qemuSaveCompressionTypeFromString(imageFormat)) < 0)
         goto error;
 
+    if (ret == QEMU_SAVE_FORMAT_RAW)
+        return QEMU_SAVE_FORMAT_RAW;
+
     if (!(*compresspath = virFindFileInPath(imageFormat)))
         goto error;