qemu/monitor-limit-io-error-qmp-event-to-at-most-once-per.patch

30 lines
1.0 KiB
Diff
Raw Normal View History

From 44f45b5c163efed5387dac40e229e0a50bf5921a Mon Sep 17 00:00:00 2001
From: Yan Wang <wangyan122@huawei.com>
Date: Thu, 10 Feb 2022 11:35:58 +0800
Subject: [PATCH] monitor: limit io error qmp event to at most once per 60s
The speed of BLOCK IO ERROR event maybe very high (thousands per
second). If we report all BLOCK IO ERRORs, the log file will be flooded
with BLOCK IO ERROR event. So throttle it to at most once per 60s.
Signed-off-by: Yan Wang <wangyan122@huawei.com>
---
monitor/monitor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/monitor/monitor.c b/monitor/monitor.c
index fb4ae9531c..621e79eb66 100644
--- a/monitor/monitor.c
+++ b/monitor/monitor.c
@@ -300,6 +300,7 @@ static MonitorQAPIEventConf monitor_qapi_event_conf[QAPI_EVENT__MAX] = {
[QAPI_EVENT_QUORUM_FAILURE] = { 1000 * SCALE_MS },
[QAPI_EVENT_VSERPORT_CHANGE] = { 1000 * SCALE_MS },
[QAPI_EVENT_MEMORY_DEVICE_SIZE_CHANGE] = { 1000 * SCALE_MS },
+ [QAPI_EVENT_BLOCK_IO_ERROR] = { 60L * 1000 * SCALE_MS },
};
/*
--
2.27.0