Improves recovering after an aborted sync.

This commit is contained in:
Andrea Mazzoleni 2012-02-09 23:17:36 +01:00
parent f14ab1aa3b
commit 55fae37e7f
13 changed files with 758 additions and 137 deletions

2
dup.c
View file

@ -52,7 +52,7 @@ struct snapraid_hash* hash_alloc(struct snapraid_disk* disk, struct snapraid_fil
for(i=0;i<file->blockmax;++i) {
memcpy(buf + i * HASH_SIZE, file->blockvec[i].hash, HASH_SIZE);
if (!block_flag_has(&file->blockvec[i], BLOCK_HAS_HASH)) {
if (!block_has_hash(&file->blockvec[i])) {
free(buf);
return 0;
}