imsm: FIX: Check layout for level migration
When user doesn't specify raid 5 layout for raid0->rai5 migration, layout structure member is uninitialized. Earlier it cannot be determined if it is correct or not. In metadata handle proper verification is placed. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
3ef4403cf6
commit
e13ce846aa
|
@ -8277,7 +8277,6 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
|
||||||
int chunk;
|
int chunk;
|
||||||
|
|
||||||
getinfo_super_imsm_volume(st, &info, NULL);
|
getinfo_super_imsm_volume(st, &info, NULL);
|
||||||
|
|
||||||
if ((geo->level != info.array.level) &&
|
if ((geo->level != info.array.level) &&
|
||||||
(geo->level >= 0) &&
|
(geo->level >= 0) &&
|
||||||
(geo->level != UnSet)) {
|
(geo->level != UnSet)) {
|
||||||
|
@ -8285,6 +8284,14 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
|
||||||
case 0:
|
case 0:
|
||||||
if (geo->level == 5) {
|
if (geo->level == 5) {
|
||||||
change = CH_MIGRATION;
|
change = CH_MIGRATION;
|
||||||
|
if (geo->layout != ALGORITHM_LEFT_ASYMMETRIC) {
|
||||||
|
fprintf(stderr,
|
||||||
|
Name " Error. Requested Layout "
|
||||||
|
"not supported (left-asymmetric layout "
|
||||||
|
"is supported only)!\n");
|
||||||
|
change = -1;
|
||||||
|
goto analyse_change_exit;
|
||||||
|
}
|
||||||
check_devs = 1;
|
check_devs = 1;
|
||||||
}
|
}
|
||||||
if (geo->level == 10) {
|
if (geo->level == 10) {
|
||||||
|
|
Loading…
Reference in New Issue