Grow: Add paranoid level checking to analyse_change.
Just in case array.level is ever something that we don't expect, make sure we report an error clearly rather than get confused. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
e2f41b2c6a
commit
90b60dfa48
2
Grow.c
2
Grow.c
|
@ -929,6 +929,8 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
|
||||||
info->new_chunk = info->array.chunk_size;
|
info->new_chunk = info->array.chunk_size;
|
||||||
|
|
||||||
switch (info->array.level) {
|
switch (info->array.level) {
|
||||||
|
default:
|
||||||
|
return "Cannot understand this RAID level";
|
||||||
case 1:
|
case 1:
|
||||||
/* RAID1 can convert to RAID1 with different disks, or
|
/* RAID1 can convert to RAID1 with different disks, or
|
||||||
* raid5 with 2 disks, or
|
* raid5 with 2 disks, or
|
||||||
|
|
Loading…
Reference in New Issue