On 01/02/2013 10:33 AM, Benoît Canet wrote:
>> How does this code handle hash collisions, and do you have some regression
>> tests that purposefully create a dedup hash collision, and verify that the
>> 'right thing' happens?
> 
> The two hash function that can be used are cryptographics and not broken yet.
> So nobody knows how to generate a collision.

I can understand that it is hard to write a test for two distinct data
sectors hashing to the same value, but perhaps it's worth including a
debug-only hash algorithm that intentionally generates collisions, just
to prove that you handle them correctly.  De-duplicating collided data,
while unlikely, is still a case of data loss that not everyone is happy
to risk.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to