代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4fe1ead5da84610bba30cae9315ff38de765711f Mon Sep 17 00:00:00 2001
From: Jiri Denemark <jdenemar@redhat.com>
Date: Wed, 10 Jun 2020 16:13:15 +0200
Subject: [PATCH 5/8] qemu: Avoid deprecated migrate-set-cache-size QMP command
The same functionality can be achieved using migrate-set-parameters QMP
command with xbzrle-cache-size parameter.
https://bugzilla.redhat.com/show_bug.cgi?id=1845012
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
---
src/qemu/qemu_driver.c | 26 +++++++++++++++++++++-----
src/qemu/qemu_migration_params.c | 3 +--
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1ad33197e0..e7166e4af3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14067,7 +14067,9 @@ qemuDomainMigrateSetCompressionCache(virDomainPtr dom,
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
qemuDomainObjPrivatePtr priv;
+ g_autoptr(qemuMigrationParams) migParams = NULL;
int ret = -1;
+ int rc;
virCheckFlags(0, -1);
@@ -14092,13 +14094,27 @@ qemuDomainMigrateSetCompressionCache(virDomainPtr dom,
goto endjob;
}
- qemuDomainObjEnterMonitor(driver, vm);
-
VIR_DEBUG("Setting compression cache to %llu B", cacheSize);
- ret = qemuMonitorSetMigrationCacheSize(priv->mon, cacheSize);
+ if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE)) {
+ if (!(migParams = qemuMigrationParamsNew()))
+ goto endjob;
- if (qemuDomainObjExitMonitor(driver, vm) < 0)
- ret = -1;
+ if (qemuMigrationParamsSetULL(migParams,
+ QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE,
+ cacheSize) < 0)
+ goto endjob;
+
+ if (qemuMigrationParamsApply(driver, vm, QEMU_ASYNC_JOB_NONE,
+ migParams) < 0)
+ goto endjob;
+ } else {
+ qemuDomainObjEnterMonitor(driver, vm);
+ rc = qemuMonitorSetMigrationCacheSize(priv->mon, cacheSize);
+ if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
+ goto endjob;
+ }
+
+ ret = 0;
endjob:
qemuDomainObjEndJob(driver, vm);
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 810199370f..6953badcfe 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -869,8 +869,7 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
* qemuMonitorSetMigrationParams to ignore this parameter.
*/
if (migParams->params[xbzrle].set &&
- (!priv->job.migParams ||
- !priv->job.migParams->params[xbzrle].set)) {
+ !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE)) {
if (qemuMonitorSetMigrationCacheSize(priv->mon,
migParams->params[xbzrle].value.ull) < 0)
goto cleanup;
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。