Whamcloud - gitweb
- tagging RC_CURRENT
[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 schnapps.adilger.int 2.4.22-l32 #4 Thu Jan 8 14:32:57 MST 2004 i686 i686 
29          * with gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) */
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 == 6, " 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(offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
212                  (long long)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(offsetof(struct lustre_msg, handle) == 0, " found %lld\n",
220                  (long long)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(offsetof(struct lustre_msg, magic) == 8, " found %lld\n",
224                  (long long)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(offsetof(struct lustre_msg, type) == 12, " found %lld\n",
228                  (long long)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(offsetof(struct lustre_msg, version) == 16, " found %lld\n",
232                  (long long)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(offsetof(struct lustre_msg, opc) == 20, " found %lld\n",
236                  (long long)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(offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n",
240                  (long long)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(offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n",
244                  (long long)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(offsetof(struct lustre_msg, transno) == 40, " found %lld\n",
248                  (long long)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(offsetof(struct lustre_msg, status) == 48, " found %lld\n",
252                  (long long)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(offsetof(struct lustre_msg, flags) == 52, " found %lld\n",
256                  (long long)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(offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n",
260                  (long long)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(offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n",
264                  (long long)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) == 168, " found %lld\n",
270                  (long long)(int)sizeof(struct obdo));
271         LASSERTF(offsetof(struct obdo, o_id) == 0, " found %lld\n",
272                  (long long)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(offsetof(struct obdo, o_gr) == 8, " found %lld\n",
276                  (long long)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(offsetof(struct obdo, o_atime) == 16, " found %lld\n",
280                  (long long)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(offsetof(struct obdo, o_mtime) == 24, " found %lld\n",
284                  (long long)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(offsetof(struct obdo, o_ctime) == 32, " found %lld\n",
288                  (long long)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(offsetof(struct obdo, o_size) == 40, " found %lld\n",
292                  (long long)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(offsetof(struct obdo, o_blocks) == 48, " found %lld\n",
296                  (long long)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(offsetof(struct obdo, o_grant) == 56, " found %lld\n",
300                  (long long)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(offsetof(struct obdo, o_blksize) == 64, " found %lld\n",
304                  (long long)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(offsetof(struct obdo, o_mode) == 68, " found %lld\n",
308                  (long long)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(offsetof(struct obdo, o_uid) == 72, " found %lld\n",
312                  (long long)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(offsetof(struct obdo, o_gid) == 76, " found %lld\n",
316                  (long long)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(offsetof(struct obdo, o_flags) == 80, " found %lld\n",
320                  (long long)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(offsetof(struct obdo, o_nlink) == 84, " found %lld\n",
324                  (long long)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(offsetof(struct obdo, o_generation) == 88, " found %lld\n",
328                  (long long)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(offsetof(struct obdo, o_valid) == 92, " found %lld\n",
332                  (long long)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(offsetof(struct obdo, o_misc) == 96, " found %lld\n",
336                  (long long)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(offsetof(struct obdo, o_easize) == 100, " found %lld\n",
340                  (long long)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(offsetof(struct obdo, o_inline) == 104, " found %lld\n",
344                  (long long)offsetof(struct obdo, o_inline));
345         LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 64, " found %lld\n",
346                  (long long)(int)sizeof(((struct obdo *)0)->o_inline));
347         LASSERTF(OBD_MD_FLID == 1, " found %lld\n",
348                  (long long)OBD_MD_FLID);
349         LASSERTF(OBD_MD_FLATIME == 2, " found %lld\n",
350                  (long long)OBD_MD_FLATIME);
351         LASSERTF(OBD_MD_FLMTIME == 4, " found %lld\n",
352                  (long long)OBD_MD_FLMTIME);
353         LASSERTF(OBD_MD_FLCTIME == 8, " found %lld\n",
354                  (long long)OBD_MD_FLCTIME);
355         LASSERTF(OBD_MD_FLSIZE == 16, " found %lld\n",
356                  (long long)OBD_MD_FLSIZE);
357         LASSERTF(OBD_MD_FLBLOCKS == 32, " found %lld\n",
358                  (long long)OBD_MD_FLBLOCKS);
359         LASSERTF(OBD_MD_FLBLKSZ == 64, " found %lld\n",
360                  (long long)OBD_MD_FLBLKSZ);
361         LASSERTF(OBD_MD_FLMODE == 128, " found %lld\n",
362                  (long long)OBD_MD_FLMODE);
363         LASSERTF(OBD_MD_FLTYPE == 256, " found %lld\n",
364                  (long long)OBD_MD_FLTYPE);
365         LASSERTF(OBD_MD_FLUID == 512, " found %lld\n",
366                  (long long)OBD_MD_FLUID);
367         LASSERTF(OBD_MD_FLGID == 1024, " found %lld\n",
368                  (long long)OBD_MD_FLGID);
369         LASSERTF(OBD_MD_FLFLAGS == 2048, " found %lld\n",
370                  (long long)OBD_MD_FLFLAGS);
371         LASSERTF(OBD_MD_FLNLINK == 8192, " found %lld\n",
372                  (long long)OBD_MD_FLNLINK);
373         LASSERTF(OBD_MD_FLGENER == 16384, " found %lld\n",
374                  (long long)OBD_MD_FLGENER);
375         LASSERTF(OBD_MD_FLINLINE == 32768, " found %lld\n",
376                  (long long)OBD_MD_FLINLINE);
377         LASSERTF(OBD_MD_FLRDEV == 65536, " found %lld\n",
378                  (long long)OBD_MD_FLRDEV);
379         LASSERTF(OBD_MD_FLEASIZE == 131072, " found %lld\n",
380                  (long long)OBD_MD_FLEASIZE);
381         LASSERTF(OBD_MD_LINKNAME == 262144, " found %lld\n",
382                  (long long)OBD_MD_LINKNAME);
383         LASSERTF(OBD_MD_FLHANDLE == 524288, " found %lld\n",
384                  (long long)OBD_MD_FLHANDLE);
385         LASSERTF(OBD_MD_FLCKSUM == 1048576, " found %lld\n",
386                  (long long)OBD_MD_FLCKSUM);
387         LASSERTF(OBD_MD_FLQOS == 2097152, " found %lld\n",
388                  (long long)OBD_MD_FLQOS);
389         LASSERTF(OBD_MD_FLOSCOPQ == 4194304, " found %lld\n",
390                  (long long)OBD_MD_FLOSCOPQ);
391         LASSERTF(OBD_MD_FLCOOKIE == 8388608, " found %lld\n",
392                  (long long)OBD_MD_FLCOOKIE);
393         LASSERTF(OBD_MD_FLGROUP == 16777216, " found %lld\n",
394                  (long long)OBD_MD_FLGROUP);
395         LASSERTF(OBD_FL_INLINEDATA == 1, " found %lld\n",
396                  (long long)OBD_FL_INLINEDATA);
397         LASSERTF(OBD_FL_OBDMDEXISTS == 2, " found %lld\n",
398                  (long long)OBD_FL_OBDMDEXISTS);
399         LASSERTF(OBD_FL_DELORPHAN == 4, " found %lld\n",
400                  (long long)OBD_FL_DELORPHAN);
401         LASSERTF(OBD_FL_NORPC == 8, " found %lld\n",
402                  (long long)OBD_FL_NORPC);
403         LASSERTF(OBD_FL_IDONLY == 16, " found %lld\n",
404                  (long long)OBD_FL_IDONLY);
405         LASSERTF(OBD_FL_RECREATE_OBJS == 32, " found %lld\n",
406                  (long long)OBD_FL_RECREATE_OBJS);
407
408         /* Checks for struct lov_mds_md_v1 */
409         LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
410                  (long long)(int)sizeof(struct lov_mds_md_v1));
411         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
412                  (long long)offsetof(struct lov_mds_md_v1, lmm_magic));
413         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
414                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
415         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
416                  (long long)offsetof(struct lov_mds_md_v1, lmm_pattern));
417         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
418                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
419         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
420                  (long long)offsetof(struct lov_mds_md_v1, lmm_object_id));
421         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
422                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
423         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
424                  (long long)offsetof(struct lov_mds_md_v1, lmm_object_gr));
425         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
426                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
427         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
428                  (long long)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
429         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
430                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
431         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
432                  (long long)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
433         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
434                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
435         LASSERTF(offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
436                  (long long)offsetof(struct lov_mds_md_v1, lmm_objects));
437         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
438                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
439
440         /* Checks for struct lov_ost_data_v1 */
441         LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
442                  (long long)(int)sizeof(struct lov_ost_data_v1));
443         LASSERTF(offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
444                  (long long)offsetof(struct lov_ost_data_v1, l_object_id));
445         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
446                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
447         LASSERTF(offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
448                  (long long)offsetof(struct lov_ost_data_v1, l_object_gr));
449         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
450                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
451         LASSERTF(offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
452                  (long long)offsetof(struct lov_ost_data_v1, l_ost_gen));
453         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
454                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
455         LASSERTF(offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
456                  (long long)offsetof(struct lov_ost_data_v1, l_ost_idx));
457         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
458                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
459         LASSERTF(LOV_MAGIC_V0 == 198183888, " found %lld\n",
460                  (long long)LOV_MAGIC_V0);
461         LASSERTF(LOV_MAGIC_V1 == 198249424, " found %lld\n",
462                  (long long)LOV_MAGIC_V1);
463         LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
464                  (long long)LOV_PATTERN_RAID0);
465         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
466                  (long long)LOV_PATTERN_RAID1);
467
468         /* Checks for struct obd_statfs */
469         LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
470                  (long long)(int)sizeof(struct obd_statfs));
471         LASSERTF(offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
472                  (long long)offsetof(struct obd_statfs, os_type));
473         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
474                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
475         LASSERTF(offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
476                  (long long)offsetof(struct obd_statfs, os_blocks));
477         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
478                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
479         LASSERTF(offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
480                  (long long)offsetof(struct obd_statfs, os_bfree));
481         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
482                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
483         LASSERTF(offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
484                  (long long)offsetof(struct obd_statfs, os_bavail));
485         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
486                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
487         LASSERTF(offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
488                  (long long)offsetof(struct obd_statfs, os_ffree));
489         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
490                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
491         LASSERTF(offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
492                  (long long)offsetof(struct obd_statfs, os_fsid));
493         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
494                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
495         LASSERTF(offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
496                  (long long)offsetof(struct obd_statfs, os_bsize));
497         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
498                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
499         LASSERTF(offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
500                  (long long)offsetof(struct obd_statfs, os_namelen));
501         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
502                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
503         LASSERTF(offsetof(struct obd_statfs, os_spare) == 104, " found %lld\n",
504                  (long long)offsetof(struct obd_statfs, os_spare));
505         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare) == 40, " found %lld\n",
506                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare));
507
508         /* Checks for struct obd_ioobj */
509         LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
510                  (long long)(int)sizeof(struct obd_ioobj));
511         LASSERTF(offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
512                  (long long)offsetof(struct obd_ioobj, ioo_id));
513         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
514                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
515         LASSERTF(offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
516                  (long long)offsetof(struct obd_ioobj, ioo_gr));
517         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
518                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
519         LASSERTF(offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
520                  (long long)offsetof(struct obd_ioobj, ioo_type));
521         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
522                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
523         LASSERTF(offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
524                  (long long)offsetof(struct obd_ioobj, ioo_bufcnt));
525         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
526                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
527
528         /* Checks for struct niobuf_remote */
529         LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
530                  (long long)(int)sizeof(struct niobuf_remote));
531         LASSERTF(offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
532                  (long long)offsetof(struct niobuf_remote, offset));
533         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
534                  (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
535         LASSERTF(offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
536                  (long long)offsetof(struct niobuf_remote, len));
537         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
538                  (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
539         LASSERTF(offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
540                  (long long)offsetof(struct niobuf_remote, flags));
541         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
542                  (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
543         LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
544                  (long long)OBD_BRW_READ);
545         LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
546                  (long long)OBD_BRW_WRITE);
547         LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
548                  (long long)OBD_BRW_SYNC);
549         LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
550                  (long long)OBD_BRW_FROM_GRANT);
551
552         /* Checks for struct ost_body */
553         LASSERTF((int)sizeof(struct ost_body) == 168, " found %lld\n",
554                  (long long)(int)sizeof(struct ost_body));
555         LASSERTF(offsetof(struct ost_body, oa) == 0, " found %lld\n",
556                  (long long)offsetof(struct ost_body, oa));
557         LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 168, " found %lld\n",
558                  (long long)(int)sizeof(((struct ost_body *)0)->oa));
559
560         /* Checks for struct ll_fid */
561         LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
562                  (long long)(int)sizeof(struct ll_fid));
563         LASSERTF(offsetof(struct ll_fid, id) == 0, " found %lld\n",
564                  (long long)offsetof(struct ll_fid, id));
565         LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
566                  (long long)(int)sizeof(((struct ll_fid *)0)->id));
567         LASSERTF(offsetof(struct ll_fid, generation) == 8, " found %lld\n",
568                  (long long)offsetof(struct ll_fid, generation));
569         LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
570                  (long long)(int)sizeof(((struct ll_fid *)0)->generation));
571         LASSERTF(offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
572                  (long long)offsetof(struct ll_fid, f_type));
573         LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
574                  (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
575
576         /* Checks for struct mds_status_req */
577         LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
578                  (long long)(int)sizeof(struct mds_status_req));
579         LASSERTF(offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
580                  (long long)offsetof(struct mds_status_req, flags));
581         LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
582                  (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
583         LASSERTF(offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
584                  (long long)offsetof(struct mds_status_req, repbuf));
585         LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
586                  (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
587
588         /* Checks for struct mds_body */
589         LASSERTF((int)sizeof(struct mds_body) == 136, " found %lld\n",
590                  (long long)(int)sizeof(struct mds_body));
591         LASSERTF(offsetof(struct mds_body, fid1) == 0, " found %lld\n",
592                  (long long)offsetof(struct mds_body, fid1));
593         LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n",
594                  (long long)(int)sizeof(((struct mds_body *)0)->fid1));
595         LASSERTF(offsetof(struct mds_body, fid2) == 16, " found %lld\n",
596                  (long long)offsetof(struct mds_body, fid2));
597         LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n",
598                  (long long)(int)sizeof(((struct mds_body *)0)->fid2));
599         LASSERTF(offsetof(struct mds_body, handle) == 32, " found %lld\n",
600                  (long long)offsetof(struct mds_body, handle));
601         LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
602                  (long long)(int)sizeof(((struct mds_body *)0)->handle));
603         LASSERTF(offsetof(struct mds_body, size) == 40, " found %lld\n",
604                  (long long)offsetof(struct mds_body, size));
605         LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
606                  (long long)(int)sizeof(((struct mds_body *)0)->size));
607         LASSERTF(offsetof(struct mds_body, blocks) == 48, " found %lld\n",
608                  (long long)offsetof(struct mds_body, blocks));
609         LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
610                  (long long)(int)sizeof(((struct mds_body *)0)->blocks));
611         LASSERTF(offsetof(struct mds_body, io_epoch) == 56, " found %lld\n",
612                  (long long)offsetof(struct mds_body, io_epoch));
613         LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
614                  (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
615         LASSERTF(offsetof(struct mds_body, ino) == 64, " found %lld\n",
616                  (long long)offsetof(struct mds_body, ino));
617         LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 4, " found %lld\n",
618                  (long long)(int)sizeof(((struct mds_body *)0)->ino));
619         LASSERTF(offsetof(struct mds_body, valid) == 68, " found %lld\n",
620                  (long long)offsetof(struct mds_body, valid));
621         LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 4, " found %lld\n",
622                  (long long)(int)sizeof(((struct mds_body *)0)->valid));
623         LASSERTF(offsetof(struct mds_body, fsuid) == 72, " found %lld\n",
624                  (long long)offsetof(struct mds_body, fsuid));
625         LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n",
626                  (long long)(int)sizeof(((struct mds_body *)0)->fsuid));
627         LASSERTF(offsetof(struct mds_body, fsgid) == 76, " found %lld\n",
628                  (long long)offsetof(struct mds_body, fsgid));
629         LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n",
630                  (long long)(int)sizeof(((struct mds_body *)0)->fsgid));
631         LASSERTF(offsetof(struct mds_body, capability) == 80, " found %lld\n",
632                  (long long)offsetof(struct mds_body, capability));
633         LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n",
634                  (long long)(int)sizeof(((struct mds_body *)0)->capability));
635         LASSERTF(offsetof(struct mds_body, mode) == 84, " found %lld\n",
636                  (long long)offsetof(struct mds_body, mode));
637         LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
638                  (long long)(int)sizeof(((struct mds_body *)0)->mode));
639         LASSERTF(offsetof(struct mds_body, uid) == 88, " found %lld\n",
640                  (long long)offsetof(struct mds_body, uid));
641         LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
642                  (long long)(int)sizeof(((struct mds_body *)0)->uid));
643         LASSERTF(offsetof(struct mds_body, gid) == 92, " found %lld\n",
644                  (long long)offsetof(struct mds_body, gid));
645         LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
646                  (long long)(int)sizeof(((struct mds_body *)0)->gid));
647         LASSERTF(offsetof(struct mds_body, mtime) == 96, " found %lld\n",
648                  (long long)offsetof(struct mds_body, mtime));
649         LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 4, " found %lld\n",
650                  (long long)(int)sizeof(((struct mds_body *)0)->mtime));
651         LASSERTF(offsetof(struct mds_body, ctime) == 100, " found %lld\n",
652                  (long long)offsetof(struct mds_body, ctime));
653         LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 4, " found %lld\n",
654                  (long long)(int)sizeof(((struct mds_body *)0)->ctime));
655         LASSERTF(offsetof(struct mds_body, atime) == 104, " found %lld\n",
656                  (long long)offsetof(struct mds_body, atime));
657         LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 4, " found %lld\n",
658                  (long long)(int)sizeof(((struct mds_body *)0)->atime));
659         LASSERTF(offsetof(struct mds_body, flags) == 108, " found %lld\n",
660                  (long long)offsetof(struct mds_body, flags));
661         LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
662                  (long long)(int)sizeof(((struct mds_body *)0)->flags));
663         LASSERTF(offsetof(struct mds_body, rdev) == 112, " found %lld\n",
664                  (long long)offsetof(struct mds_body, rdev));
665         LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
666                  (long long)(int)sizeof(((struct mds_body *)0)->rdev));
667         LASSERTF(offsetof(struct mds_body, nlink) == 116, " found %lld\n",
668                  (long long)offsetof(struct mds_body, nlink));
669         LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
670                  (long long)(int)sizeof(((struct mds_body *)0)->nlink));
671         LASSERTF(offsetof(struct mds_body, generation) == 120, " found %lld\n",
672                  (long long)offsetof(struct mds_body, generation));
673         LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
674                  (long long)(int)sizeof(((struct mds_body *)0)->generation));
675         LASSERTF(offsetof(struct mds_body, suppgid) == 124, " found %lld\n",
676                  (long long)offsetof(struct mds_body, suppgid));
677         LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n",
678                  (long long)(int)sizeof(((struct mds_body *)0)->suppgid));
679         LASSERTF(offsetof(struct mds_body, eadatasize) == 128, " found %lld\n",
680                  (long long)offsetof(struct mds_body, eadatasize));
681         LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
682                  (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
683         LASSERTF(FMODE_READ == 1, " found %lld\n",
684                  (long long)FMODE_READ);
685         LASSERTF(FMODE_WRITE == 2, " found %lld\n",
686                  (long long)FMODE_WRITE);
687         LASSERTF(FMODE_EXEC == 4, " found %lld\n",
688                  (long long)FMODE_EXEC);
689         LASSERTF(MDS_OPEN_CREAT == 64, " found %lld\n",
690                  (long long)MDS_OPEN_CREAT);
691         LASSERTF(MDS_OPEN_EXCL == 128, " found %lld\n",
692                  (long long)MDS_OPEN_EXCL);
693         LASSERTF(MDS_OPEN_TRUNC == 512, " found %lld\n",
694                  (long long)MDS_OPEN_TRUNC);
695         LASSERTF(MDS_OPEN_APPEND == 1024, " found %lld\n",
696                  (long long)MDS_OPEN_APPEND);
697         LASSERTF(MDS_OPEN_SYNC == 4096, " found %lld\n",
698                  (long long)MDS_OPEN_SYNC);
699         LASSERTF(MDS_OPEN_DIRECTORY == 65536, " found %lld\n",
700                  (long long)MDS_OPEN_DIRECTORY);
701         LASSERTF(MDS_OPEN_DELAY_CREATE == 16777216, " found %lld\n",
702                  (long long)MDS_OPEN_DELAY_CREATE);
703         LASSERTF(MDS_OPEN_HAS_EA == 1073741824, " found %lld\n",
704                  (long long)MDS_OPEN_HAS_EA);
705
706         /* Checks for struct mds_rec_setattr */
707         LASSERTF((int)sizeof(struct mds_rec_setattr) == 88, " found %lld\n",
708                  (long long)(int)sizeof(struct mds_rec_setattr));
709         LASSERTF(offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
710                  (long long)offsetof(struct mds_rec_setattr, sa_opcode));
711         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
712                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
713         LASSERTF(offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
714                  (long long)offsetof(struct mds_rec_setattr, sa_fsuid));
715         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
716                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
717         LASSERTF(offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
718                  (long long)offsetof(struct mds_rec_setattr, sa_fsgid));
719         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
720                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
721         LASSERTF(offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
722                  (long long)offsetof(struct mds_rec_setattr, sa_cap));
723         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
724                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
725         LASSERTF(offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
726                  (long long)offsetof(struct mds_rec_setattr, sa_suppgid));
727         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
728                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
729         LASSERTF(offsetof(struct mds_rec_setattr, sa_valid) == 20, " found %lld\n",
730                  (long long)offsetof(struct mds_rec_setattr, sa_valid));
731         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 4, " found %lld\n",
732                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
733         LASSERTF(offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
734                  (long long)offsetof(struct mds_rec_setattr, sa_fid));
735         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
736                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
737         LASSERTF(offsetof(struct mds_rec_setattr, sa_mode) == 40, " found %lld\n",
738                  (long long)offsetof(struct mds_rec_setattr, sa_mode));
739         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
740                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
741         LASSERTF(offsetof(struct mds_rec_setattr, sa_uid) == 44, " found %lld\n",
742                  (long long)offsetof(struct mds_rec_setattr, sa_uid));
743         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
744                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
745         LASSERTF(offsetof(struct mds_rec_setattr, sa_gid) == 48, " found %lld\n",
746                  (long long)offsetof(struct mds_rec_setattr, sa_gid));
747         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
748                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
749         LASSERTF(offsetof(struct mds_rec_setattr, sa_attr_flags) == 52, " found %lld\n",
750                  (long long)offsetof(struct mds_rec_setattr, sa_attr_flags));
751         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
752                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
753         LASSERTF(offsetof(struct mds_rec_setattr, sa_size) == 56, " found %lld\n",
754                  (long long)offsetof(struct mds_rec_setattr, sa_size));
755         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
756                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
757         LASSERTF(offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
758                  (long long)offsetof(struct mds_rec_setattr, sa_atime));
759         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
760                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
761         LASSERTF(offsetof(struct mds_rec_setattr, sa_mtime) == 72, " found %lld\n",
762                  (long long)offsetof(struct mds_rec_setattr, sa_mtime));
763         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
764                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
765         LASSERTF(offsetof(struct mds_rec_setattr, sa_ctime) == 80, " found %lld\n",
766                  (long long)offsetof(struct mds_rec_setattr, sa_ctime));
767         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
768                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
769
770         /* Checks for struct mds_rec_create */
771         LASSERTF((int)sizeof(struct mds_rec_create) == 80, " found %lld\n",
772                  (long long)(int)sizeof(struct mds_rec_create));
773         LASSERTF(offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
774                  (long long)offsetof(struct mds_rec_create, cr_opcode));
775         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
776                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
777         LASSERTF(offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
778                  (long long)offsetof(struct mds_rec_create, cr_fsuid));
779         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
780                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
781         LASSERTF(offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
782                  (long long)offsetof(struct mds_rec_create, cr_fsgid));
783         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
784                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
785         LASSERTF(offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
786                  (long long)offsetof(struct mds_rec_create, cr_cap));
787         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
788                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
789         LASSERTF(offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
790                  (long long)offsetof(struct mds_rec_create, cr_flags));
791         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
792                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
793         LASSERTF(offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
794                  (long long)offsetof(struct mds_rec_create, cr_mode));
795         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
796                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
797         LASSERTF(offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
798                  (long long)offsetof(struct mds_rec_create, cr_fid));
799         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
800                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
801         LASSERTF(offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
802                  (long long)offsetof(struct mds_rec_create, cr_replayfid));
803         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
804                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
805         LASSERTF(offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
806                  (long long)offsetof(struct mds_rec_create, cr_time));
807         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
808                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
809         LASSERTF(offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
810                  (long long)offsetof(struct mds_rec_create, cr_rdev));
811         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
812                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
813         LASSERTF(offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
814                  (long long)offsetof(struct mds_rec_create, cr_suppgid));
815         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
816                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
817
818         /* Checks for struct mds_rec_link */
819         LASSERTF((int)sizeof(struct mds_rec_link) == 64, " found %lld\n",
820                  (long long)(int)sizeof(struct mds_rec_link));
821         LASSERTF(offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
822                  (long long)offsetof(struct mds_rec_link, lk_opcode));
823         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
824                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
825         LASSERTF(offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
826                  (long long)offsetof(struct mds_rec_link, lk_fsuid));
827         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
828                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
829         LASSERTF(offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
830                  (long long)offsetof(struct mds_rec_link, lk_fsgid));
831         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
832                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
833         LASSERTF(offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
834                  (long long)offsetof(struct mds_rec_link, lk_cap));
835         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
836                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
837         LASSERTF(offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
838                  (long long)offsetof(struct mds_rec_link, lk_suppgid1));
839         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
840                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
841         LASSERTF(offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
842                  (long long)offsetof(struct mds_rec_link, lk_suppgid2));
843         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
844                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
845         LASSERTF(offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
846                  (long long)offsetof(struct mds_rec_link, lk_fid1));
847         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
848                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
849         LASSERTF(offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
850                  (long long)offsetof(struct mds_rec_link, lk_fid2));
851         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
852                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
853         LASSERTF(offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
854                  (long long)offsetof(struct mds_rec_link, lk_time));
855         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
856                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
857
858         /* Checks for struct mds_rec_unlink */
859         LASSERTF((int)sizeof(struct mds_rec_unlink) == 64, " found %lld\n",
860                  (long long)(int)sizeof(struct mds_rec_unlink));
861         LASSERTF(offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
862                  (long long)offsetof(struct mds_rec_unlink, ul_opcode));
863         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
864                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
865         LASSERTF(offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
866                  (long long)offsetof(struct mds_rec_unlink, ul_fsuid));
867         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
868                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
869         LASSERTF(offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
870                  (long long)offsetof(struct mds_rec_unlink, ul_fsgid));
871         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
872                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
873         LASSERTF(offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
874                  (long long)offsetof(struct mds_rec_unlink, ul_cap));
875         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
876                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
877         LASSERTF(offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
878                  (long long)offsetof(struct mds_rec_unlink, ul_suppgid));
879         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
880                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
881         LASSERTF(offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
882                  (long long)offsetof(struct mds_rec_unlink, ul_mode));
883         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
884                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
885         LASSERTF(offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
886                  (long long)offsetof(struct mds_rec_unlink, ul_fid1));
887         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
888                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
889         LASSERTF(offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
890                  (long long)offsetof(struct mds_rec_unlink, ul_fid2));
891         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
892                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
893         LASSERTF(offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
894                  (long long)offsetof(struct mds_rec_unlink, ul_time));
895         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
896                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
897
898         /* Checks for struct mds_rec_rename */
899         LASSERTF((int)sizeof(struct mds_rec_rename) == 64, " found %lld\n",
900                  (long long)(int)sizeof(struct mds_rec_rename));
901         LASSERTF(offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
902                  (long long)offsetof(struct mds_rec_rename, rn_opcode));
903         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
904                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
905         LASSERTF(offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
906                  (long long)offsetof(struct mds_rec_rename, rn_fsuid));
907         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
908                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
909         LASSERTF(offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
910                  (long long)offsetof(struct mds_rec_rename, rn_fsgid));
911         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
912                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
913         LASSERTF(offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
914                  (long long)offsetof(struct mds_rec_rename, rn_cap));
915         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
916                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
917         LASSERTF(offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
918                  (long long)offsetof(struct mds_rec_rename, rn_suppgid1));
919         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
920                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
921         LASSERTF(offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
922                  (long long)offsetof(struct mds_rec_rename, rn_suppgid2));
923         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
924                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
925         LASSERTF(offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
926                  (long long)offsetof(struct mds_rec_rename, rn_fid1));
927         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
928                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
929         LASSERTF(offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
930                  (long long)offsetof(struct mds_rec_rename, rn_fid2));
931         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
932                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
933         LASSERTF(offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
934                  (long long)offsetof(struct mds_rec_rename, rn_time));
935         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
936                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
937
938         /* Checks for struct lov_desc */
939         LASSERTF((int)sizeof(struct lov_desc) == 72, " found %lld\n",
940                  (long long)(int)sizeof(struct lov_desc));
941         LASSERTF(offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
942                  (long long)offsetof(struct lov_desc, ld_tgt_count));
943         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
944                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
945         LASSERTF(offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
946                  (long long)offsetof(struct lov_desc, ld_active_tgt_count));
947         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
948                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
949         LASSERTF(offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
950                  (long long)offsetof(struct lov_desc, ld_default_stripe_count));
951         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
952                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
953         LASSERTF(offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
954                  (long long)offsetof(struct lov_desc, ld_pattern));
955         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
956                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
957         LASSERTF(offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
958                  (long long)offsetof(struct lov_desc, ld_default_stripe_size));
959         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
960                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
961         LASSERTF(offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
962                  (long long)offsetof(struct lov_desc, ld_default_stripe_offset));
963         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
964                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
965         LASSERTF(offsetof(struct lov_desc, ld_uuid) == 32, " found %lld\n",
966                  (long long)offsetof(struct lov_desc, ld_uuid));
967         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
968                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
969
970         /* Checks for struct ldlm_res_id */
971         LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
972                  (long long)(int)sizeof(struct ldlm_res_id));
973         LASSERTF(offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
974                  (long long)offsetof(struct ldlm_res_id, name[4]));
975         LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
976                  (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
977
978         /* Checks for struct ldlm_extent */
979         LASSERTF((int)sizeof(struct ldlm_extent) == 24, " found %lld\n",
980                  (long long)(int)sizeof(struct ldlm_extent));
981         LASSERTF(offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
982                  (long long)offsetof(struct ldlm_extent, start));
983         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
984                  (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
985         LASSERTF(offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
986                  (long long)offsetof(struct ldlm_extent, end));
987         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
988                  (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
989         LASSERTF(offsetof(struct ldlm_extent, gid) == 16, " found %lld\n",
990                  (long long)offsetof(struct ldlm_extent, gid));
991         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->gid) == 8, " found %lld\n",
992                  (long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
993
994         /* Checks for struct ldlm_flock */
995         LASSERTF((int)sizeof(struct ldlm_flock) == 40, " found %lld\n",
996                  (long long)(int)sizeof(struct ldlm_flock));
997         LASSERTF(offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
998                  (long long)offsetof(struct ldlm_flock, start));
999         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
1000                  (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
1001         LASSERTF(offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
1002                  (long long)offsetof(struct ldlm_flock, end));
1003         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
1004                  (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
1005         LASSERTF(offsetof(struct ldlm_flock, pid) == 16, " found %lld\n",
1006                  (long long)offsetof(struct ldlm_flock, pid));
1007         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 8, " found %lld\n",
1008                  (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
1009         LASSERTF(offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
1010                  (long long)offsetof(struct ldlm_flock, blocking_pid));
1011         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 8, " found %lld\n",
1012                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
1013         LASSERTF(offsetof(struct ldlm_flock, blocking_export) == 32, " found %lld\n",
1014                  (long long)offsetof(struct ldlm_flock, blocking_export));
1015         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_export) == 8, " found %lld\n",
1016                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_export));
1017
1018         /* Checks for struct ldlm_intent */
1019         LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
1020                  (long long)(int)sizeof(struct ldlm_intent));
1021         LASSERTF(offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
1022                  (long long)offsetof(struct ldlm_intent, opc));
1023         LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
1024                  (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
1025
1026         /* Checks for struct ldlm_resource_desc */
1027         LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
1028                  (long long)(int)sizeof(struct ldlm_resource_desc));
1029         LASSERTF(offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
1030                  (long long)offsetof(struct ldlm_resource_desc, lr_type));
1031         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
1032                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
1033         LASSERTF(offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
1034                  (long long)offsetof(struct ldlm_resource_desc, lr_name));
1035         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
1036                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
1037
1038         /* Checks for struct ldlm_lock_desc */
1039         LASSERTF((int)sizeof(struct ldlm_lock_desc) == 88, " found %lld\n",
1040                  (long long)(int)sizeof(struct ldlm_lock_desc));
1041         LASSERTF(offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
1042                  (long long)offsetof(struct ldlm_lock_desc, l_resource));
1043         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
1044                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
1045         LASSERTF(offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
1046                  (long long)offsetof(struct ldlm_lock_desc, l_req_mode));
1047         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
1048                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
1049         LASSERTF(offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
1050                  (long long)offsetof(struct ldlm_lock_desc, l_granted_mode));
1051         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
1052                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
1053         LASSERTF(offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
1054                  (long long)offsetof(struct ldlm_lock_desc, l_policy_data));
1055         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 40, " found %lld\n",
1056                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
1057
1058         /* Checks for struct ldlm_request */
1059         LASSERTF((int)sizeof(struct ldlm_request) == 112, " found %lld\n",
1060                  (long long)(int)sizeof(struct ldlm_request));
1061         LASSERTF(offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
1062                  (long long)offsetof(struct ldlm_request, lock_flags));
1063         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
1064                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
1065         LASSERTF(offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
1066                  (long long)offsetof(struct ldlm_request, lock_desc));
1067         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 88, " found %lld\n",
1068                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
1069         LASSERTF(offsetof(struct ldlm_request, lock_handle1) == 96, " found %lld\n",
1070                  (long long)offsetof(struct ldlm_request, lock_handle1));
1071         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8, " found %lld\n",
1072                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle1));
1073         LASSERTF(offsetof(struct ldlm_request, lock_handle2) == 104, " found %lld\n",
1074                  (long long)offsetof(struct ldlm_request, lock_handle2));
1075         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8, " found %lld\n",
1076                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle2));
1077
1078         /* Checks for struct ldlm_reply */
1079         LASSERTF((int)sizeof(struct ldlm_reply) == 120, " found %lld\n",
1080                  (long long)(int)sizeof(struct ldlm_reply));
1081         LASSERTF(offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
1082                  (long long)offsetof(struct ldlm_reply, lock_flags));
1083         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
1084                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
1085         LASSERTF(offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
1086                  (long long)offsetof(struct ldlm_request, lock_desc));
1087         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 88, " found %lld\n",
1088                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
1089         LASSERTF(offsetof(struct ldlm_reply, lock_handle) == 96, " found %lld\n",
1090                  (long long)offsetof(struct ldlm_reply, lock_handle));
1091         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
1092                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
1093         LASSERTF(offsetof(struct ldlm_reply, lock_policy_res1) == 104, " found %lld\n",
1094                  (long long)offsetof(struct ldlm_reply, lock_policy_res1));
1095         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
1096                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
1097         LASSERTF(offsetof(struct ldlm_reply, lock_policy_res2) == 112, " found %lld\n",
1098                  (long long)offsetof(struct ldlm_reply, lock_policy_res2));
1099         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
1100                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
1101
1102         /* Checks for struct ost_lvb */
1103         LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
1104                  (long long)(int)sizeof(struct ost_lvb));
1105         LASSERTF(offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
1106                  (long long)offsetof(struct ost_lvb, lvb_size));
1107         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
1108                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
1109         LASSERTF(offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
1110                  (long long)offsetof(struct ost_lvb, lvb_mtime));
1111         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
1112                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
1113         LASSERTF(offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
1114                  (long long)offsetof(struct ost_lvb, lvb_atime));
1115         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
1116                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
1117         LASSERTF(offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
1118                  (long long)offsetof(struct ost_lvb, lvb_ctime));
1119         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
1120                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
1121         LASSERTF(offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
1122                  (long long)offsetof(struct ost_lvb, lvb_blocks));
1123         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
1124                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
1125
1126         /* Checks for struct ptlbd_op */
1127         LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n",
1128                  (long long)(int)sizeof(struct ptlbd_op));
1129         LASSERTF(offsetof(struct ptlbd_op, op_cmd) == 0, " found %lld\n",
1130                  (long long)offsetof(struct ptlbd_op, op_cmd));
1131         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_cmd) == 2, " found %lld\n",
1132                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_cmd));
1133         LASSERTF(offsetof(struct ptlbd_op, op_lun) == 2, " found %lld\n",
1134                  (long long)offsetof(struct ptlbd_op, op_lun));
1135         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_lun) == 2, " found %lld\n",
1136                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_lun));
1137         LASSERTF(offsetof(struct ptlbd_op, op_niob_cnt) == 4, " found %lld\n",
1138                  (long long)offsetof(struct ptlbd_op, op_niob_cnt));
1139         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt) == 2, " found %lld\n",
1140                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt));
1141         LASSERTF(offsetof(struct ptlbd_op, op__padding) == 6, " found %lld\n",
1142                  (long long)offsetof(struct ptlbd_op, op__padding));
1143         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op__padding) == 2, " found %lld\n",
1144                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op__padding));
1145         LASSERTF(offsetof(struct ptlbd_op, op_block_cnt) == 8, " found %lld\n",
1146                  (long long)offsetof(struct ptlbd_op, op_block_cnt));
1147         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_block_cnt) == 4, " found %lld\n",
1148                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_block_cnt));
1149
1150         /* Checks for struct ptlbd_niob */
1151         LASSERTF((int)sizeof(struct ptlbd_niob) == 24, " found %lld\n",
1152                  (long long)(int)sizeof(struct ptlbd_niob));
1153         LASSERTF(offsetof(struct ptlbd_niob, n_xid) == 0, " found %lld\n",
1154                  (long long)offsetof(struct ptlbd_niob, n_xid));
1155         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_xid) == 8, " found %lld\n",
1156                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_xid));
1157         LASSERTF(offsetof(struct ptlbd_niob, n_block_nr) == 8, " found %lld\n",
1158                  (long long)offsetof(struct ptlbd_niob, n_block_nr));
1159         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_block_nr) == 8, " found %lld\n",
1160                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_block_nr));
1161         LASSERTF(offsetof(struct ptlbd_niob, n_offset) == 16, " found %lld\n",
1162                  (long long)offsetof(struct ptlbd_niob, n_offset));
1163         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_offset) == 4, " found %lld\n",
1164                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_offset));
1165         LASSERTF(offsetof(struct ptlbd_niob, n_length) == 20, " found %lld\n",
1166                  (long long)offsetof(struct ptlbd_niob, n_length));
1167         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_length) == 4, " found %lld\n",
1168                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_length));
1169
1170         /* Checks for struct ptlbd_rsp */
1171         LASSERTF((int)sizeof(struct ptlbd_rsp) == 4, " found %lld\n",
1172                  (long long)(int)sizeof(struct ptlbd_rsp));
1173         LASSERTF(offsetof(struct ptlbd_rsp, r_status) == 0, " found %lld\n",
1174                  (long long)offsetof(struct ptlbd_rsp, r_status));
1175         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_status) == 2, " found %lld\n",
1176                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_status));
1177         LASSERTF(offsetof(struct ptlbd_rsp, r_error_cnt) == 2, " found %lld\n",
1178                  (long long)offsetof(struct ptlbd_rsp, r_error_cnt));
1179         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt) == 2, " found %lld\n",
1180                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt));
1181
1182         /* Checks for struct llog_logid */
1183         LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
1184                  (long long)(int)sizeof(struct llog_logid));
1185         LASSERTF(offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
1186                  (long long)offsetof(struct llog_logid, lgl_oid));
1187         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
1188                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
1189         LASSERTF(offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
1190                  (long long)offsetof(struct llog_logid, lgl_ogr));
1191         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
1192                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
1193         LASSERTF(offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
1194                  (long long)offsetof(struct llog_logid, lgl_ogen));
1195         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
1196                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
1197         LASSERTF(OST_SZ_REC == 274730752, " found %lld\n",
1198                  (long long)OST_SZ_REC);
1199         LASSERTF(OST_RAID1_REC == 274731008, " found %lld\n",
1200                  (long long)OST_RAID1_REC);
1201         LASSERTF(MDS_UNLINK_REC == 274801668, " found %lld\n",
1202                  (long long)MDS_UNLINK_REC);
1203         LASSERTF(OBD_CFG_REC == 274857984, " found %lld\n",
1204                  (long long)OBD_CFG_REC);
1205         LASSERTF(PTL_CFG_REC == 274923520, " found %lld\n",
1206                  (long long)PTL_CFG_REC);
1207         LASSERTF(LLOG_GEN_REC == 274989056, " found %lld\n",
1208                  (long long)LLOG_GEN_REC);
1209         LASSERTF(LLOG_HDR_MAGIC == 275010873, " found %lld\n",
1210                  (long long)LLOG_HDR_MAGIC);
1211         LASSERTF(LLOG_LOGID_MAGIC == 275010875, " found %lld\n",
1212                  (long long)LLOG_LOGID_MAGIC);
1213
1214         /* Checks for struct llog_catid */
1215         LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
1216                  (long long)(int)sizeof(struct llog_catid));
1217         LASSERTF(offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
1218                  (long long)offsetof(struct llog_catid, lci_logid));
1219         LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
1220                  (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
1221
1222         /* Checks for struct llog_rec_hdr */
1223         LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
1224                  (long long)(int)sizeof(struct llog_rec_hdr));
1225         LASSERTF(offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
1226                  (long long)offsetof(struct llog_rec_hdr, lrh_len));
1227         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
1228                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
1229         LASSERTF(offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
1230                  (long long)offsetof(struct llog_rec_hdr, lrh_index));
1231         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
1232                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
1233         LASSERTF(offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
1234                  (long long)offsetof(struct llog_rec_hdr, lrh_type));
1235         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
1236                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
1237
1238         /* Checks for struct llog_rec_tail */
1239         LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
1240                  (long long)(int)sizeof(struct llog_rec_tail));
1241         LASSERTF(offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
1242                  (long long)offsetof(struct llog_rec_tail, lrt_len));
1243         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
1244                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
1245         LASSERTF(offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
1246                  (long long)offsetof(struct llog_rec_tail, lrt_index));
1247         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
1248                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
1249
1250         /* Checks for struct llog_logid_rec */
1251         LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
1252                  (long long)(int)sizeof(struct llog_logid_rec));
1253         LASSERTF(offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
1254                  (long long)offsetof(struct llog_logid_rec, lid_hdr));
1255         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
1256                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
1257         LASSERTF(offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
1258                  (long long)offsetof(struct llog_logid_rec, lid_id));
1259         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
1260                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
1261         LASSERTF(offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
1262                  (long long)offsetof(struct llog_logid_rec, lid_tail));
1263         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
1264                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
1265
1266         /* Checks for struct llog_create_rec */
1267         LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n",
1268                  (long long)(int)sizeof(struct llog_create_rec));
1269         LASSERTF(offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
1270                  (long long)offsetof(struct llog_create_rec, lcr_hdr));
1271         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
1272                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
1273         LASSERTF(offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
1274                  (long long)offsetof(struct llog_create_rec, lcr_fid));
1275         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n",
1276                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
1277         LASSERTF(offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n",
1278                  (long long)offsetof(struct llog_create_rec, lcr_oid));
1279         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
1280                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
1281         LASSERTF(offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n",
1282                  (long long)offsetof(struct llog_create_rec, lcr_ogen));
1283         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
1284                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
1285
1286         /* Checks for struct llog_orphan_rec */
1287         LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
1288                  (long long)(int)sizeof(struct llog_orphan_rec));
1289         LASSERTF(offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
1290                  (long long)offsetof(struct llog_orphan_rec, lor_hdr));
1291         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
1292                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
1293         LASSERTF(offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
1294                  (long long)offsetof(struct llog_orphan_rec, lor_oid));
1295         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
1296                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
1297         LASSERTF(offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
1298                  (long long)offsetof(struct llog_orphan_rec, lor_ogen));
1299         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
1300                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
1301         LASSERTF(offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
1302                  (long long)offsetof(struct llog_orphan_rec, lor_tail));
1303         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
1304                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
1305
1306         /* Checks for struct llog_unlink_rec */
1307         LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
1308                  (long long)(int)sizeof(struct llog_unlink_rec));
1309         LASSERTF(offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
1310                  (long long)offsetof(struct llog_unlink_rec, lur_hdr));
1311         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
1312                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
1313         LASSERTF(offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
1314                  (long long)offsetof(struct llog_unlink_rec, lur_oid));
1315         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
1316                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
1317         LASSERTF(offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
1318                  (long long)offsetof(struct llog_unlink_rec, lur_ogen));
1319         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
1320                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
1321         LASSERTF(offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
1322                  (long long)offsetof(struct llog_unlink_rec, lur_tail));
1323         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
1324                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
1325
1326         /* Checks for struct llog_size_change_rec */
1327         LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n",
1328                  (long long)(int)sizeof(struct llog_size_change_rec));
1329         LASSERTF(offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
1330                  (long long)offsetof(struct llog_size_change_rec, lsc_hdr));
1331         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
1332                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
1333         LASSERTF(offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
1334                  (long long)offsetof(struct llog_size_change_rec, lsc_fid));
1335         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n",
1336                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
1337         LASSERTF(offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n",
1338                  (long long)offsetof(struct llog_size_change_rec, lsc_io_epoch));
1339         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
1340                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
1341         LASSERTF(offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n",
1342                  (long long)offsetof(struct llog_size_change_rec, lsc_tail));
1343         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
1344                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
1345
1346         /* Checks for struct llog_gen */
1347         LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
1348                  (long long)(int)sizeof(struct llog_gen));
1349         LASSERTF(offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
1350                  (long long)offsetof(struct llog_gen, mnt_cnt));
1351         LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
1352                  (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
1353         LASSERTF(offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
1354                  (long long)offsetof(struct llog_gen, conn_cnt));
1355         LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
1356                  (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
1357
1358         /* Checks for struct llog_gen_rec */
1359         LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
1360                  (long long)(int)sizeof(struct llog_gen_rec));
1361         LASSERTF(offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
1362                  (long long)offsetof(struct llog_gen_rec, lgr_hdr));
1363         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
1364                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
1365         LASSERTF(offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
1366                  (long long)offsetof(struct llog_gen_rec, lgr_gen));
1367         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
1368                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
1369         LASSERTF(offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
1370                  (long long)offsetof(struct llog_gen_rec, lgr_tail));
1371         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
1372                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
1373
1374         /* Checks for struct llog_log_hdr */
1375         LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
1376                  (long long)(int)sizeof(struct llog_log_hdr));
1377         LASSERTF(offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
1378                  (long long)offsetof(struct llog_log_hdr, llh_hdr));
1379         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
1380                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
1381         LASSERTF(offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
1382                  (long long)offsetof(struct llog_log_hdr, llh_timestamp));
1383         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
1384                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
1385         LASSERTF(offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
1386                  (long long)offsetof(struct llog_log_hdr, llh_count));
1387         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
1388                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
1389         LASSERTF(offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
1390                  (long long)offsetof(struct llog_log_hdr, llh_bitmap_offset));
1391         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
1392                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
1393         LASSERTF(offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
1394                  (long long)offsetof(struct llog_log_hdr, llh_size));
1395         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
1396                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
1397         LASSERTF(offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
1398                  (long long)offsetof(struct llog_log_hdr, llh_flags));
1399         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
1400                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
1401         LASSERTF(offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
1402                  (long long)offsetof(struct llog_log_hdr, llh_cat_idx));
1403         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
1404                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
1405         LASSERTF(offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
1406                  (long long)offsetof(struct llog_log_hdr, llh_tgtuuid));
1407         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
1408                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
1409         LASSERTF(offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
1410                  (long long)offsetof(struct llog_log_hdr, llh_reserved));
1411         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
1412                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
1413         LASSERTF(offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
1414                  (long long)offsetof(struct llog_log_hdr, llh_bitmap));
1415         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
1416                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
1417         LASSERTF(offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
1418                  (long long)offsetof(struct llog_log_hdr, llh_tail));
1419         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
1420                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
1421
1422         /* Checks for struct llog_cookie */
1423         LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
1424                  (long long)(int)sizeof(struct llog_cookie));
1425         LASSERTF(offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
1426                  (long long)offsetof(struct llog_cookie, lgc_lgl));
1427         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
1428                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
1429         LASSERTF(offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
1430                  (long long)offsetof(struct llog_cookie, lgc_subsys));
1431         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
1432                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
1433         LASSERTF(offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
1434                  (long long)offsetof(struct llog_cookie, lgc_index));
1435         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
1436                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
1437
1438         /* Checks for struct llogd_body */
1439         LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
1440                  (long long)(int)sizeof(struct llogd_body));
1441         LASSERTF(offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
1442                  (long long)offsetof(struct llogd_body, lgd_logid));
1443         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
1444                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
1445         LASSERTF(offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
1446                  (long long)offsetof(struct llogd_body, lgd_ctxt_idx));
1447         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
1448                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
1449         LASSERTF(offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
1450                  (long long)offsetof(struct llogd_body, lgd_llh_flags));
1451         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
1452                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
1453         LASSERTF(offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
1454                  (long long)offsetof(struct llogd_body, lgd_index));
1455         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
1456                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
1457         LASSERTF(offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
1458                  (long long)offsetof(struct llogd_body, lgd_saved_index));
1459         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
1460                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
1461         LASSERTF(offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
1462                  (long long)offsetof(struct llogd_body, lgd_len));
1463         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
1464                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
1465         LASSERTF(offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
1466                  (long long)offsetof(struct llogd_body, lgd_cur_offset));
1467         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
1468                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
1469         LASSERTF(LLOG_ORIGIN_HANDLE_CREATE == 501, " found %lld\n",
1470                  (long long)LLOG_ORIGIN_HANDLE_CREATE);
1471         LASSERTF(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502, " found %lld\n",
1472                  (long long)LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
1473         LASSERTF(LLOG_ORIGIN_HANDLE_READ_HEADER == 503, " found %lld\n",
1474                  (long long)LLOG_ORIGIN_HANDLE_READ_HEADER);
1475         LASSERTF(LLOG_ORIGIN_HANDLE_WRITE_REC == 504, " found %lld\n",
1476                  (long long)LLOG_ORIGIN_HANDLE_WRITE_REC);
1477         LASSERTF(LLOG_ORIGIN_HANDLE_CLOSE == 505, " found %lld\n",
1478                  (long long)LLOG_ORIGIN_HANDLE_CLOSE);
1479         LASSERTF(LLOG_ORIGIN_CONNECT == 506, " found %lld\n",
1480                  (long long)LLOG_ORIGIN_CONNECT);
1481         LASSERTF(LLOG_CATINFO == 507, " found %lld\n",
1482                  (long long)LLOG_CATINFO);
1483
1484         /* Checks for struct llogd_conn_body */
1485         LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
1486                  (long long)(int)sizeof(struct llogd_conn_body));
1487         LASSERTF(offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
1488                  (long long)offsetof(struct llogd_conn_body, lgdc_gen));
1489         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
1490                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
1491         LASSERTF(offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
1492                  (long long)offsetof(struct llogd_conn_body, lgdc_logid));
1493         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
1494                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
1495         LASSERTF(offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
1496                  (long long)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
1497         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
1498                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
1499 }
1500