1 Star 0 Fork 71

zhouyanjing/libvirt_euler

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu-Support-retry-BLOCK_IO_ERROR-event.patch 3.16 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-04-02 20:56 . libvirt update to version 9.10.0-4:
From e1a0ba5580ffb8d9de09885bef23b26d34b691c4 Mon Sep 17 00:00:00 2001
From: Jiahui Cen <cenjiahui@huawei.com>
Date: Thu, 25 Feb 2021 18:55:31 +0800
Subject: [PATCH] qemu: Support 'retry' BLOCK_IO_ERROR event.
Accept BLOCK_IO_ERROR event with action='retry' from qemu.
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
---
include/libvirt/libvirt-domain.h | 1 +
src/qemu/qemu_monitor_json.c | 2 +-
tools/virsh-domain-event.c | 8 ++++++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index a1902546bb..7d6117208b 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -4695,6 +4695,7 @@ typedef enum {
VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored (Since: 0.8.0) */
VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are paused (Since: 0.8.0) */
VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS (Since: 0.8.0) */
+ VIR_DOMAIN_EVENT_IO_ERROR_RETRY, /* Failed IO retried (Since: 6.2.0) */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_IO_ERROR_LAST /* (Since: 0.9.10) */
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index a9133793f6..231a9d8a2b 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -685,7 +685,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, virJSONValue *data)
VIR_ENUM_DECL(qemuMonitorIOErrorAction);
VIR_ENUM_IMPL(qemuMonitorIOErrorAction,
VIR_DOMAIN_EVENT_IO_ERROR_LAST,
- "ignore", "stop", "report",
+ "ignore", "stop", "report", "retry",
);
diff --git a/tools/virsh-domain-event.c b/tools/virsh-domain-event.c
index 6887c195a0..822d9e1e83 100644
--- a/tools/virsh-domain-event.c
+++ b/tools/virsh-domain-event.c
@@ -397,6 +397,10 @@ virshEventIOErrorPrint(virConnectPtr conn G_GNUC_UNUSED,
virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) report\n"),
virDomainGetName(dom), srcPath, devAlias);
break;
+ case VIR_DOMAIN_EVENT_IO_ERROR_RETRY:
+ virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) report\n"),
+ virDomainGetName(dom), srcPath, devAlias);
+ break;
case VIR_DOMAIN_EVENT_IO_ERROR_LAST:
default:
virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) unknown\n"),
@@ -458,6 +462,10 @@ virshEventIOErrorReasonPrint(virConnectPtr conn G_GNUC_UNUSED,
virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) report due to %4$s\n"),
virDomainGetName(dom), srcPath, devAlias, reason);
break;
+ case VIR_DOMAIN_EVENT_IO_ERROR_RETRY:
+ virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) report\n"),
+ virDomainGetName(dom), srcPath, devAlias);
+ break;
case VIR_DOMAIN_EVENT_IO_ERROR_LAST:
default:
virshEventPrintf(opaque, _("event 'io-error' for domain '%1$s': %2$s (%3$s) unknown due to %4$s\n"),
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhouyanjing199/libvirt_euler.git
git@gitee.com:zhouyanjing199/libvirt_euler.git
zhouyanjing199
libvirt_euler
libvirt_euler
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385