Give the parity declustering code their own 'RAID arch' types, and
allow us to turn them off if desired.
This commit is contained in:
parent
61a2ee28fb
commit
a40eef11ac
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue