19 Star 0 Fork 71

openEuler-RISC-V/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemuMigrationSrcNBDStorageCopyReady-Use-ready-state-.patch 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
From b82b8815939b3704f28ece92d056e68eac92ab28 Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@redhat.com>
Date: Mon, 11 Jan 2021 10:40:43 +0100
Subject: [PATCH 082/108] qemuMigrationSrcNBDStorageCopyReady: Use ready-state
of mirror from qemuBlockJobData
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Use the per-job state to determine when the non-shared-storage mirror is
complete rather than the per-disk definition one. The qemuBlockJobData
is a newer approach and is always cleared after the blockjob is
terminated while the 'mirrorState' variable in the definition of the
disk may be left over. In such case the disk mirror would be considered
complete prematurely.
https://bugzilla.redhat.com/show_bug.cgi?id=1889131
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit a09c421e3e5969582ed0a5cf9a132ecbfd9794d2)
---
src/qemu/qemu_migration.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index c461156075..d86325881e 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -539,10 +539,10 @@ qemuMigrationSrcNBDStorageCopyReady(virDomainObjPtr vm,
return -1;
}
- virObjectUnref(job);
-
- if (disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_READY)
+ if (job->state != VIR_DOMAIN_BLOCK_JOB_READY)
notReady++;
+
+ virObjectUnref(job);
}
if (notReady) {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/libvirt.git
git@gitee.com:openeuler-risc-v/libvirt.git
openeuler-risc-v
libvirt
libvirt
master

搜索帮助