qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 22/22] migration: Make state definitions loc


From: Yoshiaki Tamura
Subject: Re: [Qemu-devel] Re: [PATCH 22/22] migration: Make state definitions local
Date: Thu, 24 Feb 2011 13:19:48 +0900

2011/2/23 Juan Quintela <address@hidden>:
> Yoshiaki Tamura <address@hidden> wrote:
>> 2011/2/23 Juan Quintela <address@hidden>:
>>>
>>> Signed-off-by: Juan Quintela <address@hidden>
>>> ---
>>>  migration.c |    6 ++++++
>>>  migration.h |    6 ------
>>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/migration.c b/migration.c
>>> index 383ebaf..90fc2a0 100644
>>> --- a/migration.c
>>> +++ b/migration.c
>>> @@ -31,6 +31,12 @@
>>>     do { } while (0)
>>>  #endif
>>>
>>> +#define MIG_STATE_ERROR                -1
>>> +#define MIG_STATE_NONE         0
>>> +#define MIG_STATE_CANCELLED    1
>>> +#define MIG_STATE_ACTIVE       2
>>> +#define MIG_STATE_COMPLETED    3
>>> +
>>>  static MigrationState current_migration = {
>>>     .state = MIG_STATE_NONE,
>>>      /* Migration speed throttling */
>>> diff --git a/migration.h b/migration.h
>>> index 9457807..493fbe5 100644
>>> --- a/migration.h
>>> +++ b/migration.h
>>> @@ -18,12 +18,6 @@
>>>  #include "qemu-common.h"
>>>  #include "notify.h"
>>>
>>> -#define MIG_STATE_ERROR                -1
>>> -#define MIG_STATE_NONE         0
>>> -#define MIG_STATE_CANCELLED    1
>>> -#define MIG_STATE_ACTIVE       2
>>> -#define MIG_STATE_COMPLETED    3
>>> -
>>
>> Although you're right, I would prefer to keep it so that somebody
>> outside of migration may understand the status in the future if
>> there are no harms.
>
> my plan is to move MigrationState inside migration.c, and then decide
> what to export/not export.

Well, it may be just a policy, but it's already exported, and I
would like to keep it unless it bothers your plan.  IIUC, I don't
think it does.

> Next thing to do is move migration to its
> own thread.  Before doing that, I need to know what parts are used/not
> used outside migration.c.  Removing it now means that nothing gets to
> use it without needing a patch.

I've once asked Anthony whether it's possible to make migration
to different threads, but his answer was no due to hard
dependency of qemu's internal code, and making migration to
different threads are bad design.

Thanks,

Yoshi

>
> Later, Juan..
>
>



reply via email to

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