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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;