1 Star 0 Fork 126

ZhangBo/qemu_src

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qapi-block-core-Add-retry-option-for-error-action.patch 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
imxcc 提交于 2022-02-10 21:30 . sync from openeuler/pulls/221 and 222
From 4c3d47e04886e072acc0e4fefdc49e9d1f6b4ad1 Mon Sep 17 00:00:00 2001
From: Jiahui Cen <cenjiahui@huawei.com>
Date: Thu, 21 Jan 2021 15:46:45 +0800
Subject: [PATCH 1/7] qapi/block-core: Add retry option for error action
Add a new error action 'retry' to support retry on errors.
Signed-off-by: Jiahui Cen <cenjiahui(a)huawei.com>
Signed-off-by: Ying Fang <fangying1(a)huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
---
blockdev.c | 2 ++
qapi/block-core.json | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index b35072644e..6f1981635b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -333,6 +333,8 @@ static int parse_block_error_action(const char *buf, bool is_read, Error **errp)
return BLOCKDEV_ON_ERROR_STOP;
} else if (!strcmp(buf, "report")) {
return BLOCKDEV_ON_ERROR_REPORT;
+ } else if (!strcmp(buf, "retry")) {
+ return BLOCKDEV_ON_ERROR_RETRY;
} else {
error_setg(errp, "'%s' invalid %s error action",
buf, is_read ? "read" : "write");
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1d3dd9cb48..804beabfb0 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1146,7 +1146,7 @@
# Since: 1.3
##
{ 'enum': 'BlockdevOnError',
- 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] }
+ 'data': ['report', 'ignore', 'enospc', 'stop', 'auto', 'retry'] }
##
# @MirrorSyncMode:
@@ -4952,7 +4952,7 @@
# Since: 2.1
##
{ 'enum': 'BlockErrorAction',
- 'data': [ 'ignore', 'report', 'stop' ] }
+ 'data': [ 'ignore', 'report', 'stop', 'retry' ] }
##
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ooorz/qemu_src.git
git@gitee.com:ooorz/qemu_src.git
ooorz
qemu_src
qemu_src
master

搜索帮助