qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/23] migration: Export a function that tells i


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 19/23] migration: Export a function that tells if the migration has finished correctly
Date: Wed, 05 Oct 2011 09:58:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 10/05/2011 07:24 AM, Juan Quintela wrote:
Anthony Liguori<address@hidden>  wrote:
On 09/23/2011 07:57 AM, Juan Quintela wrote:
This will allows us to hide the status values.

--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -447,9 +447,7 @@ void do_info_spice(Monitor *mon, QObject **ret_data)

   static void migration_state_notifier(Notifier *notifier, void *data)
   {
-    int state = get_migration_state();
-
-    if (state == MIG_STATE_COMPLETED) {
+    if (migration_has_finished()) {
   #if SPICE_SERVER_VERSION>= 0x000701 /* 0.7.1 */
           spice_server_migrate_switch(spice_server);
   #endif

I think the bug here is migration_state_notifier.  It should take an
additional argument of MigrationState.  Otherwise, how does this code
work with FT?

Thinking about it, we need to pass MigrationState and export the
function that see if migration has finished (otherwise we also need to
export all STATE definitions, or worse, the whole MigrationState
definition.

Moving to have a function

bool migration_has_finished(MIgrationState *s);

That does the obvious thing.

What do you think?

Yeah, that was what I was advocating.

Regards,

Anthony Liguori


Later, Juan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]