summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorMaciej Trela <maciej.trela@intel.com>2010-06-16 12:55:14 +0200
committerNeilBrown <neilb@suse.de>2010-06-24 05:34:45 +0200
commit001048a318d48e93cb6a1246f3b20335b2a7c855 (patch)
tree82a90465d46b9f495ceee52ef24dee9ada3a9827 /drivers/md/raid0.c
parentmd: fix raid10 takeover: use new_layout for setup_conf (diff)
downloadlinux-001048a318d48e93cb6a1246f3b20335b2a7c855.tar.xz
linux-001048a318d48e93cb6a1246f3b20335b2a7c855.zip
md: clear layout after ->raid0 takeover
After takeover from raid5/10 -> raid0 mddev->layout is not cleared. Signed-off-by: Maciej Trela <maciej.trela@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c2
1 files changed, 2 insertions, 0 deletions
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;