mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Disable some operations affected by hash collision
This only if we are working with a reduced hash length.
This commit is contained in:
parent
ab7d4e896c
commit
5bf030c793
4 changed files with 31 additions and 5 deletions
|
|
@ -982,8 +982,8 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* have "parity_needs_to_be_updated" already at 1 */
|
||||
assert(block_state_get(block) == BLOCK_STATE_CHG);
|
||||
|
||||
/* if there is an hash */
|
||||
if (hash_is_real(block->hash)) {
|
||||
/* if the hash represents the data uniquievocally */
|
||||
if (hash_is_unique(block->hash)) {
|
||||
/* check if the hash is changed */
|
||||
if (memcmp(hash, block->hash, BLOCK_HASH_SIZE) != 0) {
|
||||
/* the block is different, and we must update parity */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue