summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_evenodd_dagfuncs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/raidframe/rf_evenodd_dagfuncs.h')
-rw-r--r--sys/dev/raidframe/rf_evenodd_dagfuncs.h63
1 files changed, 31 insertions, 32 deletions
diff --git a/sys/dev/raidframe/rf_evenodd_dagfuncs.h b/sys/dev/raidframe/rf_evenodd_dagfuncs.h
index c00a1d82530..294d1cfea6b 100644
--- a/sys/dev/raidframe/rf_evenodd_dagfuncs.h
+++ b/sys/dev/raidframe/rf_evenodd_dagfuncs.h
@@ -1,5 +1,6 @@
-/* $OpenBSD: rf_evenodd_dagfuncs.h,v 1.2 1999/02/16 00:02:45 niklas Exp $ */
+/* $OpenBSD: rf_evenodd_dagfuncs.h,v 1.3 2002/12/16 07:01:04 tdeval Exp $ */
/* $NetBSD: rf_evenodd_dagfuncs.h,v 1.2 1999/02/05 00:06:11 oster Exp $ */
+
/*
* rf_evenodd_dagfuncs.h
*/
@@ -30,8 +31,8 @@
* rights to redistribute these changes.
*/
-#ifndef _RF__RF_EVENODD_DAGFUNCS_H_
-#define _RF__RF_EVENODD_DAGFUNCS_H_
+#ifndef _RF__RF_EVENODD_DAGFUNCS_H_
+#define _RF__RF_EVENODD_DAGFUNCS_H_
extern RF_RedFuncs_t rf_EOSmallWriteEFuncs;
extern RF_RedFuncs_t rf_EOSmallWritePFuncs;
@@ -39,42 +40,40 @@ extern RF_RedFuncs_t rf_eoERecoveryFuncs;
extern RF_RedFuncs_t rf_eoPRecoveryFuncs;
extern RF_RedFuncs_t rf_eoERecoveryFuncs;
-int rf_RegularPEFunc(RF_DagNode_t * node);
-int rf_RegularONEFunc(RF_DagNode_t * node);
-int rf_SimpleONEFunc(RF_DagNode_t * node);
-void rf_RegularESubroutine(RF_DagNode_t * node, char *ebuf);
-int rf_RegularEFunc(RF_DagNode_t * node);
-void rf_DegrESubroutine(RF_DagNode_t * node, char *ebuf);
-int rf_Degraded_100_EOFunc(RF_DagNode_t * node);
-void
-rf_e_EncOneSect(RF_RowCol_t srcLogicCol, char *srcSecbuf,
- RF_RowCol_t destLogicCol, char *destSecbuf, int bytesPerSector);
-void
-rf_e_encToBuf(RF_Raid_t * raidPtr, RF_RowCol_t srcLogicCol,
- char *srcbuf, RF_RowCol_t destLogicCol, char *destbuf, int numSector);
-int rf_RecoveryEFunc(RF_DagNode_t * node);
-int rf_EO_DegradedWriteEFunc(RF_DagNode_t * node);
-void
-rf_doubleEOdecode(RF_Raid_t * raidPtr, char **rrdbuf, char **dest,
- RF_RowCol_t * fcol, char *pbuf, char *ebuf);
-int rf_EvenOddDoubleRecoveryFunc(RF_DagNode_t * node);
-int rf_EOWriteDoubleRecoveryFunc(RF_DagNode_t * node);
+int rf_RegularPEFunc(RF_DagNode_t *);
+int rf_RegularONEFunc(RF_DagNode_t *);
+int rf_SimpleONEFunc(RF_DagNode_t *);
+void rf_RegularESubroutine(RF_DagNode_t *, char *);
+int rf_RegularEFunc(RF_DagNode_t *);
+void rf_DegrESubroutine(RF_DagNode_t *, char *);
+int rf_Degraded_100_EOFunc(RF_DagNode_t *);
+void rf_e_EncOneSect(RF_RowCol_t, char *, RF_RowCol_t, char *, int);
+void rf_e_encToBuf(RF_Raid_t *, RF_RowCol_t, char *, RF_RowCol_t, char *, int);
+int rf_RecoveryEFunc(RF_DagNode_t *);
+int rf_EO_DegradedWriteEFunc(RF_DagNode_t *);
+void rf_doubleEOdecode(RF_Raid_t *, char **, char **, RF_RowCol_t *,
+ char *, char *);
+int rf_EvenOddDoubleRecoveryFunc(RF_DagNode_t *);
+int rf_EOWriteDoubleRecoveryFunc(RF_DagNode_t *);
-#define rf_EUCol(_layoutPtr_, _addr_ ) \
-( (_addr_)%( (_layoutPtr_)->dataSectorsPerStripe ) )/((_layoutPtr_)->sectorsPerStripeUnit)
+#define rf_EUCol(_layoutPtr_,_addr_) \
+ ((_addr_) % ((_layoutPtr_)->dataSectorsPerStripe)) / \
+ ((_layoutPtr_)->sectorsPerStripeUnit)
-#define rf_EO_Mod( _int1_, _int2_ ) \
-( ((_int1_) < 0)? (((_int1_)+(_int2_))%(_int2_)) : (_int1_)%(_int2_) )
+#define rf_EO_Mod(_int1_,_int2_) \
+ (((_int1_) < 0) ? (((_int1_) + (_int2_)) % (_int2_)) \
+ : ((_int1_) % (_int2_)))
-#define rf_OffsetOfNextEUBoundary(_offset_, sec_per_eu) ((_offset_)/(sec_per_eu) + 1)*(sec_per_eu)
+#define rf_OffsetOfNextEUBoundary(_offset_, sec_per_eu) \
+ ((_offset_) / (sec_per_eu) + 1) * (sec_per_eu)
-#define RF_EO_MATRIX_DIM 17
+#define RF_EO_MATRIX_DIM 17
/*
* RF_EO_MATRIX_DIM should be a prime number: and "bytesPerSector" should be
- * dividable by ( RF_EO_MATRIX_DIM - 1) to fully encode and utilize the space
- * in a sector, this number could also be 17. Tha later case doesn't apply
+ * divisible by (RF_EO_MATRIX_DIM - 1) to fully encode and utilize the space
+ * in a sector, this number could also be 17. That later case doesn't apply
* for disk array larger than 17 columns totally.
*/
-#endif /* !_RF__RF_EVENODD_DAGFUNCS_H_ */
+#endif /* !_RF__RF_EVENODD_DAGFUNCS_H_ */