diff mbox

[05/13] Add migration_end function

Message ID 06dc7c681d59f42e2aff1d134a467701a85a4d88.1340987905.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela June 29, 2012, 4:43 p.m. UTC
From: Orit Wasserman <owasserm@redhat.com>

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 arch_init.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/arch_init.c b/arch_init.c
index 78b3c0c..f5fd1f5 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -304,6 +304,11 @@  static void sort_ram_list(void)
     g_free(blocks);
 }

+static void migration_end(void)
+{
+    memory_global_dirty_log_stop();
+}
+
 int ram_save_live(QEMUFile *f, int stage, void *opaque)
 {
     ram_addr_t addr;
@@ -313,7 +318,7 @@  int ram_save_live(QEMUFile *f, int stage, void *opaque)
     int ret;

     if (stage < 0) {
-        memory_global_dirty_log_stop();
+        migration_end();
         return 0;
     }

@@ -381,7 +386,7 @@  int ram_save_live(QEMUFile *f, int stage, void *opaque)
         while ((bytes_sent = ram_save_block(f)) != 0) {
             bytes_transferred += bytes_sent;
         }
-        memory_global_dirty_log_stop();
+        migration_end();
     }

     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);