From: Maciej Trela Date: Wed, 16 Jun 2010 10:55:14 +0000 (+0100) Subject: md: clear layout after ->raid0 takeover X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=001048a318d48e93cb6a1246f3b20335b2a7c855;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git md: clear layout after ->raid0 takeover After takeover from raid5/10 -> raid0 mddev->layout is not cleared. Signed-off-by: Maciej Trela Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 7c7c38058bc2..ac09b7d38553 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -592,6 +592,7 @@ static void *raid0_takeover_raid5(mddev_t *mddev) /* Set new parameters */ mddev->new_level = 0; + mddev->new_layout = 0; mddev->new_chunk_sectors = mddev->chunk_sectors; mddev->raid_disks--; mddev->delta_disks = -1; @@ -631,6 +632,7 @@ static void *raid0_takeover_raid10(mddev_t *mddev) /* Set new parameters */ mddev->new_level = 0; + mddev->new_layout = 0; mddev->new_chunk_sectors = mddev->chunk_sectors; mddev->delta_disks = - mddev->raid_disks / 2; mddev->raid_disks += mddev->delta_disks;