Whamcloud - gitweb
2cb4bb7c5aca3fe3c69072ef1845206916482322
[fs/lustre-release.git] / lustre / utils / wiretest.c
1 #include <stdio.h>
2 #include <liblustre.h>
3 #include <linux/lustre_lib.h>
4 #include <linux/lustre_idl.h>
5
6 #undef LASSERT
7 #undef LASSERTF
8 #define LASSERT(cond) if (!(cond)) { printf("failed " #cond "\n"); ret = 1; }
9 #define LASSERTF(cond, fmt, arg) if (!(cond)) { printf("failed '" #cond "'" fmt, arg);ret = 1;}
10
11 int ret;
12
13 void lustre_assert_wire_constants(void);
14
15 int main()
16 {
17         lustre_assert_wire_constants();
18
19         if (ret == 0)
20                 printf("wire constants OK\n");
21
22         return ret;
23 }
24
25 void lustre_assert_wire_constants(void)
26 {
27         /* Wire protocol assertions generated by 'wirecheck'
28          * running on Linux build 2.4.24-cmd #1 SMP Wed Aug 18 14:24:44 MDT 2004 i686 i686 i386 GNU/L
29          * with gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) */
30
31
32         /* Constants... */
33         LASSERTF(PTLRPC_MSG_MAGIC == 0x0BD00BD0," found %lld\n",
34                  (long long)PTLRPC_MSG_MAGIC);
35         LASSERTF(PTLRPC_MSG_VERSION == 0x00000003," found %lld\n",
36                  (long long)PTLRPC_MSG_VERSION);
37         LASSERTF(PTL_RPC_MSG_REQUEST == 4711, " found %lld\n",
38                  (long long)PTL_RPC_MSG_REQUEST);
39         LASSERTF(PTL_RPC_MSG_ERR == 4712, " found %lld\n",
40                  (long long)PTL_RPC_MSG_ERR);
41         LASSERTF(PTL_RPC_MSG_REPLY == 4713, " found %lld\n",
42                  (long long)PTL_RPC_MSG_REPLY);
43         LASSERTF(MSG_LAST_REPLAY == 1, " found %lld\n",
44                  (long long)MSG_LAST_REPLAY);
45         LASSERTF(MSG_RESENT == 2, " found %lld\n",
46                  (long long)MSG_RESENT);
47         LASSERTF(MSG_REPLAY == 4, " found %lld\n",
48                  (long long)MSG_REPLAY);
49         LASSERTF(MSG_CONNECT_RECOVERING == 1, " found %lld\n",
50                  (long long)MSG_CONNECT_RECOVERING);
51         LASSERTF(MSG_CONNECT_RECONNECT == 2, " found %lld\n",
52                  (long long)MSG_CONNECT_RECONNECT);
53         LASSERTF(MSG_CONNECT_REPLAYABLE == 4, " found %lld\n",
54                  (long long)MSG_CONNECT_REPLAYABLE);
55         LASSERTF(OST_REPLY == 0, " found %lld\n",
56                  (long long)OST_REPLY);
57         LASSERTF(OST_GETATTR == 1, " found %lld\n",
58                  (long long)OST_GETATTR);
59         LASSERTF(OST_SETATTR == 2, " found %lld\n",
60                  (long long)OST_SETATTR);
61         LASSERTF(OST_READ == 3, " found %lld\n",
62                  (long long)OST_READ);
63         LASSERTF(OST_WRITE == 4, " found %lld\n",
64                  (long long)OST_WRITE);
65         LASSERTF(OST_CREATE == 5, " found %lld\n",
66                  (long long)OST_CREATE);
67         LASSERTF(OST_DESTROY == 6, " found %lld\n",
68                  (long long)OST_DESTROY);
69         LASSERTF(OST_GET_INFO == 7, " found %lld\n",
70                  (long long)OST_GET_INFO);
71         LASSERTF(OST_CONNECT == 8, " found %lld\n",
72                  (long long)OST_CONNECT);
73         LASSERTF(OST_DISCONNECT == 9, " found %lld\n",
74                  (long long)OST_DISCONNECT);
75         LASSERTF(OST_PUNCH == 10, " found %lld\n",
76                  (long long)OST_PUNCH);
77         LASSERTF(OST_OPEN == 11, " found %lld\n",
78                  (long long)OST_OPEN);
79         LASSERTF(OST_CLOSE == 12, " found %lld\n",
80                  (long long)OST_CLOSE);
81         LASSERTF(OST_STATFS == 13, " found %lld\n",
82                  (long long)OST_STATFS);
83         LASSERTF(OST_SAN_READ == 14, " found %lld\n",
84                  (long long)OST_SAN_READ);
85         LASSERTF(OST_SAN_WRITE == 15, " found %lld\n",
86                  (long long)OST_SAN_WRITE);
87         LASSERTF(OST_SYNC == 16, " found %lld\n",
88                  (long long)OST_SYNC);
89         LASSERTF(OST_LAST_OPC == 18, " found %lld\n",
90                  (long long)OST_LAST_OPC);
91         LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
92                  (long long)OBD_OBJECT_EOF);
93         LASSERTF(OST_REQ_HAS_OA1 == 1, " found %lld\n",
94                  (long long)OST_REQ_HAS_OA1);
95         LASSERTF(MDS_GETATTR == 33, " found %lld\n",
96                  (long long)MDS_GETATTR);
97         LASSERTF(MDS_GETATTR_NAME == 34, " found %lld\n",
98                  (long long)MDS_GETATTR_NAME);
99         LASSERTF(MDS_CLOSE == 35, " found %lld\n",
100                  (long long)MDS_CLOSE);
101         LASSERTF(MDS_REINT == 36, " found %lld\n",
102                  (long long)MDS_REINT);
103         LASSERTF(MDS_READPAGE == 37, " found %lld\n",
104                  (long long)MDS_READPAGE);
105         LASSERTF(MDS_CONNECT == 38, " found %lld\n",
106                  (long long)MDS_CONNECT);
107         LASSERTF(MDS_DISCONNECT == 39, " found %lld\n",
108                  (long long)MDS_DISCONNECT);
109         LASSERTF(MDS_GETSTATUS == 40, " found %lld\n",
110                  (long long)MDS_GETSTATUS);
111         LASSERTF(MDS_STATFS == 41, " found %lld\n",
112                  (long long)MDS_STATFS);
113         LASSERTF(MDS_PIN == 42, " found %lld\n",
114                  (long long)MDS_PIN);
115         LASSERTF(MDS_UNPIN == 43, " found %lld\n",
116                  (long long)MDS_UNPIN);
117         LASSERTF(MDS_SYNC == 44, " found %lld\n",
118                  (long long)MDS_SYNC);
119         LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n",
120                  (long long)MDS_DONE_WRITING);
121         LASSERTF(MDS_LAST_OPC == 46, " found %lld\n",
122                  (long long)MDS_LAST_OPC);
123         LASSERTF(REINT_SETATTR == 1, " found %lld\n",
124                  (long long)REINT_SETATTR);
125         LASSERTF(REINT_CREATE == 2, " found %lld\n",
126                  (long long)REINT_CREATE);
127         LASSERTF(REINT_LINK == 3, " found %lld\n",
128                  (long long)REINT_LINK);
129         LASSERTF(REINT_UNLINK == 4, " found %lld\n",
130                  (long long)REINT_UNLINK);
131         LASSERTF(REINT_RENAME == 5, " found %lld\n",
132                  (long long)REINT_RENAME);
133         LASSERTF(REINT_OPEN == 6, " found %lld\n",
134                  (long long)REINT_OPEN);
135         LASSERTF(REINT_MAX == 8, " found %lld\n",
136                  (long long)REINT_MAX);
137         LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
138                  (long long)DISP_IT_EXECD);
139         LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
140                  (long long)DISP_LOOKUP_EXECD);
141         LASSERTF(DISP_LOOKUP_NEG == 4, " found %lld\n",
142                  (long long)DISP_LOOKUP_NEG);
143         LASSERTF(DISP_LOOKUP_POS == 8, " found %lld\n",
144                  (long long)DISP_LOOKUP_POS);
145         LASSERTF(DISP_OPEN_CREATE == 16, " found %lld\n",
146                  (long long)DISP_OPEN_CREATE);
147         LASSERTF(DISP_OPEN_OPEN == 32, " found %lld\n",
148                  (long long)DISP_OPEN_OPEN);
149         LASSERTF(MDS_STATUS_CONN == 1, " found %lld\n",
150                  (long long)MDS_STATUS_CONN);
151         LASSERTF(MDS_STATUS_LOV == 2, " found %lld\n",
152                  (long long)MDS_STATUS_LOV);
153         LASSERTF(MDS_OPEN_HAS_EA == 1073741824, " found %lld\n",
154                  (long long)MDS_OPEN_HAS_EA);
155         LASSERTF(LDLM_ENQUEUE == 101, " found %lld\n",
156                  (long long)LDLM_ENQUEUE);
157         LASSERTF(LDLM_CONVERT == 102, " found %lld\n",
158                  (long long)LDLM_CONVERT);
159         LASSERTF(LDLM_CANCEL == 103, " found %lld\n",
160                  (long long)LDLM_CANCEL);
161         LASSERTF(LDLM_BL_CALLBACK == 104, " found %lld\n",
162                  (long long)LDLM_BL_CALLBACK);
163         LASSERTF(LDLM_CP_CALLBACK == 105, " found %lld\n",
164                  (long long)LDLM_CP_CALLBACK);
165         LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
166                  (long long)LDLM_LAST_OPC);
167         LASSERTF(LCK_EX == 1, " found %lld\n",
168                  (long long)LCK_EX);
169         LASSERTF(LCK_PW == 2, " found %lld\n",
170                  (long long)LCK_PW);
171         LASSERTF(LCK_PR == 4, " found %lld\n",
172                  (long long)LCK_PR);
173         LASSERTF(LCK_CW == 8, " found %lld\n",
174                  (long long)LCK_CW);
175         LASSERTF(LCK_CR == 16, " found %lld\n",
176                  (long long)LCK_CR);
177         LASSERTF(LCK_NL == 32, " found %lld\n",
178                  (long long)LCK_NL);
179         LASSERTF(PTLBD_QUERY == 200, " found %lld\n",
180                  (long long)PTLBD_QUERY);
181         LASSERTF(PTLBD_READ == 201, " found %lld\n",
182                  (long long)PTLBD_READ);
183         LASSERTF(PTLBD_WRITE == 202, " found %lld\n",
184                  (long long)PTLBD_WRITE);
185         LASSERTF(PTLBD_FLUSH == 203, " found %lld\n",
186                  (long long)PTLBD_FLUSH);
187         LASSERTF(PTLBD_CONNECT == 204, " found %lld\n",
188                  (long long)PTLBD_CONNECT);
189         LASSERTF(PTLBD_DISCONNECT == 205, " found %lld\n",
190                  (long long)PTLBD_DISCONNECT);
191         LASSERTF(PTLBD_LAST_OPC == 206, " found %lld\n",
192                  (long long)PTLBD_LAST_OPC);
193         LASSERTF(MGMT_CONNECT == 250, " found %lld\n",
194                  (long long)MGMT_CONNECT);
195         LASSERTF(MGMT_DISCONNECT == 251, " found %lld\n",
196                  (long long)MGMT_DISCONNECT);
197         LASSERTF(MGMT_EXCEPTION == 252, " found %lld\n",
198                  (long long)MGMT_EXCEPTION);
199         LASSERTF(OBD_PING == 400, " found %lld\n",
200                  (long long)OBD_PING);
201         LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",
202                  (long long)OBD_LOG_CANCEL);
203         LASSERTF(OBD_LAST_OPC == 402, " found %lld\n",
204                  (long long)OBD_LAST_OPC);
205         /* Sizes and Offsets */
206
207
208         /* Checks for struct lustre_handle */
209         LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",
210                  (long long)(int)sizeof(struct lustre_handle));
211         LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
212                  (long long)(int)offsetof(struct lustre_handle, cookie));
213         LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",
214                  (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
215
216         /* Checks for struct lustre_msg */
217         LASSERTF((int)sizeof(struct lustre_msg) == 64, " found %lld\n",
218                  (long long)(int)sizeof(struct lustre_msg));
219         LASSERTF((int)offsetof(struct lustre_msg, handle) == 0, " found %lld\n",
220                  (long long)(int)offsetof(struct lustre_msg, handle));
221         LASSERTF((int)sizeof(((struct lustre_msg *)0)->handle) == 8, " found %lld\n",
222                  (long long)(int)sizeof(((struct lustre_msg *)0)->handle));
223         LASSERTF((int)offsetof(struct lustre_msg, magic) == 8, " found %lld\n",
224                  (long long)(int)offsetof(struct lustre_msg, magic));
225         LASSERTF((int)sizeof(((struct lustre_msg *)0)->magic) == 4, " found %lld\n",
226                  (long long)(int)sizeof(((struct lustre_msg *)0)->magic));
227         LASSERTF((int)offsetof(struct lustre_msg, type) == 12, " found %lld\n",
228                  (long long)(int)offsetof(struct lustre_msg, type));
229         LASSERTF((int)sizeof(((struct lustre_msg *)0)->type) == 4, " found %lld\n",
230                  (long long)(int)sizeof(((struct lustre_msg *)0)->type));
231         LASSERTF((int)offsetof(struct lustre_msg, version) == 16, " found %lld\n",
232                  (long long)(int)offsetof(struct lustre_msg, version));
233         LASSERTF((int)sizeof(((struct lustre_msg *)0)->version) == 4, " found %lld\n",
234                  (long long)(int)sizeof(((struct lustre_msg *)0)->version));
235         LASSERTF((int)offsetof(struct lustre_msg, opc) == 20, " found %lld\n",
236                  (long long)(int)offsetof(struct lustre_msg, opc));
237         LASSERTF((int)sizeof(((struct lustre_msg *)0)->opc) == 4, " found %lld\n",
238                  (long long)(int)sizeof(((struct lustre_msg *)0)->opc));
239         LASSERTF((int)offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n",
240                  (long long)(int)offsetof(struct lustre_msg, last_xid));
241         LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_xid) == 8, " found %lld\n",
242                  (long long)(int)sizeof(((struct lustre_msg *)0)->last_xid));
243         LASSERTF((int)offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n",
244                  (long long)(int)offsetof(struct lustre_msg, last_committed));
245         LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_committed) == 8, " found %lld\n",
246                  (long long)(int)sizeof(((struct lustre_msg *)0)->last_committed));
247         LASSERTF((int)offsetof(struct lustre_msg, transno) == 40, " found %lld\n",
248                  (long long)(int)offsetof(struct lustre_msg, transno));
249         LASSERTF((int)sizeof(((struct lustre_msg *)0)->transno) == 8, " found %lld\n",
250                  (long long)(int)sizeof(((struct lustre_msg *)0)->transno));
251         LASSERTF((int)offsetof(struct lustre_msg, status) == 48, " found %lld\n",
252                  (long long)(int)offsetof(struct lustre_msg, status));
253         LASSERTF((int)sizeof(((struct lustre_msg *)0)->status) == 4, " found %lld\n",
254                  (long long)(int)sizeof(((struct lustre_msg *)0)->status));
255         LASSERTF((int)offsetof(struct lustre_msg, flags) == 52, " found %lld\n",
256                  (long long)(int)offsetof(struct lustre_msg, flags));
257         LASSERTF((int)sizeof(((struct lustre_msg *)0)->flags) == 4, " found %lld\n",
258                  (long long)(int)sizeof(((struct lustre_msg *)0)->flags));
259         LASSERTF((int)offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n",
260                  (long long)(int)offsetof(struct lustre_msg, bufcount));
261         LASSERTF((int)sizeof(((struct lustre_msg *)0)->bufcount) == 4, " found %lld\n",
262                  (long long)(int)sizeof(((struct lustre_msg *)0)->bufcount));
263         LASSERTF((int)offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n",
264                  (long long)(int)offsetof(struct lustre_msg, buflens[7]));
265         LASSERTF((int)sizeof(((struct lustre_msg *)0)->buflens[7]) == 4, " found %lld\n",
266                  (long long)(int)sizeof(((struct lustre_msg *)0)->buflens[7]));
267
268         /* Checks for struct obdo */
269         LASSERTF((int)sizeof(struct obdo) == 176, " found %lld\n",
270                  (long long)(int)sizeof(struct obdo));
271         LASSERTF((int)offsetof(struct obdo, o_id) == 0, " found %lld\n",
272                  (long long)(int)offsetof(struct obdo, o_id));
273         LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
274                  (long long)(int)sizeof(((struct obdo *)0)->o_id));
275         LASSERTF((int)offsetof(struct obdo, o_gr) == 8, " found %lld\n",
276                  (long long)(int)offsetof(struct obdo, o_gr));
277         LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n",
278                  (long long)(int)sizeof(((struct obdo *)0)->o_gr));
279         LASSERTF((int)offsetof(struct obdo, o_atime) == 16, " found %lld\n",
280                  (long long)(int)offsetof(struct obdo, o_atime));
281         LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n",
282                  (long long)(int)sizeof(((struct obdo *)0)->o_atime));
283         LASSERTF((int)offsetof(struct obdo, o_mtime) == 24, " found %lld\n",
284                  (long long)(int)offsetof(struct obdo, o_mtime));
285         LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n",
286                  (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
287         LASSERTF((int)offsetof(struct obdo, o_ctime) == 32, " found %lld\n",
288                  (long long)(int)offsetof(struct obdo, o_ctime));
289         LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n",
290                  (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
291         LASSERTF((int)offsetof(struct obdo, o_size) == 40, " found %lld\n",
292                  (long long)(int)offsetof(struct obdo, o_size));
293         LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n",
294                  (long long)(int)sizeof(((struct obdo *)0)->o_size));
295         LASSERTF((int)offsetof(struct obdo, o_blocks) == 48, " found %lld\n",
296                  (long long)(int)offsetof(struct obdo, o_blocks));
297         LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n",
298                  (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
299         LASSERTF((int)offsetof(struct obdo, o_grant) == 56, " found %lld\n",
300                  (long long)(int)offsetof(struct obdo, o_grant));
301         LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n",
302                  (long long)(int)sizeof(((struct obdo *)0)->o_grant));
303         LASSERTF((int)offsetof(struct obdo, o_blksize) == 64, " found %lld\n",
304                  (long long)(int)offsetof(struct obdo, o_blksize));
305         LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n",
306                  (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
307         LASSERTF((int)offsetof(struct obdo, o_mode) == 68, " found %lld\n",
308                  (long long)(int)offsetof(struct obdo, o_mode));
309         LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n",
310                  (long long)(int)sizeof(((struct obdo *)0)->o_mode));
311         LASSERTF((int)offsetof(struct obdo, o_uid) == 72, " found %lld\n",
312                  (long long)(int)offsetof(struct obdo, o_uid));
313         LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n",
314                  (long long)(int)sizeof(((struct obdo *)0)->o_uid));
315         LASSERTF((int)offsetof(struct obdo, o_gid) == 76, " found %lld\n",
316                  (long long)(int)offsetof(struct obdo, o_gid));
317         LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n",
318                  (long long)(int)sizeof(((struct obdo *)0)->o_gid));
319         LASSERTF((int)offsetof(struct obdo, o_flags) == 80, " found %lld\n",
320                  (long long)(int)offsetof(struct obdo, o_flags));
321         LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n",
322                  (long long)(int)sizeof(((struct obdo *)0)->o_flags));
323         LASSERTF((int)offsetof(struct obdo, o_nlink) == 84, " found %lld\n",
324                  (long long)(int)offsetof(struct obdo, o_nlink));
325         LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n",
326                  (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
327         LASSERTF((int)offsetof(struct obdo, o_generation) == 88, " found %lld\n",
328                  (long long)(int)offsetof(struct obdo, o_generation));
329         LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n",
330                  (long long)(int)sizeof(((struct obdo *)0)->o_generation));
331         LASSERTF((int)offsetof(struct obdo, o_valid) == 92, " found %lld\n",
332                  (long long)(int)offsetof(struct obdo, o_valid));
333         LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 4, " found %lld\n",
334                  (long long)(int)sizeof(((struct obdo *)0)->o_valid));
335         LASSERTF((int)offsetof(struct obdo, o_misc) == 96, " found %lld\n",
336                  (long long)(int)offsetof(struct obdo, o_misc));
337         LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n",
338                  (long long)(int)sizeof(((struct obdo *)0)->o_misc));
339         LASSERTF((int)offsetof(struct obdo, o_easize) == 100, " found %lld\n",
340                  (long long)(int)offsetof(struct obdo, o_easize));
341         LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n",
342                  (long long)(int)sizeof(((struct obdo *)0)->o_easize));
343         LASSERTF((int)offsetof(struct obdo, o_mds) == 104, " found %lld\n",
344                  (long long)(int)offsetof(struct obdo, o_mds));
345         LASSERTF((int)sizeof(((struct obdo *)0)->o_mds) == 4, " found %lld\n",
346                  (long long)(int)sizeof(((struct obdo *)0)->o_mds));
347         LASSERTF((int)offsetof(struct obdo, o_padding) == 108, " found %lld\n",
348                  (long long)(int)offsetof(struct obdo, o_padding));
349         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding) == 4, " found %lld\n",
350                  (long long)(int)sizeof(((struct obdo *)0)->o_padding));
351         LASSERTF((int)offsetof(struct obdo, o_inline) == 112, " found %lld\n",
352                  (long long)(int)offsetof(struct obdo, o_inline));
353         LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 64, " found %lld\n",
354                  (long long)(int)sizeof(((struct obdo *)0)->o_inline));
355         LASSERTF(OBD_MD_FLID == 1, " found %lld\n",
356                  (long long)OBD_MD_FLID);
357         LASSERTF(OBD_MD_FLATIME == 2, " found %lld\n",
358                  (long long)OBD_MD_FLATIME);
359         LASSERTF(OBD_MD_FLMTIME == 4, " found %lld\n",
360                  (long long)OBD_MD_FLMTIME);
361         LASSERTF(OBD_MD_FLCTIME == 8, " found %lld\n",
362                  (long long)OBD_MD_FLCTIME);
363         LASSERTF(OBD_MD_FLSIZE == 16, " found %lld\n",
364                  (long long)OBD_MD_FLSIZE);
365         LASSERTF(OBD_MD_FLBLOCKS == 32, " found %lld\n",
366                  (long long)OBD_MD_FLBLOCKS);
367         LASSERTF(OBD_MD_FLBLKSZ == 64, " found %lld\n",
368                  (long long)OBD_MD_FLBLKSZ);
369         LASSERTF(OBD_MD_FLMODE == 128, " found %lld\n",
370                  (long long)OBD_MD_FLMODE);
371         LASSERTF(OBD_MD_FLTYPE == 256, " found %lld\n",
372                  (long long)OBD_MD_FLTYPE);
373         LASSERTF(OBD_MD_FLUID == 512, " found %lld\n",
374                  (long long)OBD_MD_FLUID);
375         LASSERTF(OBD_MD_FLGID == 1024, " found %lld\n",
376                  (long long)OBD_MD_FLGID);
377         LASSERTF(OBD_MD_FLFLAGS == 2048, " found %lld\n",
378                  (long long)OBD_MD_FLFLAGS);
379         LASSERTF(OBD_MD_FLNLINK == 8192, " found %lld\n",
380                  (long long)OBD_MD_FLNLINK);
381         LASSERTF(OBD_MD_FLGENER == 16384, " found %lld\n",
382                  (long long)OBD_MD_FLGENER);
383         LASSERTF(OBD_MD_FLINLINE == 32768, " found %lld\n",
384                  (long long)OBD_MD_FLINLINE);
385         LASSERTF(OBD_MD_FLRDEV == 65536, " found %lld\n",
386                  (long long)OBD_MD_FLRDEV);
387         LASSERTF(OBD_MD_FLEASIZE == 131072, " found %lld\n",
388                  (long long)OBD_MD_FLEASIZE);
389         LASSERTF(OBD_MD_LINKNAME == 262144, " found %lld\n",
390                  (long long)OBD_MD_LINKNAME);
391         LASSERTF(OBD_MD_FLHANDLE == 524288, " found %lld\n",
392                  (long long)OBD_MD_FLHANDLE);
393         LASSERTF(OBD_MD_FLCKSUM == 1048576, " found %lld\n",
394                  (long long)OBD_MD_FLCKSUM);
395         LASSERTF(OBD_MD_FLQOS == 2097152, " found %lld\n",
396                  (long long)OBD_MD_FLQOS);
397         LASSERTF(OBD_MD_FLOSCOPQ == 4194304, " found %lld\n",
398                  (long long)OBD_MD_FLOSCOPQ);
399         LASSERTF(OBD_MD_FLCOOKIE == 8388608, " found %lld\n",
400                  (long long)OBD_MD_FLCOOKIE);
401         LASSERTF(OBD_MD_FLGROUP == 16777216, " found %lld\n",
402                  (long long)OBD_MD_FLGROUP);
403         LASSERTF(OBD_FL_INLINEDATA == 1, " found %lld\n",
404                  (long long)OBD_FL_INLINEDATA);
405         LASSERTF(OBD_FL_OBDMDEXISTS == 2, " found %lld\n",
406                  (long long)OBD_FL_OBDMDEXISTS);
407         LASSERTF(OBD_FL_DELORPHAN == 4, " found %lld\n",
408                  (long long)OBD_FL_DELORPHAN);
409         LASSERTF(OBD_FL_NORPC == 8, " found %lld\n",
410                  (long long)OBD_FL_NORPC);
411         LASSERTF(OBD_FL_IDONLY == 16, " found %lld\n",
412                  (long long)OBD_FL_IDONLY);
413         LASSERTF(OBD_FL_RECREATE_OBJS == 32, " found %lld\n",
414                  (long long)OBD_FL_RECREATE_OBJS);
415
416         /* Checks for struct lov_mds_md_v1 */
417         LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
418                  (long long)(int)sizeof(struct lov_mds_md_v1));
419         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
420                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
421         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
422                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
423         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
424                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
425         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
426                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
427         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
428                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
429         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
430                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
431         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
432                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr));
433         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
434                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
435         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
436                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
437         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
438                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
439         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
440                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
441         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
442                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
443         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
444                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects));
445         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
446                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
447
448         /* Checks for struct lov_ost_data_v1 */
449         LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
450                  (long long)(int)sizeof(struct lov_ost_data_v1));
451         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
452                  (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
453         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
454                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
455         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
456                  (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr));
457         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
458                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
459         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
460                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
461         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
462                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
463         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
464                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
465         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
466                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
467         LASSERTF(LOV_MAGIC_V0 == 198183888, " found %lld\n",
468                  (long long)LOV_MAGIC_V0);
469         LASSERTF(LOV_MAGIC_V1 == 198249424, " found %lld\n",
470                  (long long)LOV_MAGIC_V1);
471         LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
472                  (long long)LOV_PATTERN_RAID0);
473         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
474                  (long long)LOV_PATTERN_RAID1);
475
476         /* Checks for struct obd_statfs */
477         LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
478                  (long long)(int)sizeof(struct obd_statfs));
479         LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
480                  (long long)(int)offsetof(struct obd_statfs, os_type));
481         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
482                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
483         LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
484                  (long long)(int)offsetof(struct obd_statfs, os_blocks));
485         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
486                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
487         LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
488                  (long long)(int)offsetof(struct obd_statfs, os_bfree));
489         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
490                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
491         LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
492                  (long long)(int)offsetof(struct obd_statfs, os_bavail));
493         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
494                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
495         LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
496                  (long long)(int)offsetof(struct obd_statfs, os_ffree));
497         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
498                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
499         LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
500                  (long long)(int)offsetof(struct obd_statfs, os_fsid));
501         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
502                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
503         LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
504                  (long long)(int)offsetof(struct obd_statfs, os_bsize));
505         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
506                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
507         LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
508                  (long long)(int)offsetof(struct obd_statfs, os_namelen));
509         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
510                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
511         LASSERTF((int)offsetof(struct obd_statfs, os_spare) == 104, " found %lld\n",
512                  (long long)(int)offsetof(struct obd_statfs, os_spare));
513         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare) == 40, " found %lld\n",
514                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare));
515
516         /* Checks for struct obd_ioobj */
517         LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
518                  (long long)(int)sizeof(struct obd_ioobj));
519         LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
520                  (long long)(int)offsetof(struct obd_ioobj, ioo_id));
521         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
522                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
523         LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
524                  (long long)(int)offsetof(struct obd_ioobj, ioo_gr));
525         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
526                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
527         LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
528                  (long long)(int)offsetof(struct obd_ioobj, ioo_type));
529         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
530                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
531         LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
532                  (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
533         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
534                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
535
536         /* Checks for struct niobuf_remote */
537         LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
538                  (long long)(int)sizeof(struct niobuf_remote));
539         LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
540                  (long long)(int)offsetof(struct niobuf_remote, offset));
541         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
542                  (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
543         LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
544                  (long long)(int)offsetof(struct niobuf_remote, len));
545         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
546                  (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
547         LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
548                  (long long)(int)offsetof(struct niobuf_remote, flags));
549         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
550                  (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
551         LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
552                  (long long)OBD_BRW_READ);
553         LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
554                  (long long)OBD_BRW_WRITE);
555         LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
556                  (long long)OBD_BRW_SYNC);
557         LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
558                  (long long)OBD_BRW_FROM_GRANT);
559
560         /* Checks for struct ost_body */
561         LASSERTF((int)sizeof(struct ost_body) == 176, " found %lld\n",
562                  (long long)(int)sizeof(struct ost_body));
563         LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n",
564                  (long long)(int)offsetof(struct ost_body, oa));
565         LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 176, " found %lld\n",
566                  (long long)(int)sizeof(((struct ost_body *)0)->oa));
567
568         /* Checks for struct ll_fid */
569         LASSERTF((int)sizeof(struct ll_fid) == 24, " found %lld\n",
570                  (long long)(int)sizeof(struct ll_fid));
571         LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
572                  (long long)(int)offsetof(struct ll_fid, id));
573         LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
574                  (long long)(int)sizeof(((struct ll_fid *)0)->id));
575         LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
576                  (long long)(int)offsetof(struct ll_fid, generation));
577         LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
578                  (long long)(int)sizeof(((struct ll_fid *)0)->generation));
579         LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
580                  (long long)(int)offsetof(struct ll_fid, f_type));
581         LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
582                  (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
583
584         /* Checks for struct mds_status_req */
585         LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
586                  (long long)(int)sizeof(struct mds_status_req));
587         LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
588                  (long long)(int)offsetof(struct mds_status_req, flags));
589         LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
590                  (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
591         LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
592                  (long long)(int)offsetof(struct mds_status_req, repbuf));
593         LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
594                  (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
595
596         /* Checks for struct mds_body */
597         LASSERTF((int)sizeof(struct mds_body) == 136, " found %lld\n",
598                  (long long)(int)sizeof(struct mds_body));
599         LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n",
600                  (long long)(int)offsetof(struct mds_body, fid1));
601         LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 24, " found %lld\n",
602                  (long long)(int)sizeof(((struct mds_body *)0)->fid1));
603         LASSERTF((int)offsetof(struct mds_body, fid2) == 24, " found %lld\n",
604                  (long long)(int)offsetof(struct mds_body, fid2));
605         LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 24, " found %lld\n",
606                  (long long)(int)sizeof(((struct mds_body *)0)->fid2));
607         LASSERTF((int)offsetof(struct mds_body, handle) == 48, " found %lld\n",
608                  (long long)(int)offsetof(struct mds_body, handle));
609         LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
610                  (long long)(int)sizeof(((struct mds_body *)0)->handle));
611         LASSERTF((int)offsetof(struct mds_body, size) == 56, " found %lld\n",
612                  (long long)(int)offsetof(struct mds_body, size));
613         LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
614                  (long long)(int)sizeof(((struct mds_body *)0)->size));
615         LASSERTF((int)offsetof(struct mds_body, blocks) == 64, " found %lld\n",
616                  (long long)(int)offsetof(struct mds_body, blocks));
617         LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
618                  (long long)(int)sizeof(((struct mds_body *)0)->blocks));
619         LASSERTF((int)offsetof(struct mds_body, io_epoch) == 72, " found %lld\n",
620                  (long long)(int)offsetof(struct mds_body, io_epoch));
621         LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
622                  (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
623         LASSERTF((int)offsetof(struct mds_body, ino) == 80, " found %lld\n",
624                  (long long)(int)offsetof(struct mds_body, ino));
625         LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 4, " found %lld\n",
626                  (long long)(int)sizeof(((struct mds_body *)0)->ino));
627         LASSERTF((int)offsetof(struct mds_body, valid) == 84, " found %lld\n",
628                  (long long)(int)offsetof(struct mds_body, valid));
629         LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 4, " found %lld\n",
630                  (long long)(int)sizeof(((struct mds_body *)0)->valid));
631         LASSERTF((int)offsetof(struct mds_body, mode) == 88, " found %lld\n",
632                  (long long)(int)offsetof(struct mds_body, mode));
633         LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
634                  (long long)(int)sizeof(((struct mds_body *)0)->mode));
635         LASSERTF((int)offsetof(struct mds_body, uid) == 92, " found %lld\n",
636                  (long long)(int)offsetof(struct mds_body, uid));
637         LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
638                  (long long)(int)sizeof(((struct mds_body *)0)->uid));
639         LASSERTF((int)offsetof(struct mds_body, gid) == 96, " found %lld\n",
640                  (long long)(int)offsetof(struct mds_body, gid));
641         LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
642                  (long long)(int)sizeof(((struct mds_body *)0)->gid));
643         LASSERTF((int)offsetof(struct mds_body, mtime) == 100, " found %lld\n",
644                  (long long)(int)offsetof(struct mds_body, mtime));
645         LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 4, " found %lld\n",
646                  (long long)(int)sizeof(((struct mds_body *)0)->mtime));
647         LASSERTF((int)offsetof(struct mds_body, ctime) == 104, " found %lld\n",
648                  (long long)(int)offsetof(struct mds_body, ctime));
649         LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 4, " found %lld\n",
650                  (long long)(int)sizeof(((struct mds_body *)0)->ctime));
651         LASSERTF((int)offsetof(struct mds_body, atime) == 108, " found %lld\n",
652                  (long long)(int)offsetof(struct mds_body, atime));
653         LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 4, " found %lld\n",
654                  (long long)(int)sizeof(((struct mds_body *)0)->atime));
655         LASSERTF((int)offsetof(struct mds_body, flags) == 112, " found %lld\n",
656                  (long long)(int)offsetof(struct mds_body, flags));
657         LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
658                  (long long)(int)sizeof(((struct mds_body *)0)->flags));
659         LASSERTF((int)offsetof(struct mds_body, rdev) == 116, " found %lld\n",
660                  (long long)(int)offsetof(struct mds_body, rdev));
661         LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
662                  (long long)(int)sizeof(((struct mds_body *)0)->rdev));
663         LASSERTF((int)offsetof(struct mds_body, nlink) == 120, " found %lld\n",
664                  (long long)(int)offsetof(struct mds_body, nlink));
665         LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
666                  (long long)(int)sizeof(((struct mds_body *)0)->nlink));
667         LASSERTF((int)offsetof(struct mds_body, generation) == 124, " found %lld\n",
668                  (long long)(int)offsetof(struct mds_body, generation));
669         LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
670                  (long long)(int)sizeof(((struct mds_body *)0)->generation));
671         LASSERTF((int)offsetof(struct mds_body, eadatasize) == 128, " found %lld\n",
672                  (long long)(int)offsetof(struct mds_body, eadatasize));
673         LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
674                  (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
675         LASSERTF((int)offsetof(struct mds_body, mds) == 132, " found %lld\n",
676                  (long long)(int)offsetof(struct mds_body, mds));
677         LASSERTF((int)sizeof(((struct mds_body *)0)->mds) == 4, " found %lld\n",
678                  (long long)(int)sizeof(((struct mds_body *)0)->mds));
679         LASSERTF(FMODE_READ == 1, " found %lld\n",
680                  (long long)FMODE_READ);
681         LASSERTF(FMODE_WRITE == 2, " found %lld\n",
682                  (long long)FMODE_WRITE);
683         LASSERTF(FMODE_EXEC == 4, " found %lld\n",
684                  (long long)FMODE_EXEC);
685         LASSERTF(MDS_OPEN_CREAT == 64, " found %lld\n",
686                  (long long)MDS_OPEN_CREAT);
687         LASSERTF(MDS_OPEN_EXCL == 128, " found %lld\n",
688                  (long long)MDS_OPEN_EXCL);
689         LASSERTF(MDS_OPEN_TRUNC == 512, " found %lld\n",
690                  (long long)MDS_OPEN_TRUNC);
691         LASSERTF(MDS_OPEN_APPEND == 1024, " found %lld\n",
692                  (long long)MDS_OPEN_APPEND);
693         LASSERTF(MDS_OPEN_SYNC == 4096, " found %lld\n",
694                  (long long)MDS_OPEN_SYNC);
695         LASSERTF(MDS_OPEN_DIRECTORY == 65536, " found %lld\n",
696                  (long long)MDS_OPEN_DIRECTORY);
697         LASSERTF(MDS_OPEN_DELAY_CREATE == 16777216, " found %lld\n",
698                  (long long)MDS_OPEN_DELAY_CREATE);
699         LASSERTF(MDS_OPEN_HAS_EA == 1073741824, " found %lld\n",
700                  (long long)MDS_OPEN_HAS_EA);
701
702         /* Checks for struct mds_rec_setattr */
703         LASSERTF((int)sizeof(struct mds_rec_setattr) == 80, " found %lld\n",
704                  (long long)(int)sizeof(struct mds_rec_setattr));
705         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
706                  (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
707         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
708                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
709         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 4, " found %lld\n",
710                  (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
711         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 4, " found %lld\n",
712                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
713         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 8, " found %lld\n",
714                  (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
715         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 24, " found %lld\n",
716                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
717         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 32, " found %lld\n",
718                  (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
719         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
720                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
721         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 36, " found %lld\n",
722                  (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
723         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
724                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
725         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 40, " found %lld\n",
726                  (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
727         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
728                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
729         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 44, " found %lld\n",
730                  (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
731         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
732                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
733         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
734                  (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
735         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
736                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
737         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 56, " found %lld\n",
738                  (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
739         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
740                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
741         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 64, " found %lld\n",
742                  (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
743         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
744                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
745         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
746                  (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
747         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
748                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
749
750         /* Checks for struct mds_rec_create */
751         LASSERTF((int)sizeof(struct mds_rec_create) == 80, " found %lld\n",
752                  (long long)(int)sizeof(struct mds_rec_create));
753         LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
754                  (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
755         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
756                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
757         LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 4, " found %lld\n",
758                  (long long)(int)offsetof(struct mds_rec_create, cr_flags));
759         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
760                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
761         LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 8, " found %lld\n",
762                  (long long)(int)offsetof(struct mds_rec_create, cr_mode));
763         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
764                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
765         LASSERTF((int)offsetof(struct mds_rec_create, cr_padding) == 12, " found %lld\n",
766                  (long long)(int)offsetof(struct mds_rec_create, cr_padding));
767         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_padding) == 4, " found %lld\n",
768                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_padding));
769         LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 16, " found %lld\n",
770                  (long long)(int)offsetof(struct mds_rec_create, cr_fid));
771         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 24, " found %lld\n",
772                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
773         LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
774                  (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
775         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 24, " found %lld\n",
776                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
777         LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 64, " found %lld\n",
778                  (long long)(int)offsetof(struct mds_rec_create, cr_time));
779         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
780                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
781         LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 72, " found %lld\n",
782                  (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
783         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
784                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
785
786         /* Checks for struct mds_rec_link */
787         LASSERTF((int)sizeof(struct mds_rec_link) == 64, " found %lld\n",
788                  (long long)(int)sizeof(struct mds_rec_link));
789         LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
790                  (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
791         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
792                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
793         LASSERTF((int)offsetof(struct mds_rec_link, lk_padding) == 4, " found %lld\n",
794                  (long long)(int)offsetof(struct mds_rec_link, lk_padding));
795         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_padding) == 4, " found %lld\n",
796                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_padding));
797         LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 8, " found %lld\n",
798                  (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
799         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 24, " found %lld\n",
800                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
801         LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 32, " found %lld\n",
802                  (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
803         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 24, " found %lld\n",
804                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
805         LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
806                  (long long)(int)offsetof(struct mds_rec_link, lk_time));
807         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
808                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
809
810         /* Checks for struct mds_rec_unlink */
811         LASSERTF((int)sizeof(struct mds_rec_unlink) == 64, " found %lld\n",
812                  (long long)(int)sizeof(struct mds_rec_unlink));
813         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
814                  (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
815         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
816                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
817         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 4, " found %lld\n",
818                  (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
819         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
820                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
821         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 8, " found %lld\n",
822                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
823         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 24, " found %lld\n",
824                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
825         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 32, " found %lld\n",
826                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
827         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 24, " found %lld\n",
828                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
829         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
830                  (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
831         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
832                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
833
834         /* Checks for struct mds_rec_rename */
835         LASSERTF((int)sizeof(struct mds_rec_rename) == 64, " found %lld\n",
836                  (long long)(int)sizeof(struct mds_rec_rename));
837         LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
838                  (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
839         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
840                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
841         LASSERTF((int)offsetof(struct mds_rec_rename, rn_padding) == 4, " found %lld\n",
842                  (long long)(int)offsetof(struct mds_rec_rename, rn_padding));
843         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_padding) == 4, " found %lld\n",
844                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_padding));
845         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 8, " found %lld\n",
846                  (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
847         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 24, " found %lld\n",
848                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
849         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 32, " found %lld\n",
850                  (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
851         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 24, " found %lld\n",
852                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
853         LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
854                  (long long)(int)offsetof(struct mds_rec_rename, rn_time));
855         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
856                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
857
858         /* Checks for struct lov_desc */
859         LASSERTF((int)sizeof(struct lov_desc) == 72, " found %lld\n",
860                  (long long)(int)sizeof(struct lov_desc));
861         LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
862                  (long long)(int)offsetof(struct lov_desc, ld_tgt_count));
863         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
864                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
865         LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
866                  (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count));
867         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
868                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
869         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
870                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count));
871         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
872                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
873         LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
874                  (long long)(int)offsetof(struct lov_desc, ld_pattern));
875         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
876                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
877         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
878                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size));
879         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
880                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
881         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
882                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
883         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
884                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
885         LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 32, " found %lld\n",
886                  (long long)(int)offsetof(struct lov_desc, ld_uuid));
887         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
888                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
889
890         /* Checks for struct ldlm_res_id */
891         LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
892                  (long long)(int)sizeof(struct ldlm_res_id));
893         LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
894                  (long long)(int)offsetof(struct ldlm_res_id, name[4]));
895         LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
896                  (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
897
898         /* Checks for struct ldlm_extent */
899         LASSERTF((int)sizeof(struct ldlm_extent) == 24, " found %lld\n",
900                  (long long)(int)sizeof(struct ldlm_extent));
901         LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
902                  (long long)(int)offsetof(struct ldlm_extent, start));
903         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
904                  (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
905         LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
906                  (long long)(int)offsetof(struct ldlm_extent, end));
907         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
908                  (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
909         LASSERTF((int)offsetof(struct ldlm_extent, gid) == 16, " found %lld\n",
910                  (long long)(int)offsetof(struct ldlm_extent, gid));
911         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->gid) == 8, " found %lld\n",
912                  (long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
913
914         /* Checks for struct ldlm_flock */
915         LASSERTF((int)sizeof(struct ldlm_flock) == 40, " found %lld\n",
916                  (long long)(int)sizeof(struct ldlm_flock));
917         LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
918                  (long long)(int)offsetof(struct ldlm_flock, start));
919         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
920                  (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
921         LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
922                  (long long)(int)offsetof(struct ldlm_flock, end));
923         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
924                  (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
925         LASSERTF((int)offsetof(struct ldlm_flock, pid) == 16, " found %lld\n",
926                  (long long)(int)offsetof(struct ldlm_flock, pid));
927         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 8, " found %lld\n",
928                  (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
929         LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
930                  (long long)(int)offsetof(struct ldlm_flock, blocking_pid));
931         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 8, " found %lld\n",
932                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
933         LASSERTF((int)offsetof(struct ldlm_flock, blocking_export) == 32, " found %lld\n",
934                  (long long)(int)offsetof(struct ldlm_flock, blocking_export));
935         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_export) == 8, " found %lld\n",
936                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_export));
937
938         /* Checks for struct ldlm_intent */
939         LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
940                  (long long)(int)sizeof(struct ldlm_intent));
941         LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
942                  (long long)(int)offsetof(struct ldlm_intent, opc));
943         LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
944                  (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
945
946         /* Checks for struct ldlm_resource_desc */
947         LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
948                  (long long)(int)sizeof(struct ldlm_resource_desc));
949         LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
950                  (long long)(int)offsetof(struct ldlm_resource_desc, lr_type));
951         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
952                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
953         LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
954                  (long long)(int)offsetof(struct ldlm_resource_desc, lr_name));
955         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
956                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
957
958         /* Checks for struct ldlm_lock_desc */
959         LASSERTF((int)sizeof(struct ldlm_lock_desc) == 88, " found %lld\n",
960                  (long long)(int)sizeof(struct ldlm_lock_desc));
961         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
962                  (long long)(int)offsetof(struct ldlm_lock_desc, l_resource));
963         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
964                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
965         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
966                  (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode));
967         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
968                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
969         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
970                  (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode));
971         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
972                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
973         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
974                  (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data));
975         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 40, " found %lld\n",
976                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
977
978         /* Checks for struct ldlm_request */
979         LASSERTF((int)sizeof(struct ldlm_request) == 112, " found %lld\n",
980                  (long long)(int)sizeof(struct ldlm_request));
981         LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
982                  (long long)(int)offsetof(struct ldlm_request, lock_flags));
983         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
984                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
985         LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
986                  (long long)(int)offsetof(struct ldlm_request, lock_desc));
987         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 88, " found %lld\n",
988                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
989         LASSERTF((int)offsetof(struct ldlm_request, lock_handle1) == 96, " found %lld\n",
990                  (long long)(int)offsetof(struct ldlm_request, lock_handle1));
991         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8, " found %lld\n",
992                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle1));
993         LASSERTF((int)offsetof(struct ldlm_request, lock_handle2) == 104, " found %lld\n",
994                  (long long)(int)offsetof(struct ldlm_request, lock_handle2));
995         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8, " found %lld\n",
996                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle2));
997
998         /* Checks for struct ldlm_reply */
999         LASSERTF((int)sizeof(struct ldlm_reply) == 120, " found %lld\n",
1000                  (long long)(int)sizeof(struct ldlm_reply));
1001         LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
1002                  (long long)(int)offsetof(struct ldlm_reply, lock_flags));
1003         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
1004                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
1005         LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
1006                  (long long)(int)offsetof(struct ldlm_request, lock_desc));
1007         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 88, " found %lld\n",
1008                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
1009         LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 96, " found %lld\n",
1010                  (long long)(int)offsetof(struct ldlm_reply, lock_handle));
1011         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
1012                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
1013         LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 104, " found %lld\n",
1014                  (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1));
1015         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
1016                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
1017         LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 112, " found %lld\n",
1018                  (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2));
1019         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
1020                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
1021
1022         /* Checks for struct ost_lvb */
1023         LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
1024                  (long long)(int)sizeof(struct ost_lvb));
1025         LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
1026                  (long long)(int)offsetof(struct ost_lvb, lvb_size));
1027         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
1028                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
1029         LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
1030                  (long long)(int)offsetof(struct ost_lvb, lvb_mtime));
1031         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
1032                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
1033         LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
1034                  (long long)(int)offsetof(struct ost_lvb, lvb_atime));
1035         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
1036                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
1037         LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
1038                  (long long)(int)offsetof(struct ost_lvb, lvb_ctime));
1039         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
1040                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
1041         LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
1042                  (long long)(int)offsetof(struct ost_lvb, lvb_blocks));
1043         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
1044                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
1045
1046         /* Checks for struct ptlbd_op */
1047         LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n",
1048                  (long long)(int)sizeof(struct ptlbd_op));
1049         LASSERTF((int)offsetof(struct ptlbd_op, op_cmd) == 0, " found %lld\n",
1050                  (long long)(int)offsetof(struct ptlbd_op, op_cmd));
1051         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_cmd) == 2, " found %lld\n",
1052                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_cmd));
1053         LASSERTF((int)offsetof(struct ptlbd_op, op_lun) == 2, " found %lld\n",
1054                  (long long)(int)offsetof(struct ptlbd_op, op_lun));
1055         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_lun) == 2, " found %lld\n",
1056                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_lun));
1057         LASSERTF((int)offsetof(struct ptlbd_op, op_niob_cnt) == 4, " found %lld\n",
1058                  (long long)(int)offsetof(struct ptlbd_op, op_niob_cnt));
1059         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt) == 2, " found %lld\n",
1060                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt));
1061         LASSERTF((int)offsetof(struct ptlbd_op, op__padding) == 6, " found %lld\n",
1062                  (long long)(int)offsetof(struct ptlbd_op, op__padding));
1063         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op__padding) == 2, " found %lld\n",
1064                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op__padding));
1065         LASSERTF((int)offsetof(struct ptlbd_op, op_block_cnt) == 8, " found %lld\n",
1066                  (long long)(int)offsetof(struct ptlbd_op, op_block_cnt));
1067         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_block_cnt) == 4, " found %lld\n",
1068                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_block_cnt));
1069
1070         /* Checks for struct ptlbd_niob */
1071         LASSERTF((int)sizeof(struct ptlbd_niob) == 24, " found %lld\n",
1072                  (long long)(int)sizeof(struct ptlbd_niob));
1073         LASSERTF((int)offsetof(struct ptlbd_niob, n_xid) == 0, " found %lld\n",
1074                  (long long)(int)offsetof(struct ptlbd_niob, n_xid));
1075         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_xid) == 8, " found %lld\n",
1076                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_xid));
1077         LASSERTF((int)offsetof(struct ptlbd_niob, n_block_nr) == 8, " found %lld\n",
1078                  (long long)(int)offsetof(struct ptlbd_niob, n_block_nr));
1079         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_block_nr) == 8, " found %lld\n",
1080                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_block_nr));
1081         LASSERTF((int)offsetof(struct ptlbd_niob, n_offset) == 16, " found %lld\n",
1082                  (long long)(int)offsetof(struct ptlbd_niob, n_offset));
1083         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_offset) == 4, " found %lld\n",
1084                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_offset));
1085         LASSERTF((int)offsetof(struct ptlbd_niob, n_length) == 20, " found %lld\n",
1086                  (long long)(int)offsetof(struct ptlbd_niob, n_length));
1087         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_length) == 4, " found %lld\n",
1088                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_length));
1089
1090         /* Checks for struct ptlbd_rsp */
1091         LASSERTF((int)sizeof(struct ptlbd_rsp) == 4, " found %lld\n",
1092                  (long long)(int)sizeof(struct ptlbd_rsp));
1093         LASSERTF((int)offsetof(struct ptlbd_rsp, r_status) == 0, " found %lld\n",
1094                  (long long)(int)offsetof(struct ptlbd_rsp, r_status));
1095         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_status) == 2, " found %lld\n",
1096                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_status));
1097         LASSERTF((int)offsetof(struct ptlbd_rsp, r_error_cnt) == 2, " found %lld\n",
1098                  (long long)(int)offsetof(struct ptlbd_rsp, r_error_cnt));
1099         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt) == 2, " found %lld\n",
1100                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt));
1101
1102         /* Checks for struct llog_logid */
1103         LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
1104                  (long long)(int)sizeof(struct llog_logid));
1105         LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
1106                  (long long)(int)offsetof(struct llog_logid, lgl_oid));
1107         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
1108                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
1109         LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
1110                  (long long)(int)offsetof(struct llog_logid, lgl_ogr));
1111         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
1112                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
1113         LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
1114                  (long long)(int)offsetof(struct llog_logid, lgl_ogen));
1115         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
1116                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
1117         LASSERTF(OST_SZ_REC == 274730752, " found %lld\n",
1118                  (long long)OST_SZ_REC);
1119         LASSERTF(OST_RAID1_REC == 274731008, " found %lld\n",
1120                  (long long)OST_RAID1_REC);
1121         LASSERTF(MDS_UNLINK_REC == 274801668, " found %lld\n",
1122                  (long long)MDS_UNLINK_REC);
1123         LASSERTF(OBD_CFG_REC == 274857984, " found %lld\n",
1124                  (long long)OBD_CFG_REC);
1125         LASSERTF(PTL_CFG_REC == 274923520, " found %lld\n",
1126                  (long long)PTL_CFG_REC);
1127         LASSERTF(LLOG_GEN_REC == 274989056, " found %lld\n",
1128                  (long long)LLOG_GEN_REC);
1129         LASSERTF(LLOG_HDR_MAGIC == 275010873, " found %lld\n",
1130                  (long long)LLOG_HDR_MAGIC);
1131         LASSERTF(LLOG_LOGID_MAGIC == 275010875, " found %lld\n",
1132                  (long long)LLOG_LOGID_MAGIC);
1133
1134         /* Checks for struct llog_catid */
1135         LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
1136                  (long long)(int)sizeof(struct llog_catid));
1137         LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
1138                  (long long)(int)offsetof(struct llog_catid, lci_logid));
1139         LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
1140                  (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
1141
1142         /* Checks for struct llog_rec_hdr */
1143         LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
1144                  (long long)(int)sizeof(struct llog_rec_hdr));
1145         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
1146                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_len));
1147         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
1148                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
1149         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
1150                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_index));
1151         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
1152                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
1153         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
1154                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_type));
1155         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
1156                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
1157
1158         /* Checks for struct llog_rec_tail */
1159         LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
1160                  (long long)(int)sizeof(struct llog_rec_tail));
1161         LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
1162                  (long long)(int)offsetof(struct llog_rec_tail, lrt_len));
1163         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
1164                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
1165         LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
1166                  (long long)(int)offsetof(struct llog_rec_tail, lrt_index));
1167         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
1168                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
1169
1170         /* Checks for struct llog_logid_rec */
1171         LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
1172                  (long long)(int)sizeof(struct llog_logid_rec));
1173         LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
1174                  (long long)(int)offsetof(struct llog_logid_rec, lid_hdr));
1175         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
1176                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
1177         LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
1178                  (long long)(int)offsetof(struct llog_logid_rec, lid_id));
1179         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
1180                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
1181         LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
1182                  (long long)(int)offsetof(struct llog_logid_rec, lid_tail));
1183         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
1184                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
1185
1186         /* Checks for struct llog_create_rec */
1187         LASSERTF((int)sizeof(struct llog_create_rec) == 64, " found %lld\n",
1188                  (long long)(int)sizeof(struct llog_create_rec));
1189         LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
1190                  (long long)(int)offsetof(struct llog_create_rec, lcr_hdr));
1191         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
1192                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
1193         LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
1194                  (long long)(int)offsetof(struct llog_create_rec, lcr_fid));
1195         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 24, " found %lld\n",
1196                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
1197         LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 40, " found %lld\n",
1198                  (long long)(int)offsetof(struct llog_create_rec, lcr_oid));
1199         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
1200                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
1201         LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 48, " found %lld\n",
1202                  (long long)(int)offsetof(struct llog_create_rec, lcr_ogen));
1203         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
1204                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
1205
1206         /* Checks for struct llog_orphan_rec */
1207         LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
1208                  (long long)(int)sizeof(struct llog_orphan_rec));
1209         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
1210                  (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr));
1211         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
1212                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
1213         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
1214                  (long long)(int)offsetof(struct llog_orphan_rec, lor_oid));
1215         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
1216                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
1217         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
1218                  (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen));
1219         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
1220                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
1221         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
1222                  (long long)(int)offsetof(struct llog_orphan_rec, lor_tail));
1223         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
1224                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
1225
1226         /* Checks for struct llog_unlink_rec */
1227         LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
1228                  (long long)(int)sizeof(struct llog_unlink_rec));
1229         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
1230                  (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr));
1231         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
1232                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
1233         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
1234                  (long long)(int)offsetof(struct llog_unlink_rec, lur_oid));
1235         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
1236                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
1237         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
1238                  (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen));
1239         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
1240                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
1241         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
1242                  (long long)(int)offsetof(struct llog_unlink_rec, lur_tail));
1243         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
1244                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
1245
1246         /* Checks for struct llog_size_change_rec */
1247         LASSERTF((int)sizeof(struct llog_size_change_rec) == 56, " found %lld\n",
1248                  (long long)(int)sizeof(struct llog_size_change_rec));
1249         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
1250                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr));
1251         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
1252                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
1253         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
1254                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid));
1255         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 24, " found %lld\n",
1256                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
1257         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 40, " found %lld\n",
1258                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch));
1259         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
1260                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
1261         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 48, " found %lld\n",
1262                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail));
1263         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
1264                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
1265
1266         /* Checks for struct llog_gen */
1267         LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
1268                  (long long)(int)sizeof(struct llog_gen));
1269         LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
1270                  (long long)(int)offsetof(struct llog_gen, mnt_cnt));
1271         LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
1272                  (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
1273         LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
1274                  (long long)(int)offsetof(struct llog_gen, conn_cnt));
1275         LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
1276                  (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
1277
1278         /* Checks for struct llog_gen_rec */
1279         LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
1280                  (long long)(int)sizeof(struct llog_gen_rec));
1281         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
1282                  (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr));
1283         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
1284                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
1285         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
1286                  (long long)(int)offsetof(struct llog_gen_rec, lgr_gen));
1287         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
1288                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
1289         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
1290                  (long long)(int)offsetof(struct llog_gen_rec, lgr_tail));
1291         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
1292                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
1293
1294         /* Checks for struct llog_log_hdr */
1295         LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
1296                  (long long)(int)sizeof(struct llog_log_hdr));
1297         LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
1298                  (long long)(int)offsetof(struct llog_log_hdr, llh_hdr));
1299         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
1300                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
1301         LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
1302                  (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp));
1303         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
1304                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
1305         LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
1306                  (long long)(int)offsetof(struct llog_log_hdr, llh_count));
1307         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
1308                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
1309         LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
1310                  (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset));
1311         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
1312                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
1313         LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
1314                  (long long)(int)offsetof(struct llog_log_hdr, llh_size));
1315         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
1316                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
1317         LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
1318                  (long long)(int)offsetof(struct llog_log_hdr, llh_flags));
1319         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
1320                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
1321         LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
1322                  (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx));
1323         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
1324                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
1325         LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
1326                  (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid));
1327         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
1328                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
1329         LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
1330                  (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
1331         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
1332                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
1333         LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
1334                  (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
1335         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
1336                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
1337
1338         /* Checks for struct llog_cookie */
1339         LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
1340                  (long long)(int)sizeof(struct llog_cookie));
1341         LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
1342                  (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
1343         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
1344                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
1345         LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
1346                  (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
1347         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
1348                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
1349         LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
1350                  (long long)(int)offsetof(struct llog_cookie, lgc_index));
1351         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
1352                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
1353
1354         /* Checks for struct llogd_body */
1355         LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
1356                  (long long)(int)sizeof(struct llogd_body));
1357         LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
1358                  (long long)(int)offsetof(struct llogd_body, lgd_logid));
1359         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
1360                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
1361         LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
1362                  (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx));
1363         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
1364                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
1365         LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
1366                  (long long)(int)offsetof(struct llogd_body, lgd_llh_flags));
1367         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
1368                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
1369         LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
1370                  (long long)(int)offsetof(struct llogd_body, lgd_index));
1371         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
1372                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
1373         LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
1374                  (long long)(int)offsetof(struct llogd_body, lgd_saved_index));
1375         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
1376                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
1377         LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
1378                  (long long)(int)offsetof(struct llogd_body, lgd_len));
1379         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
1380                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
1381         LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
1382                  (long long)(int)offsetof(struct llogd_body, lgd_cur_offset));
1383         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
1384                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
1385         LASSERTF(LLOG_ORIGIN_HANDLE_OPEN == 501, " found %lld\n",
1386                  (long long)LLOG_ORIGIN_HANDLE_OPEN);
1387         LASSERTF(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502, " found %lld\n",
1388                  (long long)LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
1389         LASSERTF(LLOG_ORIGIN_HANDLE_READ_HEADER == 503, " found %lld\n",
1390                  (long long)LLOG_ORIGIN_HANDLE_READ_HEADER);
1391         LASSERTF(LLOG_ORIGIN_HANDLE_WRITE_REC == 504, " found %lld\n",
1392                  (long long)LLOG_ORIGIN_HANDLE_WRITE_REC);
1393         LASSERTF(LLOG_ORIGIN_HANDLE_CLOSE == 505, " found %lld\n",
1394                  (long long)LLOG_ORIGIN_HANDLE_CLOSE);
1395         LASSERTF(LLOG_ORIGIN_CONNECT == 506, " found %lld\n",
1396                  (long long)LLOG_ORIGIN_CONNECT);
1397         LASSERTF(LLOG_CATINFO == 507, " found %lld\n",
1398                  (long long)LLOG_CATINFO);
1399
1400         /* Checks for struct llogd_conn_body */
1401         LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
1402                  (long long)(int)sizeof(struct llogd_conn_body));
1403         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
1404                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen));
1405         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
1406                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
1407         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
1408                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid));
1409         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
1410                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
1411         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
1412                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
1413         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
1414                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
1415 }
1416