diff --git a/elem.h b/elem.h index fc79c90c..50d5bf3a 100644 --- a/elem.h +++ b/elem.h @@ -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 diff --git a/scan.c b/scan.c index d5c10f7e..d88c211d 100644 --- a/scan.c +++ b/scan.c @@ -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 */