Skip to content

Commit

Permalink
md: clear layout after ->raid0 takeover
Browse files Browse the repository at this point in the history
After takeover from raid5/10 -> raid0 mddev->layout is not cleared.

Signed-off-by: Maciej Trela <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
  • Loading branch information
Maciej Trela authored and neilbrown committed Jun 24, 2010
1 parent f73ea87 commit 001048a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 001048a

Please sign in to comment.