[pve-devel] [PATCH] savevm async : setup raw format by default fo vmstate file

Alexandre Derumier aderumier at odiso.com
Mon Nov 9 03:58:07 CET 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 debian/patches/internal-snapshot-async.patch | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/patches/internal-snapshot-async.patch b/debian/patches/internal-snapshot-async.patch
index a4823df..c66dfb8 100644
--- a/debian/patches/internal-snapshot-async.patch
+++ b/debian/patches/internal-snapshot-async.patch
@@ -376,7 +376,7 @@ Index: new/savevm-async.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 +++ new/savevm-async.c	2014-11-20 09:17:48.000000000 +0100
-@@ -0,0 +1,518 @@
+@@ -0,0 +1,522 @@
 +#include "qemu-common.h"
 +#include "qapi/qmp/qerror.h"
 +#include "qemu/error-report.h"
@@ -391,6 +391,7 @@ Index: new/savevm-async.c
 +#include "block/block.h"
 +#include "qemu/timer.h"
 +#include "sysemu/block-backend.h"
++#include "qapi/qmp/qstring.h"
 +
 +/* #define DEBUG_SAVEVM_STATE */
 +
@@ -660,7 +661,10 @@ Index: new/savevm-async.c
 +    /* Open the image */
 +    snap_state.bs = bdrv_new();
 + 
-+    ret = bdrv_open(&snap_state.bs, statefile, NULL, NULL, bdrv_oflags, drv, &local_err);
++    QDict *options = NULL;
++    options = qdict_new();
++    qdict_put(options, "driver", qstring_from_str("raw"));
++    ret = bdrv_open(&snap_state.bs, statefile, NULL, options, bdrv_oflags, drv, &local_err);
 +    if (ret < 0) {
 +        error_set(errp, ERROR_CLASS_GENERIC_ERROR, "failed to open '%s'", statefile);
 +        goto restart;
-- 
2.1.4



More information about the pve-devel mailing list