On Tue, Nov 26, 2019 at 1:17 AM Zhengyuan Liu <liuzhengyuan@xxxxxxxxxx> wrote: > > For raid6, we need at least 4 disks to calculate the best algorithm. > But, currently we assume we are always under 4k PAGE_SIZE, when come > to larger page size, such as 64K, we may get a wrong xor() and gen(). Please provide more information about the error. Something like "function x() will generate wrong value." > > This patch tries to fix the problem by supporting arbitrarily page size. > > Signed-off-by: Zhengyuan Liu <liuzhengyuan@xxxxxxxxxx> > --- > lib/raid6/algos.c | 25 +++++++++++++++---------- > 1 file changed, 15 insertions(+), 10 deletions(-) > > diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c > index 17417ee..0df7d99 100644 > --- a/lib/raid6/algos.c > +++ b/lib/raid6/algos.c > @@ -118,6 +118,7 @@ const struct raid6_recov_calls *const raid6_recov_algos[] = { > > #ifdef __KERNEL__ > #define RAID6_TIME_JIFFIES_LG2 4 > +#define RAID6_DATA_BLOCK_LEN 4096 Why define this inside "#ifdef __KERNEL__"? This would break ! __KERNEL__ case, right? Have you tried this with lib/raid6/test/ ? Thanks, Song