This source file includes following definitions.
- rf_QuiesceState
- rf_IncrAccessesCountState
- rf_DecrAccessesCountState
- rf_MapState
- rf_LockState
- rf_CreateDAGState
- rf_ExecuteDAGState
- rf_ProcessDAGState
- rf_CleanupState
- rf_LastState
- RF_AccessState_t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #ifndef _RF__RF_TYPES_H_
40 #define _RF__RF_TYPES_H_
41
42
43 #include "rf_archs.h"
44
45 #include <sys/errno.h>
46 #include <sys/types.h>
47
48 #include <sys/uio.h>
49 #include <sys/param.h>
50 #include <sys/lock.h>
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 #include <sys/types.h>
66 #include <sys/limits.h>
67 #include <machine/endian.h>
68
69 #if BYTE_ORDER == BIG_ENDIAN
70 #define RF_IS_BIG_ENDIAN 1
71 #elif BYTE_ORDER == LITTLE_ENDIAN
72 #define RF_IS_BIG_ENDIAN 0
73 #else
74 #error byte order not defined
75 #endif
76 typedef int8_t RF_int8;
77 typedef u_int8_t RF_uint8;
78 typedef int16_t RF_int16;
79 typedef u_int16_t RF_uint16;
80 typedef int32_t RF_int32;
81 typedef u_int32_t RF_uint32;
82 typedef int64_t RF_int64;
83 typedef u_int64_t RF_uint64;
84 #if LONG_BIT == 32
85 #define RF_LONGSHIFT 2
86 #elif LONG_BIT == 64
87 #define RF_LONGSHIFT 3
88 #else
89 #error word size not defined
90 #endif
91
92
93
94
95
96
97
98
99 #define RF_TRUE 1
100 #define RF_FALSE 0
101
102
103
104
105 typedef RF_uint64 RF_IoCount_t;
106 typedef RF_uint64 RF_Offset_t;
107 typedef RF_uint32 RF_PSSFlags_t;
108 typedef RF_uint64 RF_SectorCount_t;
109 typedef RF_uint64 RF_StripeCount_t;
110 typedef RF_int64 RF_SectorNum_t;
111
112
113
114 typedef RF_int64 RF_StripeNum_t;
115 typedef RF_int64 RF_RaidAddr_t;
116 typedef int RF_RowCol_t;
117 typedef RF_int64 RF_HeadSepLimit_t;
118 typedef RF_int64 RF_ReconUnitCount_t;
119 typedef int RF_ReconUnitNum_t;
120
121 typedef char RF_ParityConfig_t;
122
123 typedef char RF_DiskQueueType_t[1024];
124 #define RF_DISK_QUEUE_TYPE_NONE ""
125
126
127 typedef int RF_RbufType_t;
128 #define RF_RBUF_TYPE_EXCLUSIVE 0
129
130
131
132 #define RF_RBUF_TYPE_FLOATING 1
133 #define RF_RBUF_TYPE_FORCED 2
134
135
136
137
138 typedef char RF_IoType_t;
139 #define RF_IO_TYPE_READ 'r'
140 #define RF_IO_TYPE_WRITE 'w'
141 #define RF_IO_TYPE_NOP 'n'
142 #define RF_IO_IS_R_OR_W(_type_) \
143 (((_type_) == RF_IO_TYPE_READ) || ((_type_) == RF_IO_TYPE_WRITE))
144
145 typedef void (*RF_VoidFuncPtr) (void *,...);
146
147 typedef RF_uint32 RF_AccessStripeMapFlags_t;
148 typedef RF_uint32 RF_DiskQueueDataFlags_t;
149 typedef RF_uint32 RF_DiskQueueFlags_t;
150 typedef RF_uint32 RF_RaidAccessFlags_t;
151
152 #define RF_DISKQUEUE_DATA_FLAGS_NONE ((RF_DiskQueueDataFlags_t)0)
153
154 typedef struct RF_AccessStripeMap_s RF_AccessStripeMap_t;
155 typedef struct RF_AccessStripeMapHeader_s RF_AccessStripeMapHeader_t;
156 typedef struct RF_AllocListElem_s RF_AllocListElem_t;
157 typedef struct RF_CallbackDesc_s RF_CallbackDesc_t;
158 typedef struct RF_ChunkDesc_s RF_ChunkDesc_t;
159 typedef struct RF_CommonLogData_s RF_CommonLogData_t;
160 typedef struct RF_Config_s RF_Config_t;
161 typedef struct RF_CumulativeStats_s RF_CumulativeStats_t;
162 typedef struct RF_DagHeader_s RF_DagHeader_t;
163 typedef struct RF_DagList_s RF_DagList_t;
164 typedef struct RF_DagNode_s RF_DagNode_t;
165 typedef struct RF_DeclusteredConfigInfo_s RF_DeclusteredConfigInfo_t;
166 typedef struct RF_DiskId_s RF_DiskId_t;
167 typedef struct RF_DiskMap_s RF_DiskMap_t;
168 typedef struct RF_DiskQueue_s RF_DiskQueue_t;
169 typedef struct RF_DiskQueueData_s RF_DiskQueueData_t;
170 typedef struct RF_DiskQueueSW_s RF_DiskQueueSW_t;
171 typedef struct RF_Etimer_s RF_Etimer_t;
172 typedef struct RF_EventCreate_s RF_EventCreate_t;
173 typedef struct RF_FreeList_s RF_FreeList_t;
174 typedef struct RF_LockReqDesc_s RF_LockReqDesc_t;
175 typedef struct RF_LockTableEntry_s RF_LockTableEntry_t;
176 typedef struct RF_MCPair_s RF_MCPair_t;
177 typedef struct RF_OwnerInfo_s RF_OwnerInfo_t;
178 typedef struct RF_ParityLog_s RF_ParityLog_t;
179 typedef struct RF_ParityLogAppendQueue_s RF_ParityLogAppendQueue_t;
180 typedef struct RF_ParityLogData_s RF_ParityLogData_t;
181 typedef struct RF_ParityLogDiskQueue_s RF_ParityLogDiskQueue_t;
182 typedef struct RF_ParityLogQueue_s RF_ParityLogQueue_t;
183 typedef struct RF_ParityLogRecord_s RF_ParityLogRecord_t;
184 typedef struct RF_PerDiskReconCtrl_s RF_PerDiskReconCtrl_t;
185 typedef struct RF_PSStatusHeader_s RF_PSStatusHeader_t;
186 typedef struct RF_PhysDiskAddr_s RF_PhysDiskAddr_t;
187 typedef struct RF_PropHeader_s RF_PropHeader_t;
188 typedef struct RF_Raid_s RF_Raid_t;
189 typedef struct RF_RaidAccessDesc_s RF_RaidAccessDesc_t;
190 typedef struct RF_RaidDisk_s RF_RaidDisk_t;
191 typedef struct RF_RaidLayout_s RF_RaidLayout_t;
192 typedef struct RF_RaidReconDesc_s RF_RaidReconDesc_t;
193 typedef struct RF_ReconBuffer_s RF_ReconBuffer_t;
194 typedef struct RF_ReconConfig_s RF_ReconConfig_t;
195 typedef struct RF_ReconCtrl_s RF_ReconCtrl_t;
196 typedef struct RF_ReconDoneProc_s RF_ReconDoneProc_t;
197 typedef struct RF_ReconEvent_s RF_ReconEvent_t;
198 typedef struct RF_ReconMap_s RF_ReconMap_t;
199 typedef struct RF_ReconMapListElem_s RF_ReconMapListElem_t;
200 typedef struct RF_ReconParityStripeStatus_s RF_ReconParityStripeStatus_t;
201 typedef struct RF_RedFuncs_s RF_RedFuncs_t;
202 typedef struct RF_RegionBufferQueue_s RF_RegionBufferQueue_t;
203 typedef struct RF_RegionInfo_s RF_RegionInfo_t;
204 typedef struct RF_ShutdownList_s RF_ShutdownList_t;
205 typedef struct RF_SpareTableEntry_s RF_SpareTableEntry_t;
206 typedef struct RF_SparetWait_s RF_SparetWait_t;
207 typedef struct RF_StripeLockDesc_s RF_StripeLockDesc_t;
208 typedef struct RF_ThreadGroup_s RF_ThreadGroup_t;
209 typedef struct RF_ThroughputStats_s RF_ThroughputStats_t;
210
211
212
213
214
215
216 typedef enum RF_AccessState_e {
217
218 rf_QuiesceState,
219 rf_IncrAccessesCountState,
220 rf_DecrAccessesCountState,
221 rf_MapState,
222 rf_LockState,
223 rf_CreateDAGState,
224 rf_ExecuteDAGState,
225 rf_ProcessDAGState,
226
227
228
229 rf_CleanupState,
230 rf_LastState
231 } RF_AccessState_t;
232 #define RF_MAXROW 10
233
234
235
236 #define RF_MAXCOL 40
237 #define RF_MAXSPARE 10
238 #define RF_MAXDBGV 75
239 #define RF_MAXDBGVLEN 50
240
241 union RF_GenericParam_u {
242 void *p;
243 RF_uint64 v;
244 };
245 typedef union RF_GenericParam_u RF_DagParam_t;
246 typedef union RF_GenericParam_u RF_CBParam_t;
247
248 #endif