Commit f7bee809 authored by Krzysztof Wojcik's avatar Krzysztof Wojcik Committed by NeilBrown

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: default avatarKrzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 02214dc5
...@@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev) ...@@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev)
mddev->new_layout = 0; mddev->new_layout = 0;
mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */ mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
mddev->delta_disks = 1 - mddev->raid_disks; mddev->delta_disks = 1 - mddev->raid_disks;
mddev->raid_disks = 1;
/* make sure it will be not marked as dirty */ /* make sure it will be not marked as dirty */
mddev->recovery_cp = MaxSector; mddev->recovery_cp = MaxSector;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment