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: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 19/23] migration: Export a function that tells if the migration has finished correctly
Date: Wed, 05 Oct 2011 14:24:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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?

Later, Juan.



reply via email to

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