Updates some comments.

This commit is contained in:
Andrea Mazzoleni 2013-08-21 22:34:22 +02:00
parent e0afd0edf7
commit b247524630
2 changed files with 6 additions and 3 deletions

7
elem.h
View file

@ -94,7 +94,9 @@ struct snapraid_filter {
* 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 the hash is lost.
* This could happen if a NEW block is converted to a CHG one in an interrupted sync.
* This could happen if a NEW/CHG block is first DELETED,
* and then reallocated in a CHG one after an interrupted sync.
* See scan_file_remove() and scan_file_insert() for the exact location where this could happen.
*/
#define BLOCK_STATE_CHG 3
@ -107,7 +109,8 @@ struct snapraid_filter {
* 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 the hash is lost.
* This could happen if a NEW block is DELETED in an interrupted sync.
* This could happen if a NEW/CHG block is DELETED after an interrupted sync.
* See scan_file_remove() for the exact location where this could happen.
*/
#define BLOCK_STATE_DELETED 4

2
scan.c
View file

@ -180,7 +180,7 @@ static void scan_file_remove(struct snapraid_state* state, struct snapraid_disk*
/* in these cases we don't know if the old state is still the one */
/* stored inside the parity, because after an aborted sync, the parity */
/* may be or may be not have been updated with the new data */
/* Them we reset the hash to a bogus value */
/* Then we reset the hash to a bogus value */
/* Note that this condition is possible only if: */
/* - new files added/modified */
/* - aborted sync, without saving the content file */