[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 38/40] monitor: Separate QUORUM_REPORT_BAD events acc
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 38/40] monitor: Separate QUORUM_REPORT_BAD events according to the node name |
Date: |
Mon, 14 Mar 2016 18:37:39 +0100 |
From: Alberto Garcia <address@hidden>
The QUORUM_REPORT_BAD event is emitted whenever there's an I/O error
in a child of a Quorum device. This event is emitted at a maximum rate
of 1 per second. This means that an error in one of the children will
mask errors in the other children if they happen within the same 1
second interval.
This patch modifies qapi_event_throttle_equal() so QUORUM_REPORT_BAD
events are kept separately if they come from different children.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
monitor.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/monitor.c b/monitor.c
index e99ca8c..c9fe862 100644
--- a/monitor.c
+++ b/monitor.c
@@ -572,6 +572,10 @@ static unsigned int qapi_event_throttle_hash(const void
*key)
hash += g_str_hash(qdict_get_str(evstate->data, "id"));
}
+ if (evstate->event == QAPI_EVENT_QUORUM_REPORT_BAD) {
+ hash += g_str_hash(qdict_get_str(evstate->data, "node-name"));
+ }
+
return hash;
}
@@ -589,6 +593,11 @@ static gboolean qapi_event_throttle_equal(const void *a,
const void *b)
qdict_get_str(evb->data, "id"));
}
+ if (eva->event == QAPI_EVENT_QUORUM_REPORT_BAD) {
+ return !strcmp(qdict_get_str(eva->data, "node-name"),
+ qdict_get_str(evb->data, "node-name"));
+ }
+
return TRUE;
}
--
1.8.3.1
- [Qemu-devel] [PULL 26/40] sheepdog: Use BB functions in .bdrv_create(), (continued)
- [Qemu-devel] [PULL 26/40] sheepdog: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 27/40] vdi: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 32/40] block: Include hbitmap.h in block.h, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 33/40] typedefs: Add BdrvDirtyBitmap, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 37/40] quorum: Fix crash in quorum_aio_cb(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 39/40] monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 36/40] iotests: Correct 081's reference output, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 31/40] backup: Use Bitmap to replace "s->bitmap", Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 35/40] block: Remove unused typedef of BlockDriverDirtyHandler, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 40/40] iotests: Add test for QMP event rates, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 38/40] monitor: Separate QUORUM_REPORT_BAD events according to the node name,
Kevin Wolf <=
- [Qemu-devel] [PULL 34/40] block: Move block dirty bitmap code to separate files, Kevin Wolf, 2016/03/14
- Re: [Qemu-devel] [PULL 00/40] Block patches, Peter Maydell, 2016/03/15