]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0049-PVE-savevm-async-register-yank-before-migration_inco.patch
savevm-async: set SAVE_STATE_DONE when closing state file was successful
[pve-qemu.git] / debian / patches / pve / 0049-PVE-savevm-async-register-yank-before-migration_inco.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Stefan Reiter <s.reiter@proxmox.com>
3 Date: Wed, 26 May 2021 17:36:55 +0200
4 Subject: [PATCH] PVE: savevm-async: register yank before
5 migration_incoming_state_destroy
6
7 Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
8 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 ---
10 migration/savevm-async.c | 5 +++++
11 1 file changed, 5 insertions(+)
12
13 diff --git a/migration/savevm-async.c b/migration/savevm-async.c
14 index 0bc5799cf8..10ebefef06 100644
15 --- a/migration/savevm-async.c
16 +++ b/migration/savevm-async.c
17 @@ -19,6 +19,7 @@
18 #include "qemu/timer.h"
19 #include "qemu/main-loop.h"
20 #include "qemu/rcu.h"
21 +#include "qemu/yank.h"
22
23 /* #define DEBUG_SAVEVM_STATE */
24
25 @@ -586,6 +587,10 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
26 dirty_bitmap_mig_before_vm_start();
27
28 qemu_fclose(f);
29 +
30 + /* state_destroy assumes a real migration which would have added a yank */
31 + yank_register_instance(MIGRATION_YANK_INSTANCE, &error_abort);
32 +
33 migration_incoming_state_destroy();
34 if (ret < 0) {
35 error_setg_errno(errp, -ret, "Error while loading VM state");