1 Star 0 Fork 71

章北海/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu-fix-qemuMigrationSrcCleanup-to-use-qemuMigratio.patch 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
From ba60a52c9d6ca7b3729ebf22bb72f6156a02b3b4 Mon Sep 17 00:00:00 2001
From: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Date: Tue, 18 Aug 2020 11:01:40 +0300
Subject: [PATCH 071/108] qemu: fix qemuMigrationSrcCleanup to use
qemuMigrationJobFinish
qemuMigrationSrcCleanup uses qemuDomainObjDiscardAsyncJob currently. But
discard does not reduce jobs_queued counter so it leaks. Also discard does not
notify other threads that job condition is available. Discard does reset nested
job but nested job is not possible in this conditions.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 7e34d9a9e076ea0bd550268ad4830f53a8466f3e)
---
src/qemu/qemu_migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 32be433e93..c461156075 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2022,7 +2022,7 @@ qemuMigrationSrcCleanup(virDomainObjPtr vm,
switch ((qemuMigrationJobPhase) priv->job.phase) {
case QEMU_MIGRATION_PHASE_BEGIN3:
/* just forget we were about to migrate */
- qemuDomainObjDiscardAsyncJob(driver, vm);
+ qemuMigrationJobFinish(driver, vm);
break;
case QEMU_MIGRATION_PHASE_PERFORM3_DONE:
@@ -2032,7 +2032,7 @@ qemuMigrationSrcCleanup(virDomainObjPtr vm,
qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
priv->job.migParams, priv->job.apiFlags);
/* clear the job and let higher levels decide what to do */
- qemuDomainObjDiscardAsyncJob(driver, vm);
+ qemuMigrationJobFinish(driver, vm);
break;
case QEMU_MIGRATION_PHASE_PERFORM3:
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dependent/libvirt.git
git@gitee.com:dependent/libvirt.git
dependent
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385