Doesn't update parity for blocks that are not changed even if the file has a different timestamp.

This commit is contained in:
Andrea Mazzoleni 2013-09-29 21:01:31 +02:00
parent 657a2f9e13
commit 1582dba2c5
8 changed files with 169 additions and 41 deletions

View file

@ -581,6 +581,15 @@ int main(int argc, char* argv[])
memory(state.opt.gui);
} else if (operation == OPERATION_SYNC) {
/* in the next state read ensures to clear all the undeterminated hashes in case */
/* we are reading from an incomplete sync */
/* The undeterminated hash are only for CHG/DELETED blocks for which we don't */
/* know if the previous interrupted sync was able to update or not the parity */
/* The sync process instead needs to trust this information because it's used */
/* to avoid to recompute the parity if all the input are equals as before. */
state.clear_undeterminate_hash = 1;
state_read(&state);
state_scan(&state, 0);