1 Star 0 Fork 71

tzr/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu-Support-retry-BLOCK_IO_ERROR-event.patch 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
From fbe0c3b91ca38be349999a1fab748951ba3331c4 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.c | 3 ++-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index b440818ec2..90cb652db1 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -3701,6 +3701,7 @@ typedef enum {
VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored */
VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are paused */
VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS */
+ VIR_DOMAIN_EVENT_IO_ERROR_RETRY, /* Failed IO retried */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_IO_ERROR_LAST
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 619717eae5..ef25764a98 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -898,7 +898,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr da
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.c b/tools/virsh-domain.c
index 0a623086a4..65d5c831ec 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -13065,7 +13065,8 @@ VIR_ENUM_IMPL(virshDomainEventIOError,
VIR_DOMAIN_EVENT_IO_ERROR_LAST,
N_("none"),
N_("pause"),
- N_("report"));
+ N_("report"),
+ N_("retry"));
static const char *
virshDomainEventIOErrorToString(int action)
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tom0392/libvirt.git
git@gitee.com:tom0392/libvirt.git
tom0392
libvirt
libvirt
master

搜索帮助