Re: [PATCH v2] Avoid OOPS when reshaping raid1 to raid0

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

 



On Mon, 26 Mar 2012 10:31:25 +0200 Jes.Sorensen@xxxxxxxxxx wrote:

> From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> 
> raid1 arrays do not have the notion of chunk size. Calculate the
> larges chunk sector size we can use to avoid a divide by zero OOPS
> when aligning the size of the new array to the chunk size.
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Thanks.
Applied with one change:

>  	/* Set new parameters */
>  	mddev->new_level = 0;
>  	mddev->new_layout = 0;
>  	mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */

I changed the above line to
	mddev->new_chunk_sectors = chunksect;

as that makes more sense.

Thanks,
NeilBrown


> +	mddev->chunk_sectors = chunksect;
>  	mddev->delta_disks = 1 - mddev->raid_disks;
>  	mddev->raid_disks = 1;
>  	/* make sure it will be not marked as dirty */

Attachment: signature.asc
Description: PGP signature


[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