1 /* $OpenBSD: rf_pq.h,v 1.3 2002/12/16 07:01:04 tdeval Exp $ */ 2 /* $NetBSD: rf_pq.h,v 1.3 1999/02/05 00:06:15 oster Exp $ */ 3 4 /* 5 * rf_pq.h 6 */ 7 /* 8 * Copyright (c) 1995 Carnegie-Mellon University. 9 * All rights reserved. 10 * 11 * Author: Daniel Stodolsky 12 * 13 * Permission to use, copy, modify and distribute this software and 14 * its documentation is hereby granted, provided that both the copyright 15 * notice and this permission notice appear in all copies of the 16 * software, derivative works or modified versions, and any portions 17 * thereof, and that both notices appear in supporting documentation. 18 * 19 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 20 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 21 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 22 * 23 * Carnegie Mellon requests users of this software to return to 24 * 25 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 26 * School of Computer Science 27 * Carnegie Mellon University 28 * Pittsburgh PA 15213-3890 29 * 30 * any improvements or extensions that they make and grant Carnegie the 31 * rights to redistribute these changes. 32 */ 33 34 #ifndef _RF__RF_PQ_H_ 35 #define _RF__RF_PQ_H_ 36 37 #include "rf_archs.h" 38 39 extern RF_RedFuncs_t rf_pFuncs; 40 extern RF_RedFuncs_t rf_pRecoveryFuncs; 41 42 int rf_RegularONPFunc(RF_DagNode_t *); 43 int rf_SimpleONPFunc(RF_DagNode_t *); 44 int rf_RecoveryPFunc(RF_DagNode_t *); 45 int rf_RegularPFunc(RF_DagNode_t *); 46 47 #if (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0) 48 49 extern RF_RedFuncs_t rf_qFuncs; 50 extern RF_RedFuncs_t rf_qRecoveryFuncs; 51 extern RF_RedFuncs_t rf_pqRecoveryFuncs; 52 53 void rf_PQDagSelect(RF_Raid_t *, RF_IoType_t, RF_AccessStripeMap_t *, 54 RF_VoidFuncPtr *); 55 RF_CREATE_DAG_FUNC_DECL(rf_PQCreateLargeWriteDAG); 56 int rf_RegularONQFunc(RF_DagNode_t *); 57 int rf_SimpleONQFunc(RF_DagNode_t *); 58 RF_CREATE_DAG_FUNC_DECL(rf_PQCreateSmallWriteDAG); 59 int rf_RegularPQFunc(RF_DagNode_t *); 60 int rf_RegularQFunc(RF_DagNode_t *); 61 void rf_Degraded_100_PQFunc(RF_DagNode_t *); 62 int rf_RecoveryQFunc(RF_DagNode_t *); 63 int rf_RecoveryPQFunc(RF_DagNode_t *); 64 void rf_PQ_DegradedWriteQFunc(RF_DagNode_t *); 65 void rf_IncQ(unsigned long *, unsigned long *, unsigned, unsigned); 66 void rf_PQ_recover(unsigned long *, unsigned long *, unsigned long *, 67 unsigned long *, unsigned, unsigned, unsigned); 68 69 #endif /* (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0) */ 70 71 #endif /* !_RF__RF_PQ_H_ */ 72