Improves recovering after an aborted sync.

This commit is contained in:
Andrea Mazzoleni 2012-02-09 23:17:36 +01:00
parent f14ab1aa3b
commit 55fae37e7f
13 changed files with 758 additions and 137 deletions

4
dry.c
View file

@ -53,11 +53,11 @@ static int state_dry_process(struct snapraid_state* state, struct snapraid_parit
/* for each disk, process the block */
for(j=0;j<diskmax;++j) {
int read_size;
struct snapraid_block* block = 0;
struct snapraid_block* block = BLOCK_EMPTY;
if (handle[j].disk)
block = disk_block_get(handle[j].disk, i);
if (!block)
if (!block_is_valid(block))
continue;
/* if the file is different than the current one, close it */