1 /* $NetBSD: rf_pqdeg.h,v 1.4 2001/06/20 03:09:23 oster Exp $ */
3 * Copyright (c) 1995 Carnegie-Mellon University.
6 * Author: Daniel Stodolsky
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.
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.
18 * Carnegie Mellon requests users of this software to return to
20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes.
29 #ifndef _RF__RF_PQDEG_H_
30 #define _RF__RF_PQDEG_H_
32 #if (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_RAID6 > 0)
34 #include <dev/raidframe/raidframevar.h>
38 /* extern decl's of the failure mode PQ functions.
39 * See pddeg.c for nomenclature discussion.
42 /* reads, single failure */
43 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateReadDAG
);
44 /* reads, two failure */
45 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateReadDAG
);
46 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateReadDAG
);
47 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateReadDAG
);
49 /* writes, single failure */
50 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateWriteDAG
);
51 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateSmallWriteDAG
);
52 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateLargeWriteDAG
);
53 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateSmallWriteDAG
);
54 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateLargeWriteDAG
);
56 /* writes, double failure */
57 RF_CREATE_DAG_FUNC_DECL(rf_PQ_011_CreateWriteDAG
);
58 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateWriteDAG
);
59 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateWriteDAG
);
60 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateWriteDAG
);
62 typedef RF_uint32 RF_ua32_t
[32];
63 typedef RF_uint8 RF_ua1024_t
[1024];
65 extern RF_ua32_t rf_rn
;
66 extern RF_ua32_t rf_qfor
[32];
67 #ifndef _KERNEL /* we don't support PQ in the kernel yet, so
68 * don't link in this monster table */
69 extern RF_ua1024_t rf_qinv
[29 * 29];
71 extern RF_ua1024_t rf_qinv
[1];
74 #endif /* (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_RAID6 > 0) */
76 #endif /* !_RF__RF_PQDEG_H_ */