Refactor the parity size detection before sync.

Now we resize the parity only after checking the size of all
the parity file.
This commit is contained in:
Andrea Mazzoleni 2015-02-01 18:48:50 +01:00
parent 6844fb7527
commit ad57aafd8f
11 changed files with 112 additions and 62 deletions

View file

@ -187,7 +187,7 @@ void state_dry(struct snapraid_state* state, block_off_t blockstart, block_off_t
printf("Drying...\n");
blockmax = parity_size(state);
blockmax = parity_allocated_size(state);
if (blockstart > blockmax) {
/* LCOV_EXCL_START */