qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD events according to the node name
Date: Thu, 10 Mar 2016 13:35:32 -0700	[thread overview]
Message-ID: <56E1DA94.1060500@redhat.com> (raw)
In-Reply-To: <b989c0cb3755bc4b6696e796fa8ed2ef6c56606a.1457610443.git.berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

On 03/10/2016 04:55 AM, Alberto Garcia wrote:
> 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 <berto@igalia.com>
> Reviewed-by: Max Reitz <mreitz@redhat.com>
> ---
>  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"));

Is ^= any better than += when computing hashes, so that carry bits
aren't weakening the distribution of bits?  But as long as the
computation is consistent, I'm not too worried, since you were copying
the line above.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-03-10 20:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 11:55 [Qemu-devel] [PATCH v2 0/4] Separate QUORUM_REPORT_BAD events according to their node name Alberto Garcia
2016-03-10 11:55 ` [Qemu-devel] [PATCH v2 1/4] quorum: Fix crash in quorum_aio_cb() Alberto Garcia
2016-03-10 11:55 ` [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD events according to the node name Alberto Garcia
2016-03-10 20:35   ` Eric Blake [this message]
2016-03-11  8:55     ` Alberto Garcia
2016-03-10 11:55 ` [Qemu-devel] [PATCH v2 3/4] monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode Alberto Garcia
2016-03-10 11:55 ` [Qemu-devel] [PATCH v2 4/4] iotests: Add test for QMP event rates Alberto Garcia
2016-03-14 16:22 ` [Qemu-devel] [PATCH v2 0/4] Separate QUORUM_REPORT_BAD events according to their node name Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E1DA94.1060500@redhat.com \
    --to=eblake@redhat.com \
    --cc=berto@igalia.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=xiecl.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).