mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Adds the new autosave configuration option.
Checks the parity validity invariant after reading the content file.
This commit is contained in:
parent
e927c8d905
commit
2a50ec747d
11 changed files with 209 additions and 28 deletions
4
parity.c
4
parity.c
|
|
@ -37,7 +37,9 @@ block_off_t parity_resize(struct snapraid_state* state)
|
|||
/* start from the declared size */
|
||||
block_off_t block = tommy_array_size(&disk->blockarr);
|
||||
|
||||
/* decrease the block until an allocated or deleted block */
|
||||
/* decrease the block until an allocated one */
|
||||
/* we don't stop at deleted blocks, because we want to have them cleared */
|
||||
/* if they are at the end of the parity */
|
||||
while (block > parity_block && !block_is_valid(tommy_array_get(&disk->blockarr, block - 1)))
|
||||
--block;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue