[PATCH 11/14] imsm: verify that component disks are attached to thesame type of HBA

[PATCH 11/14] imsm: verify that component disks are attached to thesame type of HBA

am 08.03.2011 16:21:22 von Marcin.Labun

From 73b912949a06e9ee9a75777216ff4f4d75c48194 Mon Sep 17 00:00:00 2001
From: Marcin Labun
Date: Thu, 3 Mar 2011 15:40:34 +0100
Subject: [PATCH 11/14] 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
---
super-intel.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index b9f8c9c..01f82ac 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2206,6 +2206,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
--
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html