summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
authorKrzysztof Wojcik <krzysztof.wojcik@intel.com>2011-02-14 10:01:41 +1100
committerNeilBrown <neilb@suse.de>2011-02-14 10:01:41 +1100
commitf7bee80945155ad0326916486dabc38428c6cdef (patch)
treeadf054c298371d181aa2b3885425bcb766f3deb6 /drivers/md/raid0.c
parent02214dc5461c36da26a34014cab4e1bb484edba2 (diff)
downloadlinux-f7bee80945155ad0326916486dabc38428c6cdef.tar.bz2
md: Fix raid1->raid0 takeover
Takeover raid1->raid0 not succeded. Kernel message is shown: "md/raid0:md126: too few disks (1 of 2) - aborting!" Problem was that we weren't updating ->raid_disks for that takeover, unlike all the others. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 637a96855edb..75671dfee551 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev)
mddev->new_layout = 0;
mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
mddev->delta_disks = 1 - mddev->raid_disks;
+ mddev->raid_disks = 1;
/* make sure it will be not marked as dirty */
mddev->recovery_cp = MaxSector;