Computation support for RAID-TP (Triple Parity).

This commit is contained in:
Andrea Mazzoleni 2013-09-07 17:22:33 +02:00
parent 4f891087a2
commit 18840848e9
6 changed files with 1092 additions and 171 deletions

30
raid.h
View file

@ -37,10 +37,34 @@ void raid5_recov_data(unsigned char** dptrs, unsigned diskmax, unsigned size, in
void raid6_recov_2data(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, int failb, unsigned char* zero);
/*
* Recover failure of one data block plus the P block.
* Recover failure of one data block ignoring P.
* Note that P content is not recovered.
*/
void raid6_recov_datap(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, unsigned char* zero);
/*
* Recover failure of one data block ignoring P and Q.
* Note that P and Q content is not recovered.
*/
void raidTP_recov_datapq(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, unsigned char* zero);
/*
* Recover failure of two data blocks ignoring P.
* Note that P content is not recovered.
*/
void raidTP_recov_2datap(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, int failb, unsigned char* zero);
/*
* Recover failure of two data blocks ignoring Q.
* Note that Q content is not recovered.
*/
void raidTP_recov_2dataq(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, int failb, unsigned char* zero);
/*
* Recover failure of three data blocks.
*/
void raidTP_recov_3data(unsigned char** dptrs, unsigned diskmax, unsigned size, int faila, int failb, int failc, unsigned char* zero);
/**
* Initializes the RAID system.
*/
@ -59,6 +83,10 @@ void raid6_int32r2(unsigned char** dptr, unsigned diskmax, unsigned size);
void raid6_mmxr2(unsigned char** dptr, unsigned diskmax, unsigned size);
void raid6_sse2r2(unsigned char** dptr, unsigned diskmax, unsigned size);
void raid6_sse2r4(unsigned char** buffer, unsigned diskmax, unsigned size);
void raidTP_int32r2(unsigned char** dptr, unsigned diskmax, unsigned size);
void raidTP_mmxr1(unsigned char** buffer, unsigned diskmax, unsigned size);
void raidTP_sse2r1(unsigned char** dptr, unsigned diskmax, unsigned size);
void raidTP_sse2r2(unsigned char** dptr, unsigned diskmax, unsigned size);
#endif