From d7ff1f4b63aa9a7e562b262430e2c6872a8d75e4 Mon Sep 17 00:00:00 2001 From: "Huawei Technologies Co., Ltd" 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 Signed-off-by: Ying Fang --- qemu-Support-retry-BLOCK_IO_ERROR-event.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 qemu-Support-retry-BLOCK_IO_ERROR-event.patch diff --git a/qemu-Support-retry-BLOCK_IO_ERROR-event.patch b/qemu-Support-retry-BLOCK_IO_ERROR-event.patch new file mode 100644 index 0000000..15992a6 --- /dev/null +++ b/qemu-Support-retry-BLOCK_IO_ERROR-event.patch @@ -0,0 +1,57 @@ +From fbe0c3b91ca38be349999a1fab748951ba3331c4 Mon Sep 17 00:00:00 2001 +From: Jiahui Cen +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 +Signed-off-by: Ying Fang +--- + 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 +