mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Uses a more general interface for the RAID engine.
This commit is contained in:
parent
684edf2173
commit
e80a5e868f
5 changed files with 108 additions and 56 deletions
4
check.c
4
check.c
|
|
@ -199,7 +199,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
memcpy(buffer[diskmax+ip[i]], buffer_recov[ip[i]], state->block_size);
|
||||
|
||||
/* recover using one less parity, the ip[r-1] one */
|
||||
raid_rec(r-1, id, ip, diskmax, state->block_size, buffer);
|
||||
raid_rec_dataonly(r-1, id, ip, diskmax, state->block_size, buffer);
|
||||
|
||||
/* use the remaining ip[r-1] parity to check the result */
|
||||
if (is_parity_matching(state, diskmax, ip[r-1], buffer, buffer_recov))
|
||||
|
|
@ -239,7 +239,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u
|
|||
memcpy(buffer[diskmax+ip[i]], buffer_recov[ip[i]], state->block_size);
|
||||
|
||||
/* recover */
|
||||
raid_rec(r, id, ip, diskmax, state->block_size, buffer);
|
||||
raid_rec_dataonly(r, id, ip, diskmax, state->block_size, buffer);
|
||||
|
||||
/* use the hash to check the result */
|
||||
if (is_hash_matching(state, rehash, diskmax, failed, failed_map, failed_count, buffer, buffer_zero))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue