21 #include <linux/export.h>
25 static void raid6_2data_recov_intx1(
int disks,
size_t bytes,
int faila,
26 int failb,
void **
ptrs)
33 p = (
u8 *)ptrs[disks-2];
34 q = (
u8 *)ptrs[disks-1];
39 dp = (
u8 *)ptrs[faila];
40 ptrs[faila] = (
void *)raid6_empty_zero_page;
42 dq = (
u8 *)ptrs[failb];
43 ptrs[failb] = (
void *)raid6_empty_zero_page;
55 pbmul = raid6_gfmul[raid6_gfexi[failb-faila]];
56 qmul = raid6_gfmul[raid6_gfinv[raid6_gfexp[faila]^raid6_gfexp[failb]]];
62 *dq++ = db = pbmul[px] ^ qx;
69 static void raid6_datap_recov_intx1(
int disks,
size_t bytes,
int faila,
75 p = (
u8 *)ptrs[disks-2];
76 q = (
u8 *)ptrs[disks-1];
80 dq = (
u8 *)ptrs[faila];
81 ptrs[faila] = (
void *)raid6_empty_zero_page;
91 qmul = raid6_gfmul[raid6_gfinv[raid6_gfexp[faila]]];
95 *p++ ^= *dq = qmul[*q ^ *
dq];
102 .data2 = raid6_2data_recov_intx1,
103 .datap = raid6_datap_recov_intx1,
115 if ( faila > failb ) {
121 if ( failb == disks-1 ) {
122 if ( faila == disks-2 ) {
131 if ( failb == disks-2 ) {