mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 11:26:48 -05:00
Computation support for RAID-TP (Triple Parity).
This commit is contained in:
parent
4f891087a2
commit
18840848e9
6 changed files with 1092 additions and 171 deletions
7
check.c
7
check.c
|
|
@ -151,7 +151,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
/* copy the redundancy to use */
|
||||
memcpy(buffer[diskmax+1], buffer_qarity, state->block_size);
|
||||
|
||||
/* recover both data and p */
|
||||
/* recover data */
|
||||
raid6_recov_datap(buffer, diskmax, state->block_size, failed[failed_map[0]].index, buffer_zero);
|
||||
|
||||
hash_checked = 0; /* keep track if we check at least one block */
|
||||
|
|
@ -181,9 +181,12 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
/* copy the redundancy to use */
|
||||
memcpy(buffer[diskmax+1], buffer_qarity, state->block_size);
|
||||
|
||||
/* recover both data and p */
|
||||
/* recover data */
|
||||
raid6_recov_datap(buffer, diskmax, state->block_size, failed[failed_map[0]].index, buffer_zero);
|
||||
|
||||
/* recompute parity with RAID5 to get p from it */
|
||||
raid_gen(1, buffer, diskmax, state->block_size);
|
||||
|
||||
/* if the recovered parity block matches */
|
||||
if (memcmp(buffer[diskmax], buffer_parity, state->block_size) == 0) {
|
||||
/* recompute all the redundancy information */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue