aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-17 01:14:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-17 02:15:32 -0500
commit17115e0388ece8d7141c0282c88e7dfc61953f92 (patch)
tree80009eb4e7158a6c57de447901a04de3f799135d /drivers/md/md.c
parent4c2645830e29c082217662e7486572e9637e9f1d (diff)
[PATCH] md: Clear clevel whenever level is set.
The 'level' of an md array can be set as either a number of a string. When one is set, the other must be marked 'undefined'. This wasn't being done in one place: where new arrays are created. Result: if md1 is a raid1, it is stopped and a raid5 is created there, it might still appear to be a raid1. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 1778104e106c..7145cd150f7b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3395,6 +3395,7 @@ static int set_array_info(mddev_t * mddev, mdu_array_info_t *info)
3395 mddev->ctime = get_seconds(); 3395 mddev->ctime = get_seconds();
3396 3396
3397 mddev->level = info->level; 3397 mddev->level = info->level;
3398 mddev->clevel[0] = 0;
3398 mddev->size = info->size; 3399 mddev->size = info->size;
3399 mddev->raid_disks = info->raid_disks; 3400 mddev->raid_disks = info->raid_disks;
3400 /* don't set md_minor, it is determined by which /dev/md* was 3401 /* don't set md_minor, it is determined by which /dev/md* was