[1/2] migration: fix the Unknown ending state error log
diff mbox series

Message ID 1532434585-14732-1-git-send-email-lidongchen@tencent.com
State New
Headers show
Series
  • [1/2] migration: fix the Unknown ending state error log
Related show

Commit Message

858585 jemmy July 24, 2018, 12:16 p.m. UTC
When cancelling migration, the state is MIGRATION_STATUS_CANCELLING.
The state change to MIGRATION_STATUS_CANCELLED when cleanup_bh is scheduled.
So when migration_iteration_finish is invoked, the state should be
MIGRATION_STATUS_CANCELLING.

Signed-off-by: Lidong Chen <lidongchen@tencent.com>
---
 migration/migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Xu July 24, 2018, 1:02 p.m. UTC | #1
On Tue, Jul 24, 2018 at 08:16:24PM +0800, Lidong Chen wrote:
> When cancelling migration, the state is MIGRATION_STATUS_CANCELLING.
> The state change to MIGRATION_STATUS_CANCELLED when cleanup_bh is scheduled.
> So when migration_iteration_finish is invoked, the state should be
> MIGRATION_STATUS_CANCELLING.
> 
> Signed-off-by: Lidong Chen <lidongchen@tencent.com>

Thanks, Lidong.  Dave just posted the same patch some days ago:

  [PATCH] migrate: Fix cancelling state warning

> ---
>  migration/migration.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index 8d56d56..ff05422 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2876,7 +2876,7 @@ static void migration_iteration_finish(MigrationState *s)
>          s->vm_was_running = true;
>          /* Fallthrough */
>      case MIGRATION_STATUS_FAILED:
> -    case MIGRATION_STATUS_CANCELLED:
> +    case MIGRATION_STATUS_CANCELLING:
>          if (s->vm_was_running) {
>              vm_start();
>          } else {
> -- 
> 1.8.3.1
> 
> 

Regards,

Patch
diff mbox series

diff --git a/migration/migration.c b/migration/migration.c
index 8d56d56..ff05422 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2876,7 +2876,7 @@  static void migration_iteration_finish(MigrationState *s)
         s->vm_was_running = true;
         /* Fallthrough */
     case MIGRATION_STATUS_FAILED:
-    case MIGRATION_STATUS_CANCELLED:
+    case MIGRATION_STATUS_CANCELLING:
         if (s->vm_was_running) {
             vm_start();
         } else {