mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Improves recovering after an aborted sync.
This commit is contained in:
parent
f14ab1aa3b
commit
55fae37e7f
13 changed files with 758 additions and 137 deletions
4
parity.c
4
parity.c
|
|
@ -37,8 +37,8 @@ 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 block */
|
||||
while (block > parity_block && tommy_array_get(&disk->blockarr, block - 1) == 0)
|
||||
/* decrease the block until an allocated or deleted block */
|
||||
while (block > parity_block && !block_is_valid(tommy_array_get(&disk->blockarr, block - 1)))
|
||||
--block;
|
||||
|
||||
/* get the highest value */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue