1 Star 0 Fork 24

MendeZ/libvirt_anolis

forked from src-anolis-os/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
libvirt-RHEL-qemu_migration-Fix-restoring-memlock-limit-on-destination.patch 1.89 KB
一键复制 编辑 原始数据 按行查看 历史
From b6c1f9ca8eb0ca8f7603ab205c7dc95b9f07b5a0 Mon Sep 17 00:00:00 2001
Message-Id: <b6c1f9ca8eb0ca8f7603ab205c7dc95b9f07b5a0@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Mon, 18 Jul 2022 16:01:20 +0200
Subject: [PATCH] RHEL: qemu_migration: Fix restoring memlock limit on
destination
Restoring memory locking limit on the destination host only makes sense
when migration succeeded as otherwise the QEMU process will be killed
anyway. Specifically if the migration fails because the process died,
touching the limit would produce rather unhelpful error message instead
of the real issue:
cannot get locked memory limit of process -1: No such file or
directory
This patch is RHEL-only caused by misplacing the call to
qemuDomainSetMaxMemLock when the "qemu_migration: Restore original
memory locking limit" upstream patch was backported to an older code
base.
https://bugzilla.redhat.com/show_bug.cgi?id=2107954
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/qemu/qemu_migration.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index db5163e993..11f87296d6 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5895,6 +5895,8 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
*/
if (inPostCopy)
g_clear_pointer(&priv->job.completed, qemuDomainJobInfoFree);
+
+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock);
}
qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN,
@@ -5907,7 +5909,6 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
cleanup:
g_clear_pointer(&jobInfo, qemuDomainJobInfoFree);
virPortAllocatorRelease(port);
- qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock);
if (priv->mon)
qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL);
VIR_FREE(priv->origname);
--
2.35.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shuaijiakun/libvirt_anolis.git
git@gitee.com:shuaijiakun/libvirt_anolis.git
shuaijiakun
libvirt_anolis
libvirt_anolis
a8.9-virt-stream-an

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385