From ae3ba0858cd4e9e0afdf5a4dbfdae1c196986ad6 Mon Sep 17 00:00:00 2001 From: Moinak Ghosh Date: Sat, 29 Jun 2013 19:42:45 +0530 Subject: [PATCH] Avoid CRC64 for Similarity IDs when using 256-bit hash. --- rabin/rabin_dedup.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rabin/rabin_dedup.c b/rabin/rabin_dedup.c index c9eebc3..1739d6c 100755 --- a/rabin/rabin_dedup.c +++ b/rabin/rabin_dedup.c @@ -1041,11 +1041,19 @@ process_blocks: increment = cfg->chunk_cksum_sz / 2; if (increment * sub_i > length) sub_i = length / increment; - for (j = 0; jsimilarity_cksum_sz; + if (increment/2 == sizeof (uint64_t)) { + for (j = 0; jsimilarity_cksum_sz; + } + } else { + for (j = 0; jsimilarity_cksum_sz; + } } /*