From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7J7-0007hN-80 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:35:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ae7J6-0002cS-3o for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:35:41 -0500 References: From: Eric Blake Message-ID: <56E1DA94.1060500@redhat.com> Date: Thu, 10 Mar 2016 13:35:32 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NB5rmdHxX16lUSRhFPpbug4HdRdrvRNKo" Subject: Re: [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD events according to the node name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Changlong Xie , qemu-block@nongnu.org, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NB5rmdHxX16lUSRhFPpbug4HdRdrvRNKo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > This patch modifies qapi_event_throttle_equal() so QUORUM_REPORT_BAD > events are kept separately if they come from different children. >=20 > Signed-off-by: Alberto Garcia > Reviewed-by: Max Reitz > --- > monitor.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > 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 +=3D g_str_hash(qdict_get_str(evstate->data, "id")); > } > =20 > + if (evstate->event =3D=3D QAPI_EVENT_QUORUM_REPORT_BAD) { > + hash +=3D g_str_hash(qdict_get_str(evstate->data, "node-name")= ); Is ^=3D any better than +=3D 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NB5rmdHxX16lUSRhFPpbug4HdRdrvRNKo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW4dqUAAoJEKeha0olJ0NqncQH/3uCCzAUMo0lSOh9QuWNGU8v E+jnFE7HtycKWAlVQt6F5ci13lWbHhgsgD6jfDXcLR2y9jc59T4Q6RvW38rH5y+K qebAbHhH3Q6ah7z0cEUfGA0QpfFw4jBRy1mPCnNcNenDOQKS73Ppm/nPxD6HRVGC fVLVbtbgZXbFmGeErMrjL2fLrNI9eLsls5AcXQ0DS8xnKhXFh6HgEaTuuU/UN3jC 5o/pNIsgZBsCAvB1SKYsxg2/DEzT7SZhQ/+8dI1zP95Gq06A88G7gbZoK14eV7YU 4hslSJuKoUjS6yMsBIb5fMixxdy3xSkB6fyQ4b7i7bmACDqYNc4iXmoAx6lJJmo= =6o1Y -----END PGP SIGNATURE----- --NB5rmdHxX16lUSRhFPpbug4HdRdrvRNKo--