Re: [PATCH 1/3] md: fix raid10 takeover: use new_layout for setup_conf

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

 



On Wed, 16 Jun 2010 11:46:29 +0100
"Trela, Maciej" <Maciej.Trela@xxxxxxxxx> wrote:

> From: Maciej Trela <maciej.trela@xxxxxxxxx>
> 
> Use mddev->new_layout in setup_conf.

Thanks.
I added changed for ->chunk_sectors to ->new_chunk_sectors
and removed the setting of ->degraded in takeover().

Applied.

NeilBrown

> 
> Signed-off-by: Maciej Trela <maciej.trela@xxxxxxxxx>
> ---
>  drivers/md/raid10.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 9f65dc5..7b47639 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -2169,14 +2169,14 @@ static conf_t *setup_conf(mddev_t *mddev)
>  		goto out;
>  	}
>  
> -	nc = mddev->layout & 255;
> -	fc = (mddev->layout >> 8) & 255;
> -	fo = mddev->layout & (1<<16);
> +	nc = mddev->new_layout & 255;
> +	fc = (mddev->new_layout >> 8) & 255;
> +	fo = mddev->new_layout & (1<<16);
>  
>  	if ((nc*fc) <2 || (nc*fc) > mddev->raid_disks ||
> -	    (mddev->layout >> 17)) {
> +	    (mddev->new_layout >> 17)) {
>  		printk(KERN_ERR "md/raid10:%s: unsupported raid10 layout: 0x%8x\n",
> -		       mdname(mddev), mddev->layout);
> +		       mdname(mddev), mddev->new_layout);
>  		goto out;
>  	}

--
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