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

2
sync.c
View file

@ -438,7 +438,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
blockmax = parity_size(state);
size = blockmax * (data_off_t)state->block_size;
loaded_size = state->loaded_blockmax * (data_off_t)state->block_size;
loaded_size = state->loaded_paritymax * (data_off_t)state->block_size;
if (blockstart > blockmax) {
fprintf(stderr, "Error in the starting block %u. It's bigger than the parity size %u.\n", blockstart, blockmax);