[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD even
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD events according to the node name |
Date: |
Fri, 11 Mar 2016 09:55:59 +0100 |
User-agent: |
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) |
On Thu 10 Mar 2016 09:35:32 PM CET, Eric Blake wrote:
>> @@ -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.
I think the chances of having collisions here are so low (and their
effect so negligible) that I wouldn't worry too much about it.
Berto
- [Qemu-devel] [PATCH v2 0/4] Separate QUORUM_REPORT_BAD events according to their node name, Alberto Garcia, 2016/03/10
- [Qemu-devel] [PATCH v2 1/4] quorum: Fix crash in quorum_aio_cb(), Alberto Garcia, 2016/03/10
- [Qemu-devel] [PATCH v2 4/4] iotests: Add test for QMP event rates, Alberto Garcia, 2016/03/10
- [Qemu-devel] [PATCH v2 3/4] monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode, Alberto Garcia, 2016/03/10
- [Qemu-devel] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD events according to the node name, Alberto Garcia, 2016/03/10
- Re: [Qemu-devel] [PATCH v2 0/4] Separate QUORUM_REPORT_BAD events according to their node name, Max Reitz, 2016/03/14