[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen master] migration: fix missing assignment for has_x_checkpoint_delay



commit fe39a4d44004408b8c847151191f1948a4aa6570
Author:     zhanghailiang <zhang.zhanghailiang@xxxxxxxxxx>
AuthorDate: Wed Nov 2 15:42:09 2016 +0800
Commit:     Juan Quintela <quintela@xxxxxxxxxx>
CommitDate: Mon Nov 14 14:50:56 2016 +0100

    migration: fix missing assignment for has_x_checkpoint_delay
    
    We forgot to assign true to params->has_x_checkpoint_delay parameter
    in qmp_query_migrate_parameters.
    
    Without this, qmp command 'query-migrate-parameters' doesn't show the
    default value for x-checkpoint-delay option.
    
    This also fixes the fact that HMP was relying on unspecified behavior by
    reading x_checkpoint_delay without checking has_x_checkpoint_delay.
    
    Signed-off-by: zhanghailiang <zhang.zhanghailiang@xxxxxxxxxx>
    Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>
    Reviewed-by: Juan Quintela <quintela@xxxxxxxxxx>
    Signed-off-by: Juan Quintela <quintela@xxxxxxxxxx>
---
 hmp.c                 | 1 +
 migration/migration.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hmp.c b/hmp.c
index b5e3f54..02103df 100644
--- a/hmp.c
+++ b/hmp.c
@@ -318,6 +318,7 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict 
*qdict)
         monitor_printf(mon, " %s: %" PRId64 " milliseconds",
             MigrationParameter_lookup[MIGRATION_PARAMETER_DOWNTIME_LIMIT],
             params->downtime_limit);
+        assert(params->has_x_checkpoint_delay);
         monitor_printf(mon, " %s: %" PRId64,
             MigrationParameter_lookup[MIGRATION_PARAMETER_X_CHECKPOINT_DELAY],
             params->x_checkpoint_delay);
diff --git a/migration/migration.c b/migration/migration.c
index e331f28..f498ab8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -593,6 +593,7 @@ MigrationParameters *qmp_query_migrate_parameters(Error 
**errp)
     params->max_bandwidth = s->parameters.max_bandwidth;
     params->has_downtime_limit = true;
     params->downtime_limit = s->parameters.downtime_limit;
+    params->has_x_checkpoint_delay = true;
     params->x_checkpoint_delay = s->parameters.x_checkpoint_delay;
 
     return params;
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.