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

DORMANTno replies

From: Labun, Marcin <hidden>
Date: 2011-03-08 15:21:22
Subsystem: the rest · Maintainer: Linus Torvalds

From 73b912949a06e9ee9a75777216ff4f4d75c48194 Mon Sep 17 00:00:00 2001
From: Marcin Labun <redacted>
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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help