mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 22:00:19 -05:00
Uses the deleted block offset when reading the text content to enlarge the parity size.
This ensures a better consistency check on the size of parity.
This commit is contained in:
parent
d141c7bc13
commit
e4fe228cc1
2 changed files with 4 additions and 6 deletions
8
state.c
8
state.c
|
|
@ -1091,12 +1091,12 @@ static void state_read_text(struct snapraid_state* state, const char* path, STRE
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* note that here we don't have a valid blockmax because we have not */
|
||||
/* yet processed all the disks with all the files */
|
||||
/* and then we cannot ensure that v_pos < blockmax */
|
||||
|
||||
deleted->block.parity_pos = v_pos;
|
||||
|
||||
/* keep track of the max block number used in parity */
|
||||
if (v_pos + 1 > blockmax)
|
||||
blockmax = v_pos + 1;
|
||||
|
||||
/* read the hash */
|
||||
c = sgetc(f);
|
||||
if (c != ' ') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue