diff --git a/check.c b/check.c index 709447c4..272c4402 100644 --- a/check.c +++ b/check.c @@ -364,9 +364,9 @@ static int repair(struct snapraid_state* state, int rehash, unsigned pos, unsign /* If the block is CHG or DELETED, we don't have the original content of block, */ /* and we must try to recover it. */ /* This apply to CHG blocks even if they are not marked bad, */ - /* because the parityis computed with old content, and not with the new one. */ + /* because the parity is computed with old content, and not with the new one. */ /* Note that this recovering is done just to make possible to recover any other BLK one, */ - /* we are not really interseted in DELETED and CHG (old version) ones. */ + /* we are not really interested in DELETED and CHG (old version) ones. */ /* try to fetch the old block using the old hash */ if (state_import_fetch(state, rehash, failed[j].block->hash, buffer[failed[j].index]) == 0) { diff --git a/elem.h b/elem.h index e490bcbf..88212934 100644 --- a/elem.h +++ b/elem.h @@ -100,10 +100,12 @@ struct snapraid_filter { * This block is a deleted one. * This happens when a file is deleted. * - * The block hash field IS set, and it represents the hash of the previous data. + * The block hash field IS set, and it represents the hash of the previous data, but only + * if it's different by all 0. * The parity for this disk is not updated, but it contains the old data referenced by the hash. * - * If the hash is completely filled with 0, it means that its lost. + * If the hash is completely filled with 0, it means that the hash is lost. + * This could happen if a NEW block is deleted in an interrupted sync. */ #define BLOCK_STATE_DELETED 4