Adds recovering at RAID6 support.

Adds selftesting of RAID5 and RAID5.
This commit is contained in:
Andrea Mazzoleni 2011-04-24 10:24:05 +02:00
parent 08831c6641
commit f855424082
11 changed files with 546 additions and 200 deletions

6
sync.c
View file

@ -189,11 +189,7 @@ static int state_sync_process(struct snapraid_state* state, int parity_f, int qa
}
/* compute the parity */
if (state->level == 1) {
raid5_gen(buffer, diskmax + state->level, state->block_size);
} else {
raid6_gen(buffer, diskmax + state->level, state->block_size);
}
raid_gen(state->level, buffer, diskmax, state->block_size);
/* write the parity */
ret = parity_write(state->parity, parity_f, i, buffer[diskmax], state->block_size);