imsm: verify that component disks are attached to the same type of HBA

compare_super_imsm verifies that the component disks use the same type of HBA
in platform dependent environment. Otherwise print-out error message and block
the action.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Labun, Marcin 2011-03-10 11:50:57 +11:00 committed by NeilBrown
parent 7340812950
commit 8603ea6f22
1 changed files with 12 additions and 0 deletions

View File

@ -2207,6 +2207,18 @@ static int compare_super_imsm(struct supertype *st, struct supertype *tst)
tst->sb = NULL;
return 0;
}
/* in platform dependent environment test if the disks
* use the same Intel hba
*/
if (!check_env("IMSM_NO_PLATFORM")) {
if (first->hba->type != sec->hba->type) {
fprintf(stderr,
"HBAs of devices does not match %s != %s\n",
get_sys_dev_type(first->hba->type),
get_sys_dev_type(sec->hba->type));
return 3;
}
}
/* if an anchor does not have num_raid_devs set then it is a free
* floating spare