mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
f73ea87375
commit
001048a318
@ -592,6 +592,7 @@ static void *raid0_takeover_raid5(mddev_t *mddev)
|
|||||||
|
|
||||||
/* Set new parameters */
|
/* Set new parameters */
|
||||||
mddev->new_level = 0;
|
mddev->new_level = 0;
|
||||||
|
mddev->new_layout = 0;
|
||||||
mddev->new_chunk_sectors = mddev->chunk_sectors;
|
mddev->new_chunk_sectors = mddev->chunk_sectors;
|
||||||
mddev->raid_disks--;
|
mddev->raid_disks--;
|
||||||
mddev->delta_disks = -1;
|
mddev->delta_disks = -1;
|
||||||
@ -631,6 +632,7 @@ static void *raid0_takeover_raid10(mddev_t *mddev)
|
|||||||
|
|
||||||
/* Set new parameters */
|
/* Set new parameters */
|
||||||
mddev->new_level = 0;
|
mddev->new_level = 0;
|
||||||
|
mddev->new_layout = 0;
|
||||||
mddev->new_chunk_sectors = mddev->chunk_sectors;
|
mddev->new_chunk_sectors = mddev->chunk_sectors;
|
||||||
mddev->delta_disks = - mddev->raid_disks / 2;
|
mddev->delta_disks = - mddev->raid_disks / 2;
|
||||||
mddev->raid_disks += mddev->delta_disks;
|
mddev->raid_disks += mddev->delta_disks;
|
||||||
|
Loading…
Reference in New Issue
Block a user