diff mbox

[v2,08/11] migration: remove check against colo support

Message ID 1500279971-13875-9-git-send-email-peterx@redhat.com
State New
Headers show

Commit Message

Peter Xu July 17, 2017, 8:26 a.m. UTC
Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"),
colo is always supported. We don't need any colo_supported() now since
it is always true. Removing any extra code that depends on it.

CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 include/migration/colo.h |  1 -
 migration/colo.c         |  5 -----
 migration/migration.c    | 11 -----------
 3 files changed, 17 deletions(-)

Comments

Juan Quintela July 17, 2017, 5:07 p.m. UTC | #1
Peter Xu <peterx@redhat.com> wrote:
> Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"),
> colo is always supported. We don't need any colo_supported() now since
> it is always true. Removing any extra code that depends on it.
>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>
Zhang Chen July 18, 2017, 7:13 a.m. UTC | #2
On 07/17/2017 04:26 PM, Peter Xu wrote:
> Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"),
> colo is always supported. We don't need any colo_supported() now since
> it is always true. Removing any extra code that depends on it.
>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>

COLO running well.

Reviewed-by: Zhang Chen<zhangchen.fnst@cn.fujitsu.com>


Thanks
Zhang Chen

> ---
>   include/migration/colo.h |  1 -
>   migration/colo.c         |  5 -----
>   migration/migration.c    | 11 -----------
>   3 files changed, 17 deletions(-)
>
> diff --git a/include/migration/colo.h b/include/migration/colo.h
> index be6beba..ff9874e 100644
> --- a/include/migration/colo.h
> +++ b/include/migration/colo.h
> @@ -15,7 +15,6 @@
>   
>   #include "qemu-common.h"
>   
> -bool colo_supported(void);
>   void colo_info_init(void);
>   
>   void migrate_start_colo_process(MigrationState *s);
> diff --git a/migration/colo.c b/migration/colo.c
> index ef35f00..a425543 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -29,11 +29,6 @@ static bool vmstate_loading;
>   
>   #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
>   
> -bool colo_supported(void)
> -{
> -    return true;
> -}
> -
>   bool migration_in_colo_state(void)
>   {
>       MigrationState *s = migrate_get_current();
> diff --git a/migration/migration.c b/migration/migration.c
> index 5a7f22c..eb750c5 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -403,9 +403,6 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
>               continue;
>           }
>   #endif
> -        if (i == MIGRATION_CAPABILITY_X_COLO && !colo_supported()) {
> -            continue;
> -        }
>           if (head == NULL) {
>               head = g_malloc0(sizeof(*caps));
>               caps = head;
> @@ -604,14 +601,6 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
>               continue;
>           }
>   #endif
> -        if (cap->value->capability == MIGRATION_CAPABILITY_X_COLO) {
> -            if (!colo_supported()) {
> -                error_setg(errp, "COLO is not currently supported, please"
> -                             " configure with --enable-colo option in order to"
> -                             " support COLO feature");
> -                continue;
> -            }
> -        }
>           s->enabled_capabilities[cap->value->capability] = cap->value->state;
>       }
>
diff mbox

Patch

diff --git a/include/migration/colo.h b/include/migration/colo.h
index be6beba..ff9874e 100644
--- a/include/migration/colo.h
+++ b/include/migration/colo.h
@@ -15,7 +15,6 @@ 
 
 #include "qemu-common.h"
 
-bool colo_supported(void);
 void colo_info_init(void);
 
 void migrate_start_colo_process(MigrationState *s);
diff --git a/migration/colo.c b/migration/colo.c
index ef35f00..a425543 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -29,11 +29,6 @@  static bool vmstate_loading;
 
 #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
 
-bool colo_supported(void)
-{
-    return true;
-}
-
 bool migration_in_colo_state(void)
 {
     MigrationState *s = migrate_get_current();
diff --git a/migration/migration.c b/migration/migration.c
index 5a7f22c..eb750c5 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -403,9 +403,6 @@  MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
             continue;
         }
 #endif
-        if (i == MIGRATION_CAPABILITY_X_COLO && !colo_supported()) {
-            continue;
-        }
         if (head == NULL) {
             head = g_malloc0(sizeof(*caps));
             caps = head;
@@ -604,14 +601,6 @@  void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
             continue;
         }
 #endif
-        if (cap->value->capability == MIGRATION_CAPABILITY_X_COLO) {
-            if (!colo_supported()) {
-                error_setg(errp, "COLO is not currently supported, please"
-                             " configure with --enable-colo option in order to"
-                             " support COLO feature");
-                continue;
-            }
-        }
         s->enabled_capabilities[cap->value->capability] = cap->value->state;
     }