summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2001-01-26 04:40:03 +0000
committeroster <oster@NetBSD.org>2001-01-26 04:40:03 +0000
commita40eef11ac17207ed8a1f06d7f150e0327fe22a4 (patch)
treea77345c89a7df478f9204804a53cb0d583f95e44 /sys/dev/raidframe
parent61a2ee28fb97e2f21d3367f28243515b159df4cf (diff)
Give the parity declustering code their own 'RAID arch' types, and
allow us to turn them off if desired.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_archs.h5
-rw-r--r--sys/dev/raidframe/rf_decluster.c10
-rw-r--r--sys/dev/raidframe/rf_declusterPQ.c6
-rw-r--r--sys/dev/raidframe/rf_layout.c6
4 files changed, 21 insertions, 6 deletions
diff --git a/sys/dev/raidframe/rf_archs.h b/sys/dev/raidframe/rf_archs.h
index 36a96872770..beaa760a77a 100644
--- a/sys/dev/raidframe/rf_archs.h
+++ b/sys/dev/raidframe/rf_archs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_archs.h,v 1.9 2000/03/04 03:27:13 oster Exp $ */
+/* $NetBSD: rf_archs.h,v 1.10 2001/01/26 04:40:03 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -56,6 +56,9 @@
#define RF_INCLUDE_CHAINDECLUSTER 1
#define RF_INCLUDE_INTERDECLUSTER 1
+#define RF_INCLUDE_PARITY_DECLUSTERING 0
+#define RF_INCLUDE_PARITY_DECLUSTERING_DS 0
+
#define RF_INCLUDE_RAID0 1
#define RF_INCLUDE_RAID1 1
#define RF_INCLUDE_RAID4 1
diff --git a/sys/dev/raidframe/rf_decluster.c b/sys/dev/raidframe/rf_decluster.c
index a3808228463..0d95fc4dc86 100644
--- a/sys/dev/raidframe/rf_decluster.c
+++ b/sys/dev/raidframe/rf_decluster.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_decluster.c,v 1.5 2000/03/07 01:54:29 oster Exp $ */
+/* $NetBSD: rf_decluster.c,v 1.6 2001/01/26 04:40:03 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -47,6 +47,7 @@
*
*--------------------------------------------------------------------*/
+#include "rf_archs.h"
#include "rf_types.h"
#include "rf_raid.h"
#include "rf_raidframe.h"
@@ -58,11 +59,14 @@
#include "rf_general.h"
#include "rf_shutdown.h"
+
extern int rf_copyback_in_progress; /* debug only */
/* found in rf_kintf.c */
int rf_GetSpareTableFromDaemon(RF_SparetWait_t * req);
+#if (RF_INCLUDE_PARITY_DECLUSTERING > 0) || (RF_INCLUDE_PARITY_DECLUSTERING_PQ > 0)
+
/* configuration code */
int
@@ -645,6 +649,9 @@ rf_remap_to_spare_space(
}
}
+#endif /* (RF_INCLUDE_PARITY_DECLUSTERING > 0) || (RF_INCLUDE_PARITY_DECLUSTERING_PQ > 0) */
+
+
int
rf_InstallSpareTable(
RF_Raid_t * raidPtr,
@@ -720,7 +727,6 @@ rf_GetNumSpareRUsDeclustered(raidPtr)
return (((RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo)->TotSparePUsPerDisk);
}
-
void
rf_FreeSpareTable(raidPtr)
RF_Raid_t *raidPtr;
diff --git a/sys/dev/raidframe/rf_declusterPQ.c b/sys/dev/raidframe/rf_declusterPQ.c
index 17a3dbdde2d..e69f78b917e 100644
--- a/sys/dev/raidframe/rf_declusterPQ.c
+++ b/sys/dev/raidframe/rf_declusterPQ.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_declusterPQ.c,v 1.3 1999/02/05 00:06:09 oster Exp $ */
+/* $NetBSD: rf_declusterPQ.c,v 1.4 2001/01/26 04:40:03 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -34,7 +34,7 @@
*
*--------------------------------------------------*/
-
+#include "rf_archs.h"
#include "rf_types.h"
#include "rf_raid.h"
#include "rf_configure.h"
@@ -45,6 +45,7 @@
#include "rf_alloclist.h"
#include "rf_general.h"
+#if (RF_INCLUDE_PARITY_DECLUSTERING_PQ > 0)
/* configuration code */
int
@@ -486,3 +487,4 @@ rf_IdentifyStripeDeclusteredPQ(
* block design table */
*diskids = info->LayoutTable[tableOffset];
}
+#endif /* (RF_INCLUDE_PARITY_DECLUSTERING_PQ > 0) */
diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c
index 7877fa73d18..cca16ba3997 100644
--- a/sys/dev/raidframe/rf_layout.c
+++ b/sys/dev/raidframe/rf_layout.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_layout.c,v 1.6 2000/04/17 19:35:12 oster Exp $ */
+/* $NetBSD: rf_layout.c,v 1.7 2001/01/26 04:40:03 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -107,6 +107,7 @@ static int distSpareNo = 0;
#endif /* RF_UTILITY > 0 */
static RF_LayoutSW_t mapsw[] = {
+#if RF_INCLUDE_PARITY_DECLUSTERING > 0
/* parity declustering */
{'T', "Parity declustering",
RF_NK2(rf_MakeLayoutSpecificDeclustered, &distSpareNo)
@@ -125,7 +126,9 @@ static RF_LayoutSW_t mapsw[] = {
DefaultStates,
0)
},
+#endif
+#if RF_INCLUDE_PARITY_DECLUSTERING_DS > 0
/* parity declustering with distributed sparing */
{'D', "Distributed sparing parity declustering",
RF_NK2(rf_MakeLayoutSpecificDeclustered, &distSpareYes)
@@ -144,6 +147,7 @@ static RF_LayoutSW_t mapsw[] = {
DefaultStates,
RF_DISTRIBUTE_SPARE | RF_BD_DECLUSTERED)
},
+#endif
#if RF_INCLUDE_DECL_PQ > 0
/* declustered P+Q */