diff mbox

migration: send total time in QMP at "completed" stage

Message ID 1374200625-7125-1-git-send-email-p.pawit@gmail.com
State New
Headers show

Commit Message

Pawit Pornkitprasan July 19, 2013, 2:23 a.m. UTC
The "completed" stage sets total_time but not has_total_time and
thus it is not sent via QMP reply (but sent via HMP nevertheless)

Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
---
 migration.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake July 19, 2013, 10:56 a.m. UTC | #1
On 07/18/2013 08:23 PM, Pawit Pornkitprasan wrote:
> The "completed" stage sets total_time but not has_total_time and
> thus it is not sent via QMP reply (but sent via HMP nevertheless)
> 
> Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
> ---
>  migration.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/migration.c b/migration.c
> index 9f5a423..4c16f2e 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -219,6 +219,7 @@ MigrationInfo *qmp_query_migrate(Error **errp)
>  
>          info->has_status = true;
>          info->status = g_strdup("completed");
> +        info->has_total_time = true;
>          info->total_time = s->total_time;
>          info->has_downtime = true;
>          info->downtime = s->downtime;
>
Orit Wasserman July 22, 2013, 7:29 a.m. UTC | #2
On 07/19/2013 05:23 AM, Pawit Pornkitprasan wrote:
> The "completed" stage sets total_time but not has_total_time and
> thus it is not sent via QMP reply (but sent via HMP nevertheless)
> 
> Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
> ---
>  migration.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/migration.c b/migration.c
> index 9f5a423..4c16f2e 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -219,6 +219,7 @@ MigrationInfo *qmp_query_migrate(Error **errp)
>  
>          info->has_status = true;
>          info->status = g_strdup("completed");
> +        info->has_total_time = true;
>          info->total_time = s->total_time;
>          info->has_downtime = true;
>          info->downtime = s->downtime;
> 

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Luiz Capitulino July 29, 2013, 7:02 p.m. UTC | #3
On Fri, 19 Jul 2013 11:23:45 +0900
Pawit Pornkitprasan <p.pawit@gmail.com> wrote:

> The "completed" stage sets total_time but not has_total_time and
> thus it is not sent via QMP reply (but sent via HMP nevertheless)
> 
> Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>

Applied to the qmp branch, thanks.

> ---
>  migration.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/migration.c b/migration.c
> index 9f5a423..4c16f2e 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -219,6 +219,7 @@ MigrationInfo *qmp_query_migrate(Error **errp)
>  
>          info->has_status = true;
>          info->status = g_strdup("completed");
> +        info->has_total_time = true;
>          info->total_time = s->total_time;
>          info->has_downtime = true;
>          info->downtime = s->downtime;
diff mbox

Patch

diff --git a/migration.c b/migration.c
index 9f5a423..4c16f2e 100644
--- a/migration.c
+++ b/migration.c
@@ -219,6 +219,7 @@  MigrationInfo *qmp_query_migrate(Error **errp)
 
         info->has_status = true;
         info->status = g_strdup("completed");
+        info->has_total_time = true;
         info->total_time = s->total_time;
         info->has_downtime = true;
         info->downtime = s->downtime;