diff mbox series

[V3,3/3] migration/migration.c: Remove MIGRATION_STATUS_ACTIVE in migration_iteration_finish

Message ID 20200607194611.24763-4-chen.zhang@intel.com
State New
Headers show
Series migration/colo: Optimize COLO framework code | expand

Commit Message

Zhang, Chen June 7, 2020, 7:46 p.m. UTC
From: Zhang Chen <chen.zhang@intel.com>

MIGRATION_STATUS_ACTIVE is invalid here, handle it by default case.

Suggested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
---
 migration/migration.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Lukas Straub June 8, 2020, 7:25 a.m. UTC | #1
On Mon,  8 Jun 2020 03:46:11 +0800
Zhang Chen <chen.zhang@intel.com > wrote:

> From: Zhang Chen <chen.zhang@intel.com>
> 
> MIGRATION_STATUS_ACTIVE is invalid here, handle it by default case.
> 
> Suggested-by: Lukas Straub <lukasstraub2@web.de>
> Signed-off-by: Zhang Chen <chen.zhang@intel.com>
> ---

Looks good and works well in my tests.
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>

Regards,
Lukas Straub
diff mbox series

Patch

diff --git a/migration/migration.c b/migration/migration.c
index 9059238e3d..9958b15202 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3319,11 +3319,6 @@  static void migration_iteration_finish(MigrationState *s)
          */
         s->vm_was_running = true;
         /* Fallthrough */
-    case MIGRATION_STATUS_ACTIVE:
-        /*
-         * We should really assert here, but since it's during
-         * migration, let's try to reduce the usage of assertions.
-         */
     case MIGRATION_STATUS_FAILED:
     case MIGRATION_STATUS_CANCELLED:
     case MIGRATION_STATUS_CANCELLING: