[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 1/9] qapi/block-core: Add retry option for error action
From: |
Jiahui Cen |
Subject: |
[PATCH v5 1/9] qapi/block-core: Add retry option for error action |
Date: |
Fri, 5 Feb 2021 18:13:07 +0800 |
Add a new error action 'retry' to support retry on errors.
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Ying Fang <fangying1@huawei.com>
---
blockdev.c | 2 ++
qapi/block-core.json | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index b250b9b959..ece1d8ae58 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -342,6 +342,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 9f555d5c1d..30ea43cb77 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1143,10 +1143,13 @@
#
# @auto: inherit the error handling policy of the backend (since: 2.7)
#
+# @retry: for guest operations, retry the failing request; (since: 6.0)
+# for jobs, not supported
+#
# Since: 1.3
##
{ 'enum': 'BlockdevOnError',
- 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] }
+ 'data': ['report', 'ignore', 'enospc', 'stop', 'auto', 'retry'] }
##
# @MirrorSyncMode:
@@ -4839,10 +4842,12 @@
#
# @stop: error caused VM to be stopped
#
+# @retry: error has been retried (since: 6.0)
+#
# Since: 2.1
##
{ 'enum': 'BlockErrorAction',
- 'data': [ 'ignore', 'report', 'stop' ] }
+ 'data': [ 'ignore', 'report', 'stop', 'retry' ] }
##
--
2.29.2
- [PATCH v5 0/9] block: Add retry for werror=/rerror= mechanism, Jiahui Cen, 2021/02/05
- [PATCH v5 2/9] block-backend: Introduce retry timer, Jiahui Cen, 2021/02/05
- [PATCH v5 8/9] scsi-bus: Refactor the code that retries requests, Jiahui Cen, 2021/02/05
- [PATCH v5 1/9] qapi/block-core: Add retry option for error action,
Jiahui Cen <=
- [PATCH v5 7/9] virtio_blk: Add support for retry on errors, Jiahui Cen, 2021/02/05
- [PATCH v5 5/9] block-backend: Add timeout support for retry, Jiahui Cen, 2021/02/05
- [PATCH v5 9/9] scsi-disk: Add support for retry on errors, Jiahui Cen, 2021/02/05
- [PATCH v5 3/9] block-backend: Add device specific retry callback, Jiahui Cen, 2021/02/05
- [PATCH v5 6/9] block: Add error retry param setting, Jiahui Cen, 2021/02/05
- [PATCH v5 4/9] block-backend: Enable retry action on errors, Jiahui Cen, 2021/02/05