1 Star 0 Fork 71

twwang/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu_driver-increase-recorded-counter-for-disk-block.patch 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
From e50bf97d633e467750cae0f573bd1d1b398c8bc0 Mon Sep 17 00:00:00 2001
From: Pavel Hrdina <phrdina@redhat.com>
Date: Wed, 3 Feb 2021 16:28:40 +0100
Subject: [PATCH 087/108] qemu_driver: increase recorded counter for disk block
stats
Commit <318d807a0bd3372b634d1952b559c5c627ccfa5b> added a fix to skip
most of the block stat code to not log error message for missing storage
sources but forgot to increase the recordnr counter.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 02ffd9909cf432b2aa52e5ae81beb188a372901d)
---
src/qemu/qemu_driver.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 41e9bff17b..5f6543d8e8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -21510,8 +21510,14 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDefPtr disk,
VIR_INFO("optional disk '%s' source file is missing, "
"skip getting stats", disk->dst);
- return qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recordnr,
- params);
+ if (qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recordnr,
+ params) < 0) {
+ return -1;
+ }
+
+ (*recordnr)++;
+
+ return 0;
}
for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/twwang/libvirt.git
git@gitee.com:twwang/libvirt.git
twwang
libvirt
libvirt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385