diff options
author | Juan Quintela <quintela@redhat.com> | 2017-04-05 18:32:37 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-05-18 18:04:54 +0200 |
commit | 2833c59b947cf909020c4d6194aac35f383e832b (patch) | |
tree | 955fdc5ab08961829f9813e729866dd03949eb6a /hmp.c | |
parent | f4a06d1391acf919da3f4291f2d6a70344d21c66 (diff) | |
download | qemu-2833c59b947cf909020c4d6194aac35f383e832b.zip qemu-2833c59b947cf909020c4d6194aac35f383e832b.tar.gz qemu-2833c59b947cf909020c4d6194aac35f383e832b.tar.bz2 |
migration: Create block capability
Create one capability for block migration and one parameter for
incremental block migration.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
- address all Markus comments
- use Markus and Eric text descriptions
- change logic another time
- improve text messages
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -327,6 +327,10 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict) monitor_printf(mon, "%s: %" PRId64 "\n", MigrationParameter_lookup[MIGRATION_PARAMETER_X_CHECKPOINT_DELAY], params->x_checkpoint_delay); + assert(params->has_block_incremental); + monitor_printf(mon, "%s: %s\n", + MigrationParameter_lookup[MIGRATION_PARAMETER_BLOCK_INCREMENTAL], + params->block_incremental ? "on" : "off"); } qapi_free_MigrationParameters(params); @@ -1528,6 +1532,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) Visitor *v = string_input_visitor_new(valuestr); uint64_t valuebw = 0; int64_t valueint = 0; + bool valuebool = false; Error *err = NULL; bool use_int_value = false; int i, ret; @@ -1582,6 +1587,14 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict) p.has_x_checkpoint_delay = true; use_int_value = true; break; + case MIGRATION_PARAMETER_BLOCK_INCREMENTAL: + p.has_block_incremental = true; + visit_type_bool(v, param, &valuebool, &err); + if (err) { + goto cleanup; + } + p.block_incremental = valuebool; + break; } if (use_int_value) { |