Home | History | Annotate | Line # | Download | only in raidframe
rf_pqdeg.h revision 1.3.20.1
      1 /*	$NetBSD: rf_pqdeg.h,v 1.3.20.1 2001/08/24 00:10:38 nathanw Exp $	*/
      2 /*
      3  * Copyright (c) 1995 Carnegie-Mellon University.
      4  * All rights reserved.
      5  *
      6  * Author: Daniel Stodolsky
      7  *
      8  * Permission to use, copy, modify and distribute this software and
      9  * its documentation is hereby granted, provided that both the copyright
     10  * notice and this permission notice appear in all copies of the
     11  * software, derivative works or modified versions, and any portions
     12  * thereof, and that both notices appear in supporting documentation.
     13  *
     14  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     15  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     16  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     17  *
     18  * Carnegie Mellon requests users of this software to return to
     19  *
     20  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     21  *  School of Computer Science
     22  *  Carnegie Mellon University
     23  *  Pittsburgh PA 15213-3890
     24  *
     25  * any improvements or extensions that they make and grant Carnegie the
     26  * rights to redistribute these changes.
     27  */
     28 
     29 #ifndef _RF__RF_PQDEG_H_
     30 #define _RF__RF_PQDEG_H_
     31 
     32 #if (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_RAID6 > 0)
     33 
     34 #include "rf_types.h"
     35 
     36 #if RF_UTILITY == 0
     37 #include "rf_dag.h"
     38 
     39 /* extern decl's of the failure mode PQ functions.
     40  * See pddeg.c for nomenclature discussion.
     41  */
     42 
     43 /* reads, single failure  */
     44 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateReadDAG);
     45 /* reads, two failure */
     46 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateReadDAG);
     47 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateReadDAG);
     48 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateReadDAG);
     49 
     50 /* writes, single failure */
     51 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateWriteDAG);
     52 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateSmallWriteDAG);
     53 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateLargeWriteDAG);
     54 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateSmallWriteDAG);
     55 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateLargeWriteDAG);
     56 
     57 /* writes, double failure */
     58 RF_CREATE_DAG_FUNC_DECL(rf_PQ_011_CreateWriteDAG);
     59 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateWriteDAG);
     60 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateWriteDAG);
     61 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateWriteDAG);
     62 #endif				/* RF_UTILITY == 0 */
     63 
     64 typedef RF_uint32 RF_ua32_t[32];
     65 typedef RF_uint8 RF_ua1024_t[1024];
     66 
     67 extern RF_ua32_t rf_rn;
     68 extern RF_ua32_t rf_qfor[32];
     69 #ifndef _KERNEL			/* we don't support PQ in the kernel yet, so
     70 				 * don't link in this monster table */
     71 extern RF_ua1024_t rf_qinv[29 * 29];
     72 #else				/* !_KERNEL */
     73 extern RF_ua1024_t rf_qinv[1];
     74 #endif				/* !_KERNEL */
     75 
     76 #endif /* (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_RAID6 > 0) */
     77 
     78 #endif				/* !_RF__RF_PQDEG_H_ */
     79