Disable some operations affected by hash collision

This only if we are working with a reduced hash length.
This commit is contained in:
Andrea Mazzoleni 2016-04-10 19:13:08 +02:00
parent ab7d4e896c
commit 5bf030c793
4 changed files with 31 additions and 5 deletions

View file

@ -501,7 +501,7 @@ static int repair(struct snapraid_state* state, int rehash, unsigned pos, unsign
/* try to fetch the old block using the old hash for CHG and DELETED blocks */
} else if ((block_state == BLOCK_STATE_CHG || block_state == BLOCK_STATE_DELETED)
&& hash_is_real(failed[j].block->hash)
&& hash_is_unique(failed[j].block->hash)
&& state_import_fetch(state, rehash, failed[j].block, buffer[failed[j].index]) == 0) {
/* note that from now the buffer is definitively lost */