if (params) {
assert(params->has_compress_level);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_LEVEL),
params->compress_level);
assert(params->has_compress_threads);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_THREADS),
params->compress_threads);
assert(params->has_decompress_threads);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_DECOMPRESS_THREADS),
params->decompress_threads);
assert(params->has_cpu_throttle_initial);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL),
params->cpu_throttle_initial);
assert(params->has_cpu_throttle_increment);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT),
params->cpu_throttle_increment);
assert(params->has_tls_creds);
MigrationParameter_str(MIGRATION_PARAMETER_TLS_HOSTNAME),
params->tls_hostname);
assert(params->has_max_bandwidth);
- monitor_printf(mon, "%s: %" PRId64 " bytes/second\n",
+ monitor_printf(mon, "%s: %" PRIu64 " bytes/second\n",
MigrationParameter_str(MIGRATION_PARAMETER_MAX_BANDWIDTH),
params->max_bandwidth);
assert(params->has_downtime_limit);
- monitor_printf(mon, "%s: %" PRId64 " milliseconds\n",
+ monitor_printf(mon, "%s: %" PRIu64 " milliseconds\n",
MigrationParameter_str(MIGRATION_PARAMETER_DOWNTIME_LIMIT),
params->downtime_limit);
assert(params->has_x_checkpoint_delay);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_X_CHECKPOINT_DELAY),
params->x_checkpoint_delay);
assert(params->has_block_incremental);
monitor_printf(mon, "%s: %s\n",
MigrationParameter_str(MIGRATION_PARAMETER_BLOCK_INCREMENTAL),
params->block_incremental ? "on" : "off");
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_CHANNELS),
params->x_multifd_channels);
- monitor_printf(mon, "%s: %" PRId64 "\n",
+ monitor_printf(mon, "%s: %u\n",
MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUNT),
params->x_multifd_page_count);
+ monitor_printf(mon, "%s: %" PRIu64 "\n",
+ MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE),
+ params->xbzrle_cache_size);
}
qapi_free_MigrationParameters(params);
info2l = qmp_query_vnc_servers(&err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
if (!info2l) {
info = qmp_query_balloon(&err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
data = qmp_ringbuf_read(chardev, size, false, 0, &err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
Error *err = NULL;
qmp_balloon(value, &err);
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
void hmp_block_resize(Monitor *mon, const QDict *qdict)
Error *err = NULL;
qmp_migrate_set_cache_size(value, &err);
- if (err) {
- error_report_err(err);
- return;
- }
+ hmp_handle_error(mon, &err);
}
/* Kept for backwards compatibility */
end:
qapi_free_MigrationCapabilityStatusList(caps);
-
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
Visitor *v = string_input_visitor_new(valuestr);
MigrateSetParameters *p = g_new0(MigrateSetParameters, 1);
uint64_t valuebw = 0;
+ uint64_t cache_size;
Error *err = NULL;
int val, ret;
p->has_x_multifd_page_count = true;
visit_type_int(v, param, &p->x_multifd_page_count, &err);
break;
+ case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE:
+ p->has_xbzrle_cache_size = true;
+ visit_type_size(v, param, &cache_size, &err);
+ if (err || cache_size > INT64_MAX
+ || (size_t)cache_size != cache_size) {
+ error_setg(&err, "Invalid size %s", valuestr);
+ break;
+ }
+ p->xbzrle_cache_size = cache_size;
+ break;
default:
assert(0);
}
cleanup:
qapi_free_MigrateSetParameters(p);
visit_free(v);
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict)
qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, &err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
{
BlockBackend *blk;
BlockBackend *local_blk = NULL;
- AioContext *aio_context;
const char* device = qdict_get_str(qdict, "device");
const char* command = qdict_get_str(qdict, "command");
Error *err = NULL;
}
}
- aio_context = blk_get_aio_context(blk);
- aio_context_acquire(aio_context);
-
/*
* Notably absent: Proper permission management. This is sad, but it seems
* almost impossible to achieve without changing the semantics and thereby
*/
qemuio_command(blk, command);
- aio_context_release(aio_context);
-
fail:
blk_unref(local_blk);
hmp_handle_error(mon, &err);