[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 2/4] monitor: Separate QUORUM_REPORT_BAD even

From: Alberto Garcia
Subject: Re: [Qemu-block] [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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]