Relax the check about small parity files, to allow to recover

after a failed sync before resizing the parity files.
This commit is contained in:
Andrea Mazzoleni 2013-10-21 19:43:01 +02:00
parent 9f72b5244b
commit cef30125a2
4 changed files with 36 additions and 5 deletions

12
state.h
View file

@ -88,7 +88,17 @@ struct snapraid_state {
tommy_hashdyn importset; /**< Hashtable by hash of all the import blocks. */
tommy_hashdyn previmportset; /**< Hashtable by prevhash of all the import blocks. Valid only if we are in a rehash state. */
tommy_arrayof infoarr; /**< Block information array. */
block_off_t loaded_blockmax; /**< Previous size of the parity file, computed from the loaded state. */
/**
* Required size of the parity file, computed from the loaded state.
* This size only counts BLK blocks, ignoring NEW, CHG and DELETED ones.
*
* In normal case it's also the blockmax size returned by parity_size().
* In case of interrupted sync, this is the position + 1 of the last BLK block.
* Potentionally smaller than parity_size().
*/
block_off_t loaded_paritymax;
time_t progress_start; /**< Start of processing for progress visualization. */
time_t progress_last; /**< Last update of progress visualization. */
time_t progress_interruption; /**< Start of the measure interruption. */