Re: [PATCH 07/13] Grow: add missing raid4 geometries to geo_map()

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

 



On Thu, 18 Nov 2010 10:22:17 +0100
Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx> wrote:

> From: Dan Williams <dan.j.williams@xxxxxxxxx>
> 
> They are equivalent to their raid5 versions and let the reshape code
> optionally use either.
> 
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---
>  restripe.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/restripe.c b/restripe.c
> index 3074693..c2fbe5b 100644
> --- a/restripe.c
> +++ b/restripe.c
> @@ -46,6 +46,7 @@ static int geo_map(int block, unsigned long long stripe, int raid_disks,
>  	switch(level*100 + layout) {
>  	case 000:
>  	case 400:
> +	case 400 + ALGORITHM_PARITY_N:
>  	case 500 + ALGORITHM_PARITY_N:
>  		/* raid 4 isn't messed around by parity blocks */
>  		if (block == -1)
> @@ -75,6 +76,7 @@ static int geo_map(int block, unsigned long long stripe, int raid_disks,
>  		if (block == -1) return pd;
>  		return (pd + 1 + block) % raid_disks;
>  
> +	case 400 + ALGORITHM_PARITY_0:
>  	case 500 + ALGORITHM_PARITY_0:
>  		return block + 1;
>  

I'm not sure about this.
In the kernel, raid4 ignores the 'layout'.  So it seems safest to do the same
in mdadm, and always use a level of '5' when we want PARITY_0.

Why is this needed exactly?

Thanks,
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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