mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04: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 */
|
||||
|
|
|
|||
30
raid.h
30
raid.h
|
|
@ -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
|
||||
|
||||
|
|
|
|||
286
selftest.c
286
selftest.c
|
|
@ -47,7 +47,7 @@ static void raid5test(unsigned diskmax, unsigned block_size)
|
|||
{
|
||||
void* buffer_alloc;
|
||||
unsigned char** buffer;
|
||||
unsigned char* buffer_save;
|
||||
unsigned char* buffer_test;
|
||||
unsigned buffermax;
|
||||
unsigned i, j;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ static void raid5test(unsigned diskmax, unsigned block_size)
|
|||
|
||||
buffer = malloc_nofail_vector_align(buffermax, block_size, &buffer_alloc);
|
||||
|
||||
buffer_save = buffer[buffermax-1];
|
||||
buffer_test = buffer[buffermax-1];
|
||||
|
||||
/* fill with random */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
|
|
@ -63,20 +63,26 @@ static void raid5test(unsigned diskmax, unsigned block_size)
|
|||
buffer[i][j] = rand();
|
||||
}
|
||||
|
||||
/* compute the parity */
|
||||
raid_gen(1, buffer, diskmax, block_size);
|
||||
|
||||
for(i=0;i<diskmax;++i) {
|
||||
/* save the correct one */
|
||||
memcpy(buffer_save, buffer[i], block_size);
|
||||
unsigned char* a;
|
||||
|
||||
/* destroy it */
|
||||
memset(buffer[i], 0x55, block_size);
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test;
|
||||
|
||||
/* recover */
|
||||
raid5_recov_data(buffer, diskmax, block_size, i);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_save, buffer[i], block_size) != 0) {
|
||||
if (memcmp(buffer_test, buffer[i], block_size) != 0) {
|
||||
fprintf(stderr, "Failed RAID5 test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -90,20 +96,23 @@ static void raid6test(unsigned diskmax, unsigned block_size)
|
|||
{
|
||||
void* buffer_alloc;
|
||||
unsigned char** buffer;
|
||||
unsigned char* buffer_save0;
|
||||
unsigned char* buffer_save1;
|
||||
unsigned char* buffer_test0;
|
||||
unsigned char* buffer_test1;
|
||||
unsigned char* buffer_zero;
|
||||
unsigned char* buffer_bad;
|
||||
unsigned buffermax;
|
||||
unsigned i, j;
|
||||
|
||||
buffermax = diskmax + 2 + 2 + 1;
|
||||
buffermax = diskmax + 2 + 2 + 1 + 1;
|
||||
|
||||
buffer = malloc_nofail_vector_align(buffermax, block_size, &buffer_alloc);
|
||||
|
||||
buffer_save0 = buffer[buffermax-3];
|
||||
buffer_save1 = buffer[buffermax-2];
|
||||
buffer_zero = buffer[buffermax-1];
|
||||
buffer_test0 = buffer[buffermax-4];
|
||||
buffer_test1 = buffer[buffermax-3];
|
||||
buffer_zero = buffer[buffermax-2];
|
||||
buffer_bad = buffer[buffermax-1];
|
||||
memset(buffer_zero, 0, block_size);
|
||||
memset(buffer_bad, 0xA5, block_size);
|
||||
|
||||
/* fill with random */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
|
|
@ -111,25 +120,33 @@ static void raid6test(unsigned diskmax, unsigned block_size)
|
|||
buffer[i][j] = rand();
|
||||
}
|
||||
|
||||
/* compute the parity */
|
||||
raid_gen(2, buffer, diskmax, block_size);
|
||||
|
||||
/* check 2data */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
for(j=i+1;j<diskmax;++j) {
|
||||
/* save the correct ones */
|
||||
memcpy(buffer_save0, buffer[i], block_size);
|
||||
memcpy(buffer_save1, buffer[j], block_size);
|
||||
unsigned char* a;
|
||||
unsigned char* b;
|
||||
|
||||
/* destroy it */
|
||||
memset(buffer[i], 0x55, block_size);
|
||||
memset(buffer[j], 0x55, block_size);
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
b = buffer[j];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_test1;
|
||||
|
||||
/* recover */
|
||||
raid6_recov_2data(buffer, diskmax, block_size, i, j, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = b;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_save0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_save1, buffer[j], block_size) != 0
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_test1, buffer[j], block_size) != 0
|
||||
) {
|
||||
fprintf(stderr, "Failed RAID6 test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -139,24 +156,29 @@ static void raid6test(unsigned diskmax, unsigned block_size)
|
|||
|
||||
/* check datap */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
/* the other is the parity */
|
||||
unsigned char* a;
|
||||
unsigned char* p;
|
||||
|
||||
/* other is p */
|
||||
j = diskmax;
|
||||
|
||||
/* save the correct ones */
|
||||
memcpy(buffer_save0, buffer[i], block_size);
|
||||
memcpy(buffer_save1, buffer[j], block_size);
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
p = buffer[j];
|
||||
|
||||
/* destroy it */
|
||||
memset(buffer[i], 0x55, block_size);
|
||||
memset(buffer[j], 0x55, block_size);
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_bad;
|
||||
|
||||
/* recover */
|
||||
raid6_recov_datap(buffer, diskmax, block_size, i, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = p;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_save0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_save1, buffer[j], block_size) != 0
|
||||
) {
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0) {
|
||||
fprintf(stderr, "Failed RAID6 test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -166,6 +188,192 @@ static void raid6test(unsigned diskmax, unsigned block_size)
|
|||
free(buffer);
|
||||
}
|
||||
|
||||
static void raidTPtest(unsigned diskmax, unsigned block_size)
|
||||
{
|
||||
void* buffer_alloc;
|
||||
unsigned char** buffer;
|
||||
unsigned char* buffer_test0;
|
||||
unsigned char* buffer_test1;
|
||||
unsigned char* buffer_test2;
|
||||
unsigned char* buffer_zero;
|
||||
unsigned char* buffer_bad;
|
||||
unsigned buffermax;
|
||||
unsigned i, j, k;
|
||||
|
||||
buffermax = diskmax + 3 + 3 + 1 + 1;
|
||||
|
||||
buffer = malloc_nofail_vector_align(buffermax, block_size, &buffer_alloc);
|
||||
|
||||
buffer_test0 = buffer[buffermax-5];
|
||||
buffer_test1 = buffer[buffermax-4];
|
||||
buffer_test2 = buffer[buffermax-3];
|
||||
buffer_zero = buffer[buffermax-2];
|
||||
buffer_bad = buffer[buffermax-1];
|
||||
memset(buffer_zero, 0, block_size);
|
||||
memset(buffer_bad, 0xA5, block_size);
|
||||
|
||||
/* fill with random */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
for(j=0;j<block_size;++j)
|
||||
buffer[i][j] = rand();
|
||||
}
|
||||
|
||||
/* compute the parity */
|
||||
raid_gen(3, buffer, diskmax, block_size);
|
||||
|
||||
/* check 3data */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
for(j=i+1;j<diskmax;++j) {
|
||||
for(k=j+1;k<diskmax;++k) {
|
||||
unsigned char* a;
|
||||
unsigned char* b;
|
||||
unsigned char* c;
|
||||
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
b = buffer[j];
|
||||
c = buffer[k];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_test1;
|
||||
buffer[k] = buffer_test2;
|
||||
|
||||
/* recover */
|
||||
raidTP_recov_3data(buffer, diskmax, block_size, i, j, k, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = b;
|
||||
buffer[k] = c;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_test1, buffer[j], block_size) != 0
|
||||
|| memcmp(buffer_test2, buffer[k], block_size) != 0
|
||||
) {
|
||||
fprintf(stderr, "Failed RAIDTP test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check 2dataq */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
for(j=i+1;j<diskmax;++j) {
|
||||
unsigned char* a;
|
||||
unsigned char* b;
|
||||
unsigned char* q;
|
||||
|
||||
/* other is q */
|
||||
k = diskmax + 1;
|
||||
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
b = buffer[j];
|
||||
q = buffer[k];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_test1;
|
||||
buffer[k] = buffer_bad;
|
||||
|
||||
/* recover */
|
||||
raidTP_recov_2dataq(buffer, diskmax, block_size, i, j, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = b;
|
||||
buffer[k] = q;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_test1, buffer[j], block_size) != 0
|
||||
) {
|
||||
fprintf(stderr, "Failed RAIDTP test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check 2datap */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
for(j=i+1;j<diskmax;++j) {
|
||||
unsigned char* a;
|
||||
unsigned char* b;
|
||||
unsigned char* p;
|
||||
|
||||
/* other is p */
|
||||
k = diskmax;
|
||||
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
b = buffer[j];
|
||||
p = buffer[k];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_test1;
|
||||
buffer[k] = buffer_bad;
|
||||
|
||||
/* recover */
|
||||
raidTP_recov_2datap(buffer, diskmax, block_size, i, j, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = b;
|
||||
buffer[k] = p;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0
|
||||
|| memcmp(buffer_test1, buffer[j], block_size) != 0
|
||||
) {
|
||||
fprintf(stderr, "Failed RAIDTP test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* check datapq */
|
||||
for(i=0;i<diskmax;++i) {
|
||||
unsigned char* a;
|
||||
unsigned char* p;
|
||||
unsigned char* q;
|
||||
|
||||
/* others are p,q */
|
||||
j = diskmax;
|
||||
k = diskmax + 1;
|
||||
|
||||
/* save */
|
||||
a = buffer[i];
|
||||
p = buffer[j];
|
||||
q = buffer[k];
|
||||
|
||||
/* damage */
|
||||
buffer[i] = buffer_test0;
|
||||
buffer[j] = buffer_bad;
|
||||
buffer[k] = buffer_bad;
|
||||
|
||||
/* recover */
|
||||
raidTP_recov_datapq(buffer, diskmax, block_size, i, buffer_zero);
|
||||
|
||||
/* restore */
|
||||
buffer[i] = a;
|
||||
buffer[j] = p;
|
||||
buffer[k] = q;
|
||||
|
||||
/* check */
|
||||
if (memcmp(buffer_test0, buffer[i], block_size) != 0) {
|
||||
fprintf(stderr, "Failed RAIDTP test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
free(buffer_alloc);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
#define HASH_TEST_MAX 512 /* tests are never longer than 512 bytes */
|
||||
|
||||
static void hashtest(void)
|
||||
|
|
@ -201,7 +409,7 @@ static void hashtest(void)
|
|||
memcpy(buffer_aligned, TEST_MURMUR3[i].data, TEST_MURMUR3[i].len);
|
||||
memhash(HASH_MURMUR3, seed_aligned, digest, buffer_aligned, TEST_MURMUR3[i].len);
|
||||
if (memcmp(digest, TEST_MURMUR3[i].digest, HASH_SIZE) != 0) {
|
||||
fprintf(stderr, "Failed Murmur3 test vector\n");
|
||||
fprintf(stderr, "Failed Murmur3 test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -211,7 +419,7 @@ static void hashtest(void)
|
|||
memcpy(buffer_aligned, TEST_SPOOKY2[i].data, TEST_SPOOKY2[i].len);
|
||||
memhash(HASH_SPOOKY2, seed_aligned, digest, buffer_aligned, TEST_SPOOKY2[i].len);
|
||||
if (memcmp(digest, TEST_SPOOKY2[i].digest, HASH_SIZE) != 0) {
|
||||
fprintf(stderr, "Failed Spooky2 test vector %u\n", i);
|
||||
fprintf(stderr, "Failed Spooky2 test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -258,7 +466,7 @@ static void crc32ctest(void)
|
|||
uint32_t digest;
|
||||
digest = crc32c(0, (const unsigned char*)TEST_CRC32C[i].data, TEST_CRC32C[i].len);
|
||||
if (digest != TEST_CRC32C[i].digest) {
|
||||
fprintf(stderr, "Failed CRC32C test vector %u\n", i);
|
||||
fprintf(stderr, "Failed CRC32C test\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -266,8 +474,6 @@ static void crc32ctest(void)
|
|||
|
||||
void selftest(int gui)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if (gui) {
|
||||
fprintf(stdlog, "selftest:\n");
|
||||
fflush(stdlog);
|
||||
|
|
@ -283,10 +489,8 @@ void selftest(int gui)
|
|||
|
||||
hashtest();
|
||||
crc32ctest();
|
||||
|
||||
for(i=1;i<=33;++i) {
|
||||
raid5test(i, 2048);
|
||||
raid6test(i, 2048);
|
||||
}
|
||||
raid5test(33, 2048);
|
||||
raid6test(33, 2048);
|
||||
raidTPtest(33, 2048);
|
||||
}
|
||||
|
||||
|
|
|
|||
46
speed.c
46
speed.c
|
|
@ -155,12 +155,24 @@ void speed(void)
|
|||
else
|
||||
printf("int32x2");
|
||||
printf("\n");
|
||||
printf("Expected fastest RAIDTP is ");
|
||||
if (cpu_has_sse2())
|
||||
#if defined(__x86_64__)
|
||||
printf("sse2x2");
|
||||
#else
|
||||
printf("sse2x1");
|
||||
#endif
|
||||
else if (cpu_has_mmx())
|
||||
printf("mmxx1");
|
||||
else
|
||||
printf("int32x2");
|
||||
printf("\n");
|
||||
#endif
|
||||
printf("If these expectations are false, please report it in the SnapRAID forum\n");
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("Speed test with %d disk and %d buffer size, for a total of %u KiB...\n", diskmax, block_size, (diskmax + 2) * block_size / 1024);
|
||||
printf("Speed test with %d disk and %d buffer size, for a total of %u KiB...\n", diskmax, block_size, (diskmax + 3) * block_size / 1024);
|
||||
|
||||
SPEED_START {
|
||||
for(j=0;j<diskmax;++j) {
|
||||
|
|
@ -281,6 +293,38 @@ void speed(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
SPEED_START {
|
||||
raidTP_int32r2(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("RAIDTP int32x2 %"PRIu64" [MB/s]\n", ds / dt);
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
if (cpu_has_mmx()) {
|
||||
SPEED_START {
|
||||
raidTP_mmxr1(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("RAIDTP mmxr1 %"PRIu64" [MB/s]\n", ds / dt);
|
||||
}
|
||||
|
||||
if (cpu_has_sse2()) {
|
||||
SPEED_START {
|
||||
raidTP_sse2r1(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("RAIDTP sse2x1 %"PRIu64" [MB/s]\n", ds / dt);
|
||||
|
||||
#if defined(__x86_64__)
|
||||
SPEED_START {
|
||||
raidTP_sse2r2(buffer, diskmax, block_size);
|
||||
} SPEED_STOP
|
||||
|
||||
printf("RAIDTP sse2x2 %"PRIu64" [MB/s]\n", ds / dt);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
free(buffer_alloc);
|
||||
free(buffer);
|
||||
}
|
||||
|
|
|
|||
81
tables.h
81
tables.h
|
|
@ -15,7 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const unsigned char __attribute__((aligned(256))) raid6_gfmul[256][256] =
|
||||
const unsigned char __attribute__((aligned(256))) gfmul[256][256] =
|
||||
{
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
@ -8723,7 +8723,7 @@ const unsigned char __attribute__((aligned(256))) raid6_gfmul[256][256] =
|
|||
},
|
||||
};
|
||||
|
||||
const unsigned char __attribute__((aligned(256))) raid6_gfexp[256] =
|
||||
const unsigned char __attribute__((aligned(256))) gfexp2[256] =
|
||||
{
|
||||
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
|
||||
0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,
|
||||
|
|
@ -8757,10 +8757,49 @@ const unsigned char __attribute__((aligned(256))) raid6_gfexp[256] =
|
|||
0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,
|
||||
0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83,
|
||||
0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00,
|
||||
/* note that the last element is not significative */
|
||||
};
|
||||
|
||||
const unsigned char __attribute__((aligned(256))) raid6_gfinv[256] =
|
||||
const unsigned char __attribute__((aligned(256))) gfexp4[256] =
|
||||
{
|
||||
0x01, 0x04, 0x10, 0x40, 0x1d, 0x74, 0xcd, 0x13,
|
||||
0x4c, 0x2d, 0xb4, 0xea, 0x8f, 0x06, 0x18, 0x60,
|
||||
0x9d, 0x4e, 0x25, 0x94, 0x6a, 0xb5, 0xee, 0x9f,
|
||||
0x46, 0x05, 0x14, 0x50, 0x5d, 0x69, 0xb9, 0xde,
|
||||
0x5f, 0x61, 0x99, 0x5e, 0x65, 0x89, 0x1e, 0x78,
|
||||
0xfd, 0xd3, 0x6b, 0xb1, 0xfe, 0xdf, 0x5b, 0x71,
|
||||
0xd9, 0x43, 0x11, 0x44, 0x0d, 0x34, 0xd0, 0x67,
|
||||
0x81, 0x3e, 0xf8, 0xc7, 0x3b, 0xec, 0x97, 0x66,
|
||||
0x85, 0x2e, 0xb8, 0xda, 0x4f, 0x21, 0x84, 0x2a,
|
||||
0xa8, 0x9a, 0x52, 0x55, 0x49, 0x39, 0xe4, 0xb7,
|
||||
0xe6, 0xbf, 0xc6, 0x3f, 0xfc, 0xd7, 0x7b, 0xf1,
|
||||
0xe3, 0xab, 0x96, 0x62, 0x95, 0x6e, 0xa5, 0xae,
|
||||
0x82, 0x32, 0xc8, 0x07, 0x1c, 0x70, 0xdd, 0x53,
|
||||
0x51, 0x59, 0x79, 0xf9, 0xc3, 0x2b, 0xac, 0x8a,
|
||||
0x12, 0x48, 0x3d, 0xf4, 0xf7, 0xfb, 0xcb, 0x0b,
|
||||
0x2c, 0xb0, 0xfa, 0xcf, 0x1b, 0x6c, 0xad, 0x8e,
|
||||
0x02, 0x08, 0x20, 0x80, 0x3a, 0xe8, 0x87, 0x26,
|
||||
0x98, 0x5a, 0x75, 0xc9, 0x03, 0x0c, 0x30, 0xc0,
|
||||
0x27, 0x9c, 0x4a, 0x35, 0xd4, 0x77, 0xc1, 0x23,
|
||||
0x8c, 0x0a, 0x28, 0xa0, 0xba, 0xd2, 0x6f, 0xa1,
|
||||
0xbe, 0xc2, 0x2f, 0xbc, 0xca, 0x0f, 0x3c, 0xf0,
|
||||
0xe7, 0xbb, 0xd6, 0x7f, 0xe1, 0xa3, 0xb6, 0xe2,
|
||||
0xaf, 0x86, 0x22, 0x88, 0x1a, 0x68, 0xbd, 0xce,
|
||||
0x1f, 0x7c, 0xed, 0x93, 0x76, 0xc5, 0x33, 0xcc,
|
||||
0x17, 0x5c, 0x6d, 0xa9, 0x9e, 0x42, 0x15, 0x54,
|
||||
0x4d, 0x29, 0xa4, 0xaa, 0x92, 0x72, 0xd5, 0x73,
|
||||
0xd1, 0x63, 0x91, 0x7e, 0xe5, 0xb3, 0xf6, 0xff,
|
||||
0xdb, 0x4b, 0x31, 0xc4, 0x37, 0xdc, 0x57, 0x41,
|
||||
0x19, 0x64, 0x8d, 0x0e, 0x38, 0xe0, 0xa7, 0xa6,
|
||||
0xa2, 0xb2, 0xf2, 0xef, 0x9b, 0x56, 0x45, 0x09,
|
||||
0x24, 0x90, 0x7a, 0xf5, 0xf3, 0xeb, 0x8b, 0x16,
|
||||
0x58, 0x7d, 0xe9, 0x83, 0x36, 0xd8, 0x47, 0x00,
|
||||
/* note that the last element is not significative */
|
||||
};
|
||||
|
||||
const unsigned char __attribute__((aligned(256))) gfinv[256] =
|
||||
{
|
||||
/* note that the first element is not significative */
|
||||
0x00, 0x01, 0x8e, 0xf4, 0x47, 0xa7, 0x7a, 0xba,
|
||||
0xad, 0x9d, 0xdd, 0x98, 0x3d, 0xaa, 0x5d, 0x96,
|
||||
0xd8, 0x72, 0xc0, 0x58, 0xe0, 0x3e, 0x4c, 0x66,
|
||||
|
|
@ -8795,39 +8834,3 @@ const unsigned char __attribute__((aligned(256))) raid6_gfinv[256] =
|
|||
0x42, 0xd4, 0xe8, 0x75, 0x7f, 0xff, 0x7e, 0xfd,
|
||||
};
|
||||
|
||||
const unsigned char __attribute__((aligned(256))) raid6_gfexi[256] =
|
||||
{
|
||||
0x00, 0xf4, 0xa7, 0x9d, 0x72, 0xed, 0x5f, 0x54,
|
||||
0xa0, 0xa9, 0xfb, 0x74, 0x85, 0xe4, 0xc0, 0x8a,
|
||||
0x67, 0xdc, 0x26, 0x63, 0xf2, 0xe9, 0xb4, 0xd2,
|
||||
0x02, 0x8e, 0xba, 0xaa, 0xde, 0x89, 0x57, 0x59,
|
||||
0xac, 0x2c, 0x93, 0x09, 0x60, 0x1e, 0xbc, 0xa4,
|
||||
0xb3, 0x43, 0xeb, 0xda, 0x6a, 0x12, 0xc7, 0x39,
|
||||
0x04, 0x69, 0x47, 0x98, 0x3e, 0xd0, 0x23, 0x82,
|
||||
0x97, 0x7b, 0x52, 0xf6, 0xc5, 0x2f, 0x91, 0x1c,
|
||||
0x37, 0xb6, 0x24, 0x35, 0x0b, 0x33, 0x41, 0x9a,
|
||||
0xb9, 0x5a, 0x49, 0x5d, 0x2a, 0x0c, 0x77, 0xe7,
|
||||
0x7f, 0xe2, 0xc8, 0x07, 0xef, 0xd6, 0x87, 0xfe,
|
||||
0xfd, 0x14, 0x19, 0x9f, 0xcb, 0xaf, 0x28, 0xf0,
|
||||
0x10, 0xbe, 0xf8, 0xb0, 0xd8, 0x51, 0x4e, 0x31,
|
||||
0x3d, 0x80, 0xc3, 0x8d, 0x71, 0x95, 0x17, 0x3a,
|
||||
0x1b, 0x4b, 0xe1, 0xcd, 0xd4, 0x6d, 0xa3, 0x44,
|
||||
0xcf, 0x79, 0x21, 0x65, 0x0f, 0x6f, 0x4d, 0x7d,
|
||||
0x7c, 0x4c, 0x6e, 0x0e, 0x64, 0x20, 0x78, 0xce,
|
||||
0x45, 0xa2, 0x6c, 0xd5, 0xcc, 0xe0, 0x4a, 0x1a,
|
||||
0x3b, 0x16, 0x94, 0x70, 0x8c, 0xc2, 0x81, 0x3c,
|
||||
0x30, 0x4f, 0x50, 0xd9, 0xb1, 0xf9, 0xbf, 0x11,
|
||||
0xf1, 0x29, 0xae, 0xca, 0x9e, 0x18, 0x15, 0xfc,
|
||||
0xff, 0x86, 0xd7, 0xee, 0x06, 0xc9, 0xe3, 0x7e,
|
||||
0xe6, 0x76, 0x0d, 0x2b, 0x5c, 0x48, 0x5b, 0xb8,
|
||||
0x9b, 0x40, 0x32, 0x0a, 0x34, 0x25, 0xb7, 0x36,
|
||||
0x1d, 0x90, 0x2e, 0xc4, 0xf7, 0x53, 0x7a, 0x96,
|
||||
0x83, 0x22, 0xd1, 0x3f, 0x99, 0x46, 0x68, 0x05,
|
||||
0x38, 0xc6, 0x13, 0x6b, 0xdb, 0xea, 0x42, 0xb2,
|
||||
0xa5, 0xbd, 0x1f, 0x61, 0x08, 0x92, 0x2d, 0xad,
|
||||
0x58, 0x56, 0x88, 0xdf, 0xab, 0xbb, 0x8f, 0x03,
|
||||
0xd3, 0xb5, 0xe8, 0xf3, 0x62, 0x27, 0xdd, 0x66,
|
||||
0x8b, 0xc1, 0xe5, 0x84, 0x75, 0xfa, 0xa8, 0xa1,
|
||||
0x55, 0x5e, 0xec, 0x73, 0x9c, 0xa6, 0xf5, 0x01,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue