diff options
author | Labun, Marcin <Marcin.Labun@intel.com> | 2011-03-10 11:50:57 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-10 11:50:57 +1100 |
commit | 8603ea6f221478067e1f50cf1b4d54661403911b (patch) | |
tree | 5a83aec97dc09a5852e8774b60742d9cadbff507 /super-intel.c | |
parent | 73408129505ddddc2559ec944ae83c6a1c8ec0f6 (diff) |
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>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c index 663ce2df..3dc89991 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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 |