mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04: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
2
TODO
2
TODO
|
|
@ -3,8 +3,6 @@ SnapRAID TODO
|
|||
|
||||
This is the list of TODO items for SnapRAID.
|
||||
|
||||
* Check blockmax in hole ? RISKY ??
|
||||
|
||||
- v4.x
|
||||
|
||||
* If a content file is missing, sync should rewrite it, even if no change was done at the content.
|
||||
|
|
|
|||
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