Patchwork [v13,09/13] Add migration_end function

login
register
mail settings
Submitter Orit Wasserman
Date June 27, 2012, 10:34 a.m.
Message ID <1340793261-11400-10-git-send-email-owasserm@redhat.com>
Download mbox | patch
Permalink /patch/167614/
State New
Headers show

Comments

Orit Wasserman - June 27, 2012, 10:34 a.m.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
---
 arch_init.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Juan Quintela - June 29, 2012, 10:41 a.m.
Orit Wasserman <owasserm@redhat.com> wrote:
> Signed-off-by: Orit Wasserman <owasserm@redhat.com>

Posted for pulling for Anthony.

Later, Juan.
Eric Blake - June 29, 2012, 12:32 p.m.
On 06/29/2012 04:41 AM, Juan Quintela wrote:
> Orit Wasserman <owasserm@redhat.com> wrote:
>> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
> 
> Posted for pulling for Anthony.

Did this include the hunk that I pointed out about 11/13 being in the
wrong patch?

> 
>> @@ -389,7 +509,7 @@ int ram_save_live(QEMUFile *f, int stage, void *opaque)
>>          while ((bytes_sent = ram_save_block(f, stage)) != -1) {
>>              bytes_transferred += bytes_sent;
>>          }
>> -        memory_global_dirty_log_stop();
>> +        migration_end();
>>      }
>>  
>>      qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
> 
> This hunk should have been squashed into 9/13.
>
Juan Quintela - June 29, 2012, 4:03 p.m.
Eric Blake <eblake@redhat.com> wrote:
> On 06/29/2012 04:41 AM, Juan Quintela wrote:
>> Orit Wasserman <owasserm@redhat.com> wrote:
>>> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
>> 
>> Posted for pulling for Anthony.
>
> Did this include the hunk that I pointed out about 11/13 being in the
> wrong patch?

Nopis.  Adding it.


>>> @@ -389,7 +509,7 @@ int ram_save_live(QEMUFile *f, int stage, void *opaque)
>>>          while ((bytes_sent = ram_save_block(f, stage)) != -1) {
>>>              bytes_transferred += bytes_sent;
>>>          }
>>> -        memory_global_dirty_log_stop();
>>> +        migration_end();
>>>      }
>>>  
>>>      qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
>> 
>> This hunk should have been squashed into 9/13.
>>

Patch

diff --git a/arch_init.c b/arch_init.c
index ef7b4d6..6703c72 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;
     }