Re: [PATCH] md/raid6: fix algorithm choice under larger PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux