mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Fixes the computation of the expected parity size.
This commit is contained in:
parent
e64badd05e
commit
7ad4d26e0c
1 changed files with 4 additions and 4 deletions
8
state.c
8
state.c
|
|
@ -921,10 +921,6 @@ void state_read(struct snapraid_state* state)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* keep track of the max block number */
|
||||
if (blockidx > blockmax)
|
||||
blockmax = blockidx;
|
||||
|
||||
block = &file->blockvec[blockidx];
|
||||
|
||||
if (block->parity_pos != POS_INVALID) {
|
||||
|
|
@ -951,6 +947,10 @@ void state_read(struct snapraid_state* state)
|
|||
block->parity_pos = v_pos;
|
||||
hash = oathash32(hash, v_pos);
|
||||
|
||||
/* keep track of the max block number used in parity */
|
||||
if (v_pos > blockmax)
|
||||
blockmax = v_pos;
|
||||
|
||||
/* read the hash only for 'blk/inv/chg', and not for 'new' */
|
||||
if (tag[0] != 'n') {
|
||||
c = sgetc(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue