qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log
@ 2018-07-24 12:16 Lidong Chen
  2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
  2018-07-24 13:02 ` [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Peter Xu
  0 siblings, 2 replies; 6+ messages in thread
From: Lidong Chen @ 2018-07-24 12:16 UTC (permalink / raw)
  To: quintela, dgilbert; +Cc: qemu-devel, Lidong Chen

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(-)

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh
  2018-07-24 12:16 [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Lidong Chen
@ 2018-07-24 12:16 ` Lidong Chen
  2018-07-24 13:07   ` Peter Xu
                     ` (2 more replies)
  2018-07-24 13:02 ` [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Peter Xu
  1 sibling, 3 replies; 6+ messages in thread
From: Lidong Chen @ 2018-07-24 12:16 UTC (permalink / raw)
  To: quintela, dgilbert; +Cc: qemu-devel, Lidong Chen

migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh.

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

diff --git a/migration/migration.c b/migration/migration.c
index ff05422..b8c4fec 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3032,8 +3032,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
     } else {
         /* This is a fresh new migration */
         rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
-        s->expected_downtime = s->parameters.downtime_limit;
-        s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
 
         /* Notify before starting migration thread */
         notifier_list_notify(&migration_state_notifiers, s);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log
  2018-07-24 12:16 [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Lidong Chen
  2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
@ 2018-07-24 13:02 ` Peter Xu
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Xu @ 2018-07-24 13:02 UTC (permalink / raw)
  To: Lidong Chen; +Cc: quintela, dgilbert, qemu-devel, Lidong Chen

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,

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh
  2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
@ 2018-07-24 13:07   ` Peter Xu
  2018-07-24 13:33   ` Juan Quintela
  2018-07-24 16:28   ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Xu @ 2018-07-24 13:07 UTC (permalink / raw)
  To: Lidong Chen; +Cc: quintela, dgilbert, qemu-devel, Lidong Chen

On Tue, Jul 24, 2018 at 08:16:25PM +0800, Lidong Chen wrote:
> migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh.
> 
> Signed-off-by: Lidong Chen <lidongchen@tencent.com>

This seems correct to me.

Reviewed-by: Peter Xu <peterx@redhat.com>

> ---
>  migration/migration.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index ff05422..b8c4fec 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3032,8 +3032,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
>      } else {
>          /* This is a fresh new migration */
>          rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
> -        s->expected_downtime = s->parameters.downtime_limit;
> -        s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
>  
>          /* Notify before starting migration thread */
>          notifier_list_notify(&migration_state_notifiers, s);
> -- 
> 1.8.3.1
> 
> 

Regards,

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh
  2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
  2018-07-24 13:07   ` Peter Xu
@ 2018-07-24 13:33   ` Juan Quintela
  2018-07-24 16:28   ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 6+ messages in thread
From: Juan Quintela @ 2018-07-24 13:33 UTC (permalink / raw)
  To: Lidong Chen; +Cc: dgilbert, qemu-devel, Lidong Chen

Lidong Chen <jemmy858585@gmail.com> wrote:
> migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh.
>
> Signed-off-by: Lidong Chen <lidongchen@tencent.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Good catch.

Inserted here.

commit d3e35b8f6248eab2c3d412198a487ae49706b214
Author: Peter Xu <peterx@redhat.com>
Date:   Wed May 2 18:47:24 2018 +0800



> ---
>  migration/migration.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index ff05422..b8c4fec 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3032,8 +3032,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
>      } else {
>          /* This is a fresh new migration */
>          rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
> -        s->expected_downtime = s->parameters.downtime_limit;
> -        s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
>  
>          /* Notify before starting migration thread */
>          notifier_list_notify(&migration_state_notifiers, s);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh
  2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
  2018-07-24 13:07   ` Peter Xu
  2018-07-24 13:33   ` Juan Quintela
@ 2018-07-24 16:28   ` Dr. David Alan Gilbert
  2 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2018-07-24 16:28 UTC (permalink / raw)
  To: Lidong Chen; +Cc: quintela, qemu-devel, Lidong Chen

* Lidong Chen (jemmy858585@gmail.com) wrote:
> migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh.

Queued (just 2/2)

> Signed-off-by: Lidong Chen <lidongchen@tencent.com>
> ---
>  migration/migration.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index ff05422..b8c4fec 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3032,8 +3032,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
>      } else {
>          /* This is a fresh new migration */
>          rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
> -        s->expected_downtime = s->parameters.downtime_limit;
> -        s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
>  
>          /* Notify before starting migration thread */
>          notifier_list_notify(&migration_state_notifiers, s);
> -- 
> 1.8.3.1
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-24 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24 12:16 [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Lidong Chen
2018-07-24 12:16 ` [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh Lidong Chen
2018-07-24 13:07   ` Peter Xu
2018-07-24 13:33   ` Juan Quintela
2018-07-24 16:28   ` Dr. David Alan Gilbert
2018-07-24 13:02 ` [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).