]> git.proxmox.com Git - pve-qemu-kvm.git/blobdiff - debian/patches/internal-snapshot-async.patch
vmstate snapshot : implement cancelled state V2
[pve-qemu-kvm.git] / debian / patches / internal-snapshot-async.patch
index 4a6871d553832b01a36444e74bb329cf495360ca..2cc95573535172b402536afbd2df03ebf6c16ac9 100644 (file)
@@ -369,8 +369,8 @@ Index: new/qmp-commands.hx
 Index: new/savevm-async.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ new/savevm-async.c 2014-08-07 13:29:41.000000000 +0200
-@@ -0,0 +1,488 @@
++++ new/savevm-async.c 2014-11-20 09:17:48.000000000 +0100
+@@ -0,0 +1,501 @@
 +#include "qemu-common.h"
 +#include "qapi/qmp/qerror.h"
 +#include "sysemu/sysemu.h"
@@ -399,6 +399,7 @@ Index: new/savevm-async.c
 +    SAVE_STATE_ERROR,
 +    SAVE_STATE_ACTIVE,
 +    SAVE_STATE_COMPLETED,
++    SAVE_STATE_CANCELLED
 +};
 +
 +
@@ -588,6 +589,13 @@ Index: new/savevm-async.c
 +            }
 +        }
 +    }
++
++    if(snap_state.state == SAVE_STATE_CANCELLED) {
++        save_snapshot_completed();
++        Error *errp = NULL;
++        qmp_savevm_end(&errp);
++    }
++
 +}
 +
 +static const QEMUFileOps block_file_ops = {
@@ -677,6 +685,11 @@ Index: new/savevm-async.c
 +        return;
 +    }
 +
++    if (snap_state.state == SAVE_STATE_ACTIVE) {
++        snap_state.state = SAVE_STATE_CANCELLED;
++        return;
++    }
++
 +    if (snap_state.saved_vm_running) {
 +        vm_start();
 +    }