mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Add support for xbzrle-cache-size migration parameter
Originally QEMU provided query-migrate-cache-size and migrate-set-cache-size QMP commands for querying/setting XBZRLE cache size. In version 2.11 QEMU added support for XBZRLE cache size to the general migration paramaters commands. This patch adds support for this parameter to libvirt to make sure it is properly restored to its original value after a failed or aborted migration. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d6d6e2e903
commit
323567a6fa
@ -2639,7 +2639,7 @@ qemuMonitorSetMigrationParams(qemuMonitorPtr mon,
|
||||
"decompressThreads=%d:%d cpuThrottleInitial=%d:%d "
|
||||
"cpuThrottleIncrement=%d:%d tlsCreds=%s tlsHostname=%s "
|
||||
"maxBandwidth=%d:%llu downtimeLimit=%d:%llu "
|
||||
"blockIncremental=%d:%d",
|
||||
"blockIncremental=%d:%d xbzrleCacheSize=%d:%llu",
|
||||
params->compressLevel_set, params->compressLevel,
|
||||
params->compressThreads_set, params->compressThreads,
|
||||
params->decompressThreads_set, params->decompressThreads,
|
||||
@ -2648,7 +2648,8 @@ qemuMonitorSetMigrationParams(qemuMonitorPtr mon,
|
||||
NULLSTR(params->tlsCreds), NULLSTR(params->tlsHostname),
|
||||
params->maxBandwidth_set, params->maxBandwidth,
|
||||
params->downtimeLimit_set, params->downtimeLimit,
|
||||
params->blockIncremental_set, params->blockIncremental);
|
||||
params->blockIncremental_set, params->blockIncremental,
|
||||
params->xbzrleCacheSize_set, params->xbzrleCacheSize);
|
||||
|
||||
QEMU_CHECK_MONITOR_JSON(mon);
|
||||
|
||||
|
@ -673,6 +673,9 @@ struct _qemuMonitorMigrationParams {
|
||||
|
||||
bool blockIncremental_set;
|
||||
bool blockIncremental;
|
||||
|
||||
bool xbzrleCacheSize_set;
|
||||
unsigned long long xbzrleCacheSize;
|
||||
};
|
||||
|
||||
int qemuMonitorGetMigrationParams(qemuMonitorPtr mon,
|
||||
|
@ -2833,6 +2833,7 @@ qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
|
||||
PARSE_ULONG(maxBandwidth, "max-bandwidth");
|
||||
PARSE_ULONG(downtimeLimit, "downtime-limit");
|
||||
PARSE_BOOL(blockIncremental, "block-incremental");
|
||||
PARSE_ULONG(xbzrleCacheSize, "xbzrle-cache-size");
|
||||
|
||||
#undef PARSE_SET
|
||||
#undef PARSE_INT
|
||||
@ -2898,6 +2899,7 @@ qemuMonitorJSONSetMigrationParams(qemuMonitorPtr mon,
|
||||
APPEND_ULONG(maxBandwidth, "max-bandwidth");
|
||||
APPEND_ULONG(downtimeLimit, "downtime-limit");
|
||||
APPEND_BOOL(blockIncremental, "block-incremental");
|
||||
APPEND_ULONG(xbzrleCacheSize, "xbzrle-cache-size");
|
||||
|
||||
#undef APPEND
|
||||
#undef APPEND_INT
|
||||
|
@ -1810,7 +1810,8 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationParams(const void *data)
|
||||
" \"tls-hostname\": \"\","
|
||||
" \"max-bandwidth\": 1234567890,"
|
||||
" \"downtime-limit\": 500,"
|
||||
" \"block-incremental\": true"
|
||||
" \"block-incremental\": true,"
|
||||
" \"xbzrle-cache-size\": 67108864"
|
||||
" }"
|
||||
"}") < 0) {
|
||||
goto cleanup;
|
||||
@ -1867,6 +1868,7 @@ testQemuMonitorJSONqemuMonitorJSONGetMigrationParams(const void *data)
|
||||
CHECK_ULONG(maxBandwidth, "max-bandwidth", 1234567890ULL);
|
||||
CHECK_ULONG(downtimeLimit, "downtime-limit", 500ULL);
|
||||
CHECK_BOOL(blockIncremental, "block-incremental", true);
|
||||
CHECK_ULONG(xbzrleCacheSize, "xbzrle-cache-size", 67108864ULL);
|
||||
|
||||
#undef CHECK_NUM
|
||||
#undef CHECK_INT
|
||||
|
Loading…
x
Reference in New Issue
Block a user