Whamcloud - gitweb
Branch: b1_4
[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.28 #2 Thu Dec 16 14:35:03 MST 2004 i686 i686 i38
29          * with gcc version 3.3.2 20040108 (Red Hat Linux 3.3.2-6) */
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_QUOTACHECK == 18, " found %lld\n",
90                  (long long)OST_QUOTACHECK);
91         LASSERTF(OST_QUOTACTL == 19, " found %lld\n",
92                  (long long)OST_QUOTACTL);
93         LASSERTF(OST_LAST_OPC == 20, " found %lld\n",
94                  (long long)OST_LAST_OPC);
95         LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
96                  (long long)OBD_OBJECT_EOF);
97         LASSERTF(OST_REQ_HAS_OA1 == 1, " found %lld\n",
98                  (long long)OST_REQ_HAS_OA1);
99         LASSERTF(MDS_GETATTR == 33, " found %lld\n",
100                  (long long)MDS_GETATTR);
101         LASSERTF(MDS_GETATTR_NAME == 34, " found %lld\n",
102                  (long long)MDS_GETATTR_NAME);
103         LASSERTF(MDS_CLOSE == 35, " found %lld\n",
104                  (long long)MDS_CLOSE);
105         LASSERTF(MDS_REINT == 36, " found %lld\n",
106                  (long long)MDS_REINT);
107         LASSERTF(MDS_READPAGE == 37, " found %lld\n",
108                  (long long)MDS_READPAGE);
109         LASSERTF(MDS_CONNECT == 38, " found %lld\n",
110                  (long long)MDS_CONNECT);
111         LASSERTF(MDS_DISCONNECT == 39, " found %lld\n",
112                  (long long)MDS_DISCONNECT);
113         LASSERTF(MDS_GETSTATUS == 40, " found %lld\n",
114                  (long long)MDS_GETSTATUS);
115         LASSERTF(MDS_STATFS == 41, " found %lld\n",
116                  (long long)MDS_STATFS);
117         LASSERTF(MDS_PIN == 42, " found %lld\n",
118                  (long long)MDS_PIN);
119         LASSERTF(MDS_UNPIN == 43, " found %lld\n",
120                  (long long)MDS_UNPIN);
121         LASSERTF(MDS_SYNC == 44, " found %lld\n",
122                  (long long)MDS_SYNC);
123         LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n",
124                  (long long)MDS_DONE_WRITING);
125         LASSERTF(MDS_SET_INFO == 46, " found %lld\n",
126                  (long long)MDS_SET_INFO);
127         LASSERTF(MDS_QUOTACHECK == 47, " found %lld\n",
128                  (long long)MDS_QUOTACHECK);
129         LASSERTF(MDS_QUOTACTL == 48, " found %lld\n",
130                  (long long)MDS_QUOTACTL);
131         LASSERTF(MDS_LAST_OPC == 49, " found %lld\n",
132                  (long long)MDS_LAST_OPC);
133         LASSERTF(REINT_SETATTR == 1, " found %lld\n",
134                  (long long)REINT_SETATTR);
135         LASSERTF(REINT_CREATE == 2, " found %lld\n",
136                  (long long)REINT_CREATE);
137         LASSERTF(REINT_LINK == 3, " found %lld\n",
138                  (long long)REINT_LINK);
139         LASSERTF(REINT_UNLINK == 4, " found %lld\n",
140                  (long long)REINT_UNLINK);
141         LASSERTF(REINT_RENAME == 5, " found %lld\n",
142                  (long long)REINT_RENAME);
143         LASSERTF(REINT_OPEN == 6, " found %lld\n",
144                  (long long)REINT_OPEN);
145         LASSERTF(REINT_MAX == 7, " found %lld\n",
146                  (long long)REINT_MAX);
147         LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
148                  (long long)DISP_IT_EXECD);
149         LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
150                  (long long)DISP_LOOKUP_EXECD);
151         LASSERTF(DISP_LOOKUP_NEG == 4, " found %lld\n",
152                  (long long)DISP_LOOKUP_NEG);
153         LASSERTF(DISP_LOOKUP_POS == 8, " found %lld\n",
154                  (long long)DISP_LOOKUP_POS);
155         LASSERTF(DISP_OPEN_CREATE == 16, " found %lld\n",
156                  (long long)DISP_OPEN_CREATE);
157         LASSERTF(DISP_OPEN_OPEN == 32, " found %lld\n",
158                  (long long)DISP_OPEN_OPEN);
159         LASSERTF(MDS_STATUS_CONN == 1, " found %lld\n",
160                  (long long)MDS_STATUS_CONN);
161         LASSERTF(MDS_STATUS_LOV == 2, " found %lld\n",
162                  (long long)MDS_STATUS_LOV);
163         LASSERTF(MDS_OPEN_HAS_EA == 1073741824, " found %lld\n",
164                  (long long)MDS_OPEN_HAS_EA);
165         LASSERTF(LDLM_ENQUEUE == 101, " found %lld\n",
166                  (long long)LDLM_ENQUEUE);
167         LASSERTF(LDLM_CONVERT == 102, " found %lld\n",
168                  (long long)LDLM_CONVERT);
169         LASSERTF(LDLM_CANCEL == 103, " found %lld\n",
170                  (long long)LDLM_CANCEL);
171         LASSERTF(LDLM_BL_CALLBACK == 104, " found %lld\n",
172                  (long long)LDLM_BL_CALLBACK);
173         LASSERTF(LDLM_CP_CALLBACK == 105, " found %lld\n",
174                  (long long)LDLM_CP_CALLBACK);
175         LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
176                  (long long)LDLM_LAST_OPC);
177         LASSERTF(LCK_EX == 1, " found %lld\n",
178                  (long long)LCK_EX);
179         LASSERTF(LCK_PW == 2, " found %lld\n",
180                  (long long)LCK_PW);
181         LASSERTF(LCK_PR == 4, " found %lld\n",
182                  (long long)LCK_PR);
183         LASSERTF(LCK_CW == 8, " found %lld\n",
184                  (long long)LCK_CW);
185         LASSERTF(LCK_CR == 16, " found %lld\n",
186                  (long long)LCK_CR);
187         LASSERTF(LCK_NL == 32, " found %lld\n",
188                  (long long)LCK_NL);
189         LASSERTF(PTLBD_QUERY == 200, " found %lld\n",
190                  (long long)PTLBD_QUERY);
191         LASSERTF(PTLBD_READ == 201, " found %lld\n",
192                  (long long)PTLBD_READ);
193         LASSERTF(PTLBD_WRITE == 202, " found %lld\n",
194                  (long long)PTLBD_WRITE);
195         LASSERTF(PTLBD_FLUSH == 203, " found %lld\n",
196                  (long long)PTLBD_FLUSH);
197         LASSERTF(PTLBD_CONNECT == 204, " found %lld\n",
198                  (long long)PTLBD_CONNECT);
199         LASSERTF(PTLBD_DISCONNECT == 205, " found %lld\n",
200                  (long long)PTLBD_DISCONNECT);
201         LASSERTF(PTLBD_LAST_OPC == 206, " found %lld\n",
202                  (long long)PTLBD_LAST_OPC);
203         LASSERTF(MGMT_CONNECT == 250, " found %lld\n",
204                  (long long)MGMT_CONNECT);
205         LASSERTF(MGMT_DISCONNECT == 251, " found %lld\n",
206                  (long long)MGMT_DISCONNECT);
207         LASSERTF(MGMT_EXCEPTION == 252, " found %lld\n",
208                  (long long)MGMT_EXCEPTION);
209         LASSERTF(OBD_PING == 400, " found %lld\n",
210                  (long long)OBD_PING);
211         LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",
212                  (long long)OBD_LOG_CANCEL);
213         LASSERTF(OBD_QC_CALLBACK == 402, " found %lld\n",
214                  (long long)OBD_QC_CALLBACK);
215         LASSERTF(OBD_LAST_OPC == 403, " found %lld\n",
216                  (long long)OBD_LAST_OPC);
217         LASSERTF(QUOTA_DQACQ == 601, " found %lld\n",
218                  (long long)QUOTA_DQACQ);
219         LASSERTF(QUOTA_DQREL == 602, " found %lld\n",
220                  (long long)QUOTA_DQREL);
221         /* Sizes and Offsets */
222
223
224         /* Checks for struct lustre_handle */
225         LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",
226                  (long long)(int)sizeof(struct lustre_handle));
227         LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
228                  (long long)(int)offsetof(struct lustre_handle, cookie));
229         LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",
230                  (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
231
232         /* Checks for struct lustre_msg */
233         LASSERTF((int)sizeof(struct lustre_msg) == 64, " found %lld\n",
234                  (long long)(int)sizeof(struct lustre_msg));
235         LASSERTF((int)offsetof(struct lustre_msg, handle) == 0, " found %lld\n",
236                  (long long)(int)offsetof(struct lustre_msg, handle));
237         LASSERTF((int)sizeof(((struct lustre_msg *)0)->handle) == 8, " found %lld\n",
238                  (long long)(int)sizeof(((struct lustre_msg *)0)->handle));
239         LASSERTF((int)offsetof(struct lustre_msg, magic) == 8, " found %lld\n",
240                  (long long)(int)offsetof(struct lustre_msg, magic));
241         LASSERTF((int)sizeof(((struct lustre_msg *)0)->magic) == 4, " found %lld\n",
242                  (long long)(int)sizeof(((struct lustre_msg *)0)->magic));
243         LASSERTF((int)offsetof(struct lustre_msg, type) == 12, " found %lld\n",
244                  (long long)(int)offsetof(struct lustre_msg, type));
245         LASSERTF((int)sizeof(((struct lustre_msg *)0)->type) == 4, " found %lld\n",
246                  (long long)(int)sizeof(((struct lustre_msg *)0)->type));
247         LASSERTF((int)offsetof(struct lustre_msg, version) == 16, " found %lld\n",
248                  (long long)(int)offsetof(struct lustre_msg, version));
249         LASSERTF((int)sizeof(((struct lustre_msg *)0)->version) == 4, " found %lld\n",
250                  (long long)(int)sizeof(((struct lustre_msg *)0)->version));
251         LASSERTF((int)offsetof(struct lustre_msg, opc) == 20, " found %lld\n",
252                  (long long)(int)offsetof(struct lustre_msg, opc));
253         LASSERTF((int)sizeof(((struct lustre_msg *)0)->opc) == 4, " found %lld\n",
254                  (long long)(int)sizeof(((struct lustre_msg *)0)->opc));
255         LASSERTF((int)offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n",
256                  (long long)(int)offsetof(struct lustre_msg, last_xid));
257         LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_xid) == 8, " found %lld\n",
258                  (long long)(int)sizeof(((struct lustre_msg *)0)->last_xid));
259         LASSERTF((int)offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n",
260                  (long long)(int)offsetof(struct lustre_msg, last_committed));
261         LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_committed) == 8, " found %lld\n",
262                  (long long)(int)sizeof(((struct lustre_msg *)0)->last_committed));
263         LASSERTF((int)offsetof(struct lustre_msg, transno) == 40, " found %lld\n",
264                  (long long)(int)offsetof(struct lustre_msg, transno));
265         LASSERTF((int)sizeof(((struct lustre_msg *)0)->transno) == 8, " found %lld\n",
266                  (long long)(int)sizeof(((struct lustre_msg *)0)->transno));
267         LASSERTF((int)offsetof(struct lustre_msg, status) == 48, " found %lld\n",
268                  (long long)(int)offsetof(struct lustre_msg, status));
269         LASSERTF((int)sizeof(((struct lustre_msg *)0)->status) == 4, " found %lld\n",
270                  (long long)(int)sizeof(((struct lustre_msg *)0)->status));
271         LASSERTF((int)offsetof(struct lustre_msg, flags) == 52, " found %lld\n",
272                  (long long)(int)offsetof(struct lustre_msg, flags));
273         LASSERTF((int)sizeof(((struct lustre_msg *)0)->flags) == 4, " found %lld\n",
274                  (long long)(int)sizeof(((struct lustre_msg *)0)->flags));
275         LASSERTF((int)offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n",
276                  (long long)(int)offsetof(struct lustre_msg, bufcount));
277         LASSERTF((int)sizeof(((struct lustre_msg *)0)->bufcount) == 4, " found %lld\n",
278                  (long long)(int)sizeof(((struct lustre_msg *)0)->bufcount));
279         LASSERTF((int)offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n",
280                  (long long)(int)offsetof(struct lustre_msg, buflens[7]));
281         LASSERTF((int)sizeof(((struct lustre_msg *)0)->buflens[7]) == 4, " found %lld\n",
282                  (long long)(int)sizeof(((struct lustre_msg *)0)->buflens[7]));
283
284         /* Checks for struct obdo */
285         LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
286                  (long long)(int)sizeof(struct obdo));
287         LASSERTF((int)offsetof(struct obdo, o_valid) == 0, " found %lld\n",
288                  (long long)(int)offsetof(struct obdo, o_valid));
289         LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, " found %lld\n",
290                  (long long)(int)sizeof(((struct obdo *)0)->o_valid));
291         LASSERTF((int)offsetof(struct obdo, o_id) == 8, " found %lld\n",
292                  (long long)(int)offsetof(struct obdo, o_id));
293         LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
294                  (long long)(int)sizeof(((struct obdo *)0)->o_id));
295         LASSERTF((int)offsetof(struct obdo, o_gr) == 16, " found %lld\n",
296                  (long long)(int)offsetof(struct obdo, o_gr));
297         LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n",
298                  (long long)(int)sizeof(((struct obdo *)0)->o_gr));
299         LASSERTF((int)offsetof(struct obdo, o_fid) == 24, " found %lld\n",
300                  (long long)(int)offsetof(struct obdo, o_fid));
301         LASSERTF((int)sizeof(((struct obdo *)0)->o_fid) == 8, " found %lld\n",
302                  (long long)(int)sizeof(((struct obdo *)0)->o_fid));
303         LASSERTF((int)offsetof(struct obdo, o_size) == 32, " found %lld\n",
304                  (long long)(int)offsetof(struct obdo, o_size));
305         LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n",
306                  (long long)(int)sizeof(((struct obdo *)0)->o_size));
307         LASSERTF((int)offsetof(struct obdo, o_mtime) == 40, " found %lld\n",
308                  (long long)(int)offsetof(struct obdo, o_mtime));
309         LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n",
310                  (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
311         LASSERTF((int)offsetof(struct obdo, o_atime) == 48, " found %lld\n",
312                  (long long)(int)offsetof(struct obdo, o_atime));
313         LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n",
314                  (long long)(int)sizeof(((struct obdo *)0)->o_atime));
315         LASSERTF((int)offsetof(struct obdo, o_ctime) == 56, " found %lld\n",
316                  (long long)(int)offsetof(struct obdo, o_ctime));
317         LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n",
318                  (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
319         LASSERTF((int)offsetof(struct obdo, o_blocks) == 64, " found %lld\n",
320                  (long long)(int)offsetof(struct obdo, o_blocks));
321         LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n",
322                  (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
323         LASSERTF((int)offsetof(struct obdo, o_grant) == 72, " found %lld\n",
324                  (long long)(int)offsetof(struct obdo, o_grant));
325         LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n",
326                  (long long)(int)sizeof(((struct obdo *)0)->o_grant));
327         LASSERTF((int)offsetof(struct obdo, o_blksize) == 80, " found %lld\n",
328                  (long long)(int)offsetof(struct obdo, o_blksize));
329         LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n",
330                  (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
331         LASSERTF((int)offsetof(struct obdo, o_mode) == 84, " found %lld\n",
332                  (long long)(int)offsetof(struct obdo, o_mode));
333         LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n",
334                  (long long)(int)sizeof(((struct obdo *)0)->o_mode));
335         LASSERTF((int)offsetof(struct obdo, o_uid) == 88, " found %lld\n",
336                  (long long)(int)offsetof(struct obdo, o_uid));
337         LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n",
338                  (long long)(int)sizeof(((struct obdo *)0)->o_uid));
339         LASSERTF((int)offsetof(struct obdo, o_gid) == 92, " found %lld\n",
340                  (long long)(int)offsetof(struct obdo, o_gid));
341         LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n",
342                  (long long)(int)sizeof(((struct obdo *)0)->o_gid));
343         LASSERTF((int)offsetof(struct obdo, o_flags) == 96, " found %lld\n",
344                  (long long)(int)offsetof(struct obdo, o_flags));
345         LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n",
346                  (long long)(int)sizeof(((struct obdo *)0)->o_flags));
347         LASSERTF((int)offsetof(struct obdo, o_nlink) == 100, " found %lld\n",
348                  (long long)(int)offsetof(struct obdo, o_nlink));
349         LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n",
350                  (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
351         LASSERTF((int)offsetof(struct obdo, o_generation) == 104, " found %lld\n",
352                  (long long)(int)offsetof(struct obdo, o_generation));
353         LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n",
354                  (long long)(int)sizeof(((struct obdo *)0)->o_generation));
355         LASSERTF((int)offsetof(struct obdo, o_misc) == 108, " found %lld\n",
356                  (long long)(int)offsetof(struct obdo, o_misc));
357         LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n",
358                  (long long)(int)sizeof(((struct obdo *)0)->o_misc));
359         LASSERTF((int)offsetof(struct obdo, o_easize) == 112, " found %lld\n",
360                  (long long)(int)offsetof(struct obdo, o_easize));
361         LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n",
362                  (long long)(int)sizeof(((struct obdo *)0)->o_easize));
363         LASSERTF((int)offsetof(struct obdo, o_mds) == 116, " found %lld\n",
364                  (long long)(int)offsetof(struct obdo, o_mds));
365         LASSERTF((int)sizeof(((struct obdo *)0)->o_mds) == 4, " found %lld\n",
366                  (long long)(int)sizeof(((struct obdo *)0)->o_mds));
367         LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
368                  (long long)(int)offsetof(struct obdo, o_inline));
369         LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
370                  (long long)(int)sizeof(((struct obdo *)0)->o_inline));
371         LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
372                  (long long)OBD_INLINESZ);
373         LASSERTF(OBD_MD_FLID == 1, " found %lld\n",
374                  (long long)OBD_MD_FLID);
375         LASSERTF(OBD_MD_FLATIME == 2, " found %lld\n",
376                  (long long)OBD_MD_FLATIME);
377         LASSERTF(OBD_MD_FLMTIME == 4, " found %lld\n",
378                  (long long)OBD_MD_FLMTIME);
379         LASSERTF(OBD_MD_FLCTIME == 8, " found %lld\n",
380                  (long long)OBD_MD_FLCTIME);
381         LASSERTF(OBD_MD_FLSIZE == 16, " found %lld\n",
382                  (long long)OBD_MD_FLSIZE);
383         LASSERTF(OBD_MD_FLBLOCKS == 32, " found %lld\n",
384                  (long long)OBD_MD_FLBLOCKS);
385         LASSERTF(OBD_MD_FLBLKSZ == 64, " found %lld\n",
386                  (long long)OBD_MD_FLBLKSZ);
387         LASSERTF(OBD_MD_FLMODE == 128, " found %lld\n",
388                  (long long)OBD_MD_FLMODE);
389         LASSERTF(OBD_MD_FLTYPE == 256, " found %lld\n",
390                  (long long)OBD_MD_FLTYPE);
391         LASSERTF(OBD_MD_FLUID == 512, " found %lld\n",
392                  (long long)OBD_MD_FLUID);
393         LASSERTF(OBD_MD_FLGID == 1024, " found %lld\n",
394                  (long long)OBD_MD_FLGID);
395         LASSERTF(OBD_MD_FLFLAGS == 2048, " found %lld\n",
396                  (long long)OBD_MD_FLFLAGS);
397         LASSERTF(OBD_MD_FLNLINK == 8192, " found %lld\n",
398                  (long long)OBD_MD_FLNLINK);
399         LASSERTF(OBD_MD_FLGENER == 16384, " found %lld\n",
400                  (long long)OBD_MD_FLGENER);
401         LASSERTF(OBD_MD_FLINLINE == 32768, " found %lld\n",
402                  (long long)OBD_MD_FLINLINE);
403         LASSERTF(OBD_MD_FLRDEV == 65536, " found %lld\n",
404                  (long long)OBD_MD_FLRDEV);
405         LASSERTF(OBD_MD_FLEASIZE == 131072, " found %lld\n",
406                  (long long)OBD_MD_FLEASIZE);
407         LASSERTF(OBD_MD_LINKNAME == 262144, " found %lld\n",
408                  (long long)OBD_MD_LINKNAME);
409         LASSERTF(OBD_MD_FLHANDLE == 524288, " found %lld\n",
410                  (long long)OBD_MD_FLHANDLE);
411         LASSERTF(OBD_MD_FLCKSUM == 1048576, " found %lld\n",
412                  (long long)OBD_MD_FLCKSUM);
413         LASSERTF(OBD_MD_FLQOS == 2097152, " found %lld\n",
414                  (long long)OBD_MD_FLQOS);
415         LASSERTF(OBD_MD_FLCOOKIE == 8388608, " found %lld\n",
416                  (long long)OBD_MD_FLCOOKIE);
417         LASSERTF(OBD_MD_FLGROUP == 16777216, " found %lld\n",
418                  (long long)OBD_MD_FLGROUP);
419         LASSERTF(OBD_MD_FLIFID == 33554432, " found %lld\n",
420                  (long long)OBD_MD_FLIFID);
421         LASSERTF(OBD_MD_FLEPOCH == 67108864, " found %lld\n",
422                  (long long)OBD_MD_FLEPOCH);
423         LASSERTF(OBD_MD_FLGRANT == 134217728, " found %lld\n",
424                  (long long)OBD_MD_FLGRANT);
425         LASSERTF(OBD_MD_FLDIREA == 268435456, " found %lld\n",
426                  (long long)OBD_MD_FLDIREA);
427         LASSERTF(OBD_MD_FLUSRQUOTA == 536870912, " found %lld\n",
428                  (long long)OBD_MD_FLUSRQUOTA);
429         LASSERTF(OBD_MD_FLGRPQUOTA == 1073741824, " found %lld\n",
430                  (long long)OBD_MD_FLGRPQUOTA);
431         LASSERTF(OBD_MD_MDS == 4294967296ULL, " found %lld\n",
432                  (long long)OBD_MD_MDS);
433         LASSERTF(OBD_MD_REINT == 8589934592ULL, " found %lld\n",
434                  (long long)OBD_MD_REINT);
435         LASSERTF(OBD_FL_INLINEDATA == 1, " found %lld\n",
436                  (long long)OBD_FL_INLINEDATA);
437         LASSERTF(OBD_FL_OBDMDEXISTS == 2, " found %lld\n",
438                  (long long)OBD_FL_OBDMDEXISTS);
439         LASSERTF(OBD_FL_DELORPHAN == 4, " found %lld\n",
440                  (long long)OBD_FL_DELORPHAN);
441         LASSERTF(OBD_FL_NORPC == 8, " found %lld\n",
442                  (long long)OBD_FL_NORPC);
443         LASSERTF(OBD_FL_IDONLY == 16, " found %lld\n",
444                  (long long)OBD_FL_IDONLY);
445         LASSERTF(OBD_FL_RECREATE_OBJS == 32, " found %lld\n",
446                  (long long)OBD_FL_RECREATE_OBJS);
447         LASSERTF(OBD_FL_DEBUG_CHECK == 64, " found %lld\n",
448                  (long long)OBD_FL_DEBUG_CHECK);
449         LASSERTF(OBD_FL_NO_USRQUOTA == 256, " found %lld\n",
450                  (long long)OBD_FL_NO_USRQUOTA);
451         LASSERTF(OBD_FL_NO_GRPQUOTA == 512, " found %lld\n",
452                  (long long)OBD_FL_NO_GRPQUOTA);
453
454         /* Checks for struct lov_mds_md_v1 */
455         LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
456                  (long long)(int)sizeof(struct lov_mds_md_v1));
457         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
458                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
459         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
460                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
461         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
462                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
463         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
464                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
465         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
466                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
467         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
468                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
469         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
470                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr));
471         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
472                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
473         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
474                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
475         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
476                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
477         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
478                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
479         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
480                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
481         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
482                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects));
483         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
484                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
485
486         /* Checks for struct lov_ost_data_v1 */
487         LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
488                  (long long)(int)sizeof(struct lov_ost_data_v1));
489         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
490                  (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
491         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
492                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
493         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
494                  (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr));
495         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
496                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
497         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
498                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
499         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
500                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
501         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
502                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
503         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
504                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
505         LASSERTF(LOV_MAGIC_V1 == 198249424, " found %lld\n",
506                  (long long)LOV_MAGIC_V1);
507         LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
508                  (long long)LOV_PATTERN_RAID0);
509         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
510                  (long long)LOV_PATTERN_RAID1);
511
512         /* Checks for struct obd_statfs */
513         LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
514                  (long long)(int)sizeof(struct obd_statfs));
515         LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
516                  (long long)(int)offsetof(struct obd_statfs, os_type));
517         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
518                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
519         LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
520                  (long long)(int)offsetof(struct obd_statfs, os_blocks));
521         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
522                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
523         LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
524                  (long long)(int)offsetof(struct obd_statfs, os_bfree));
525         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
526                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
527         LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
528                  (long long)(int)offsetof(struct obd_statfs, os_bavail));
529         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
530                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
531         LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
532                  (long long)(int)offsetof(struct obd_statfs, os_ffree));
533         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
534                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
535         LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
536                  (long long)(int)offsetof(struct obd_statfs, os_fsid));
537         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
538                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
539         LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
540                  (long long)(int)offsetof(struct obd_statfs, os_bsize));
541         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
542                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
543         LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
544                  (long long)(int)offsetof(struct obd_statfs, os_namelen));
545         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
546                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
547         LASSERTF((int)offsetof(struct obd_statfs, os_spare) == 104, " found %lld\n",
548                  (long long)(int)offsetof(struct obd_statfs, os_spare));
549         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare) == 40, " found %lld\n",
550                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare));
551
552         /* Checks for struct obd_ioobj */
553         LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
554                  (long long)(int)sizeof(struct obd_ioobj));
555         LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
556                  (long long)(int)offsetof(struct obd_ioobj, ioo_id));
557         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
558                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
559         LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
560                  (long long)(int)offsetof(struct obd_ioobj, ioo_gr));
561         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
562                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
563         LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
564                  (long long)(int)offsetof(struct obd_ioobj, ioo_type));
565         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
566                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
567         LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
568                  (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
569         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
570                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
571
572         /* Checks for struct obd_quotactl */
573         LASSERTF((int)sizeof(struct obd_quotactl) == 112, " found %lld\n",
574                  (long long)(int)sizeof(struct obd_quotactl));
575         LASSERTF((int)offsetof(struct obd_quotactl, qc_cmd) == 0, " found %lld\n",
576                  (long long)(int)offsetof(struct obd_quotactl, qc_cmd));
577         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_cmd) == 4, " found %lld\n",
578                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_cmd));
579         LASSERTF((int)offsetof(struct obd_quotactl, qc_type) == 4, " found %lld\n",
580                  (long long)(int)offsetof(struct obd_quotactl, qc_type));
581         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_type) == 4, " found %lld\n",
582                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_type));
583         LASSERTF((int)offsetof(struct obd_quotactl, qc_id) == 8, " found %lld\n",
584                  (long long)(int)offsetof(struct obd_quotactl, qc_id));
585         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_id) == 4, " found %lld\n",
586                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_id));
587         LASSERTF((int)offsetof(struct obd_quotactl, qc_stat) == 12, " found %lld\n",
588                  (long long)(int)offsetof(struct obd_quotactl, qc_stat));
589         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_stat) == 4, " found %lld\n",
590                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_stat));
591         LASSERTF((int)offsetof(struct obd_quotactl, qc_dqinfo) == 16, " found %lld\n",
592                  (long long)(int)offsetof(struct obd_quotactl, qc_dqinfo));
593         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo) == 24, " found %lld\n",
594                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo));
595         LASSERTF((int)offsetof(struct obd_quotactl, qc_dqblk) == 40, " found %lld\n",
596                  (long long)(int)offsetof(struct obd_quotactl, qc_dqblk));
597         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqblk) == 72, " found %lld\n",
598                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqblk));
599
600         /* Checks for struct obd_dqinfo */
601         LASSERTF((int)sizeof(struct obd_dqinfo) == 24, " found %lld\n",
602                  (long long)(int)sizeof(struct obd_dqinfo));
603         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_bgrace) == 0, " found %lld\n",
604                  (long long)(int)offsetof(struct obd_dqinfo, dqi_bgrace));
605         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace) == 8, " found %lld\n",
606                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace));
607         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_igrace) == 8, " found %lld\n",
608                  (long long)(int)offsetof(struct obd_dqinfo, dqi_igrace));
609         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace) == 8, " found %lld\n",
610                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace));
611         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_flags) == 16, " found %lld\n",
612                  (long long)(int)offsetof(struct obd_dqinfo, dqi_flags));
613         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_flags) == 4, " found %lld\n",
614                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_flags));
615         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_valid) == 20, " found %lld\n",
616                  (long long)(int)offsetof(struct obd_dqinfo, dqi_valid));
617         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_valid) == 4, " found %lld\n",
618                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_valid));
619
620         /* Checks for struct obd_dqblk */
621         LASSERTF((int)sizeof(struct obd_dqblk) == 72, " found %lld\n",
622                  (long long)(int)sizeof(struct obd_dqblk));
623         LASSERTF((int)offsetof(struct obd_dqblk, dqb_bhardlimit) == 0, " found %lld\n",
624                  (long long)(int)offsetof(struct obd_dqblk, dqb_bhardlimit));
625         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit) == 8, " found %lld\n",
626                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit));
627         LASSERTF((int)offsetof(struct obd_dqblk, dqb_bsoftlimit) == 8, " found %lld\n",
628                  (long long)(int)offsetof(struct obd_dqblk, dqb_bsoftlimit));
629         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit) == 8, " found %lld\n",
630                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit));
631         LASSERTF((int)offsetof(struct obd_dqblk, dqb_curspace) == 16, " found %lld\n",
632                  (long long)(int)offsetof(struct obd_dqblk, dqb_curspace));
633         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curspace) == 8, " found %lld\n",
634                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curspace));
635         LASSERTF((int)offsetof(struct obd_dqblk, dqb_ihardlimit) == 24, " found %lld\n",
636                  (long long)(int)offsetof(struct obd_dqblk, dqb_ihardlimit));
637         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit) == 8, " found %lld\n",
638                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit));
639         LASSERTF((int)offsetof(struct obd_dqblk, dqb_isoftlimit) == 32, " found %lld\n",
640                  (long long)(int)offsetof(struct obd_dqblk, dqb_isoftlimit));
641         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit) == 8, " found %lld\n",
642                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit));
643         LASSERTF((int)offsetof(struct obd_dqblk, dqb_curinodes) == 40, " found %lld\n",
644                  (long long)(int)offsetof(struct obd_dqblk, dqb_curinodes));
645         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes) == 8, " found %lld\n",
646                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes));
647         LASSERTF((int)offsetof(struct obd_dqblk, dqb_btime) == 48, " found %lld\n",
648                  (long long)(int)offsetof(struct obd_dqblk, dqb_btime));
649         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_btime) == 8, " found %lld\n",
650                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_btime));
651         LASSERTF((int)offsetof(struct obd_dqblk, dqb_itime) == 56, " found %lld\n",
652                  (long long)(int)offsetof(struct obd_dqblk, dqb_itime));
653         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_itime) == 8, " found %lld\n",
654                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_itime));
655         LASSERTF((int)offsetof(struct obd_dqblk, dqb_valid) == 64, " found %lld\n",
656                  (long long)(int)offsetof(struct obd_dqblk, dqb_valid));
657         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_valid) == 4, " found %lld\n",
658                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_valid));
659
660         /* Checks for struct niobuf_remote */
661         LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
662                  (long long)(int)sizeof(struct niobuf_remote));
663         LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
664                  (long long)(int)offsetof(struct niobuf_remote, offset));
665         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
666                  (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
667         LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
668                  (long long)(int)offsetof(struct niobuf_remote, len));
669         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
670                  (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
671         LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
672                  (long long)(int)offsetof(struct niobuf_remote, flags));
673         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
674                  (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
675         LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
676                  (long long)OBD_BRW_READ);
677         LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
678                  (long long)OBD_BRW_WRITE);
679         LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
680                  (long long)OBD_BRW_SYNC);
681         LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
682                  (long long)OBD_BRW_FROM_GRANT);
683
684         /* Checks for struct ost_body */
685         LASSERTF((int)sizeof(struct ost_body) == 208, " found %lld\n",
686                  (long long)(int)sizeof(struct ost_body));
687         LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n",
688                  (long long)(int)offsetof(struct ost_body, oa));
689         LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
690                  (long long)(int)sizeof(((struct ost_body *)0)->oa));
691
692         /* Checks for struct ll_fid */
693         LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
694                  (long long)(int)sizeof(struct ll_fid));
695         LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
696                  (long long)(int)offsetof(struct ll_fid, id));
697         LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
698                  (long long)(int)sizeof(((struct ll_fid *)0)->id));
699         LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
700                  (long long)(int)offsetof(struct ll_fid, generation));
701         LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
702                  (long long)(int)sizeof(((struct ll_fid *)0)->generation));
703         LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
704                  (long long)(int)offsetof(struct ll_fid, f_type));
705         LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
706                  (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
707
708         /* Checks for struct mds_status_req */
709         LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
710                  (long long)(int)sizeof(struct mds_status_req));
711         LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
712                  (long long)(int)offsetof(struct mds_status_req, flags));
713         LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
714                  (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
715         LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
716                  (long long)(int)offsetof(struct mds_status_req, repbuf));
717         LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
718                  (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
719
720         /* Checks for struct mds_body */
721         LASSERTF((int)sizeof(struct mds_body) == 168, " found %lld\n",
722                  (long long)(int)sizeof(struct mds_body));
723         LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n",
724                  (long long)(int)offsetof(struct mds_body, fid1));
725         LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n",
726                  (long long)(int)sizeof(((struct mds_body *)0)->fid1));
727         LASSERTF((int)offsetof(struct mds_body, fid2) == 16, " found %lld\n",
728                  (long long)(int)offsetof(struct mds_body, fid2));
729         LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n",
730                  (long long)(int)sizeof(((struct mds_body *)0)->fid2));
731         LASSERTF((int)offsetof(struct mds_body, handle) == 32, " found %lld\n",
732                  (long long)(int)offsetof(struct mds_body, handle));
733         LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
734                  (long long)(int)sizeof(((struct mds_body *)0)->handle));
735         LASSERTF((int)offsetof(struct mds_body, size) == 48, " found %lld\n",
736                  (long long)(int)offsetof(struct mds_body, size));
737         LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
738                  (long long)(int)sizeof(((struct mds_body *)0)->size));
739         LASSERTF((int)offsetof(struct mds_body, blocks) == 80, " found %lld\n",
740                  (long long)(int)offsetof(struct mds_body, blocks));
741         LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
742                  (long long)(int)sizeof(((struct mds_body *)0)->blocks));
743         LASSERTF((int)offsetof(struct mds_body, io_epoch) == 88, " found %lld\n",
744                  (long long)(int)offsetof(struct mds_body, io_epoch));
745         LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
746                  (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
747         LASSERTF((int)offsetof(struct mds_body, ino) == 96, " found %lld\n",
748                  (long long)(int)offsetof(struct mds_body, ino));
749         LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 8, " found %lld\n",
750                  (long long)(int)sizeof(((struct mds_body *)0)->ino));
751         LASSERTF((int)offsetof(struct mds_body, valid) == 40, " found %lld\n",
752                  (long long)(int)offsetof(struct mds_body, valid));
753         LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 8, " found %lld\n",
754                  (long long)(int)sizeof(((struct mds_body *)0)->valid));
755         LASSERTF((int)offsetof(struct mds_body, fsuid) == 104, " found %lld\n",
756                  (long long)(int)offsetof(struct mds_body, fsuid));
757         LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n",
758                  (long long)(int)sizeof(((struct mds_body *)0)->fsuid));
759         LASSERTF((int)offsetof(struct mds_body, fsgid) == 108, " found %lld\n",
760                  (long long)(int)offsetof(struct mds_body, fsgid));
761         LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n",
762                  (long long)(int)sizeof(((struct mds_body *)0)->fsgid));
763         LASSERTF((int)offsetof(struct mds_body, capability) == 112, " found %lld\n",
764                  (long long)(int)offsetof(struct mds_body, capability));
765         LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n",
766                  (long long)(int)sizeof(((struct mds_body *)0)->capability));
767         LASSERTF((int)offsetof(struct mds_body, mode) == 116, " found %lld\n",
768                  (long long)(int)offsetof(struct mds_body, mode));
769         LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
770                  (long long)(int)sizeof(((struct mds_body *)0)->mode));
771         LASSERTF((int)offsetof(struct mds_body, uid) == 120, " found %lld\n",
772                  (long long)(int)offsetof(struct mds_body, uid));
773         LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
774                  (long long)(int)sizeof(((struct mds_body *)0)->uid));
775         LASSERTF((int)offsetof(struct mds_body, gid) == 124, " found %lld\n",
776                  (long long)(int)offsetof(struct mds_body, gid));
777         LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
778                  (long long)(int)sizeof(((struct mds_body *)0)->gid));
779         LASSERTF((int)offsetof(struct mds_body, mtime) == 56, " found %lld\n",
780                  (long long)(int)offsetof(struct mds_body, mtime));
781         LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 8, " found %lld\n",
782                  (long long)(int)sizeof(((struct mds_body *)0)->mtime));
783         LASSERTF((int)offsetof(struct mds_body, ctime) == 72, " found %lld\n",
784                  (long long)(int)offsetof(struct mds_body, ctime));
785         LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 8, " found %lld\n",
786                  (long long)(int)sizeof(((struct mds_body *)0)->ctime));
787         LASSERTF((int)offsetof(struct mds_body, atime) == 64, " found %lld\n",
788                  (long long)(int)offsetof(struct mds_body, atime));
789         LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 8, " found %lld\n",
790                  (long long)(int)sizeof(((struct mds_body *)0)->atime));
791         LASSERTF((int)offsetof(struct mds_body, flags) == 128, " found %lld\n",
792                  (long long)(int)offsetof(struct mds_body, flags));
793         LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
794                  (long long)(int)sizeof(((struct mds_body *)0)->flags));
795         LASSERTF((int)offsetof(struct mds_body, rdev) == 132, " found %lld\n",
796                  (long long)(int)offsetof(struct mds_body, rdev));
797         LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
798                  (long long)(int)sizeof(((struct mds_body *)0)->rdev));
799         LASSERTF((int)offsetof(struct mds_body, nlink) == 136, " found %lld\n",
800                  (long long)(int)offsetof(struct mds_body, nlink));
801         LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
802                  (long long)(int)sizeof(((struct mds_body *)0)->nlink));
803         LASSERTF((int)offsetof(struct mds_body, generation) == 140, " found %lld\n",
804                  (long long)(int)offsetof(struct mds_body, generation));
805         LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
806                  (long long)(int)sizeof(((struct mds_body *)0)->generation));
807         LASSERTF((int)offsetof(struct mds_body, suppgid) == 144, " found %lld\n",
808                  (long long)(int)offsetof(struct mds_body, suppgid));
809         LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n",
810                  (long long)(int)sizeof(((struct mds_body *)0)->suppgid));
811         LASSERTF((int)offsetof(struct mds_body, eadatasize) == 148, " found %lld\n",
812                  (long long)(int)offsetof(struct mds_body, eadatasize));
813         LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
814                  (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
815         LASSERTF(FMODE_READ == 1, " found %lld\n",
816                  (long long)FMODE_READ);
817         LASSERTF(FMODE_WRITE == 2, " found %lld\n",
818                  (long long)FMODE_WRITE);
819         LASSERTF(FMODE_EXEC == 4, " found %lld\n",
820                  (long long)FMODE_EXEC);
821         LASSERTF(MDS_OPEN_CREAT == 64, " found %lld\n",
822                  (long long)MDS_OPEN_CREAT);
823         LASSERTF(MDS_OPEN_EXCL == 128, " found %lld\n",
824                  (long long)MDS_OPEN_EXCL);
825         LASSERTF(MDS_OPEN_TRUNC == 512, " found %lld\n",
826                  (long long)MDS_OPEN_TRUNC);
827         LASSERTF(MDS_OPEN_APPEND == 1024, " found %lld\n",
828                  (long long)MDS_OPEN_APPEND);
829         LASSERTF(MDS_OPEN_SYNC == 4096, " found %lld\n",
830                  (long long)MDS_OPEN_SYNC);
831         LASSERTF(MDS_OPEN_DIRECTORY == 65536, " found %lld\n",
832                  (long long)MDS_OPEN_DIRECTORY);
833         LASSERTF(MDS_OPEN_DELAY_CREATE == 16777216, " found %lld\n",
834                  (long long)MDS_OPEN_DELAY_CREATE);
835         LASSERTF(MDS_OPEN_HAS_EA == 1073741824, " found %lld\n",
836                  (long long)MDS_OPEN_HAS_EA);
837
838         /* Checks for struct mds_rec_setattr */
839         LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
840                  (long long)(int)sizeof(struct mds_rec_setattr));
841         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
842                  (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
843         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
844                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
845         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
846                  (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
847         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
848                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
849         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
850                  (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
851         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
852                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
853         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
854                  (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
855         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
856                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
857         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
858                  (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
859         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
860                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
861         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
862                  (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
863         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
864                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
865         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
866                  (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
867         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
868                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
869         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
870                  (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
871         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
872                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
873         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
874                  (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
875         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
876                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
877         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
878                  (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
879         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
880                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
881         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
882                  (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
883         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
884                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
885         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
886                  (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
887         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
888                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
889         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
890                  (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
891         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
892                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
893         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
894                  (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
895         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
896                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
897         LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
898                  (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
899         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
900                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
901
902         /* Checks for struct mds_rec_create */
903         LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
904                  (long long)(int)sizeof(struct mds_rec_create));
905         LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
906                  (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
907         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
908                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
909         LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
910                  (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
911         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
912                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
913         LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
914                  (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
915         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
916                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
917         LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
918                  (long long)(int)offsetof(struct mds_rec_create, cr_cap));
919         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
920                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
921         LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
922                  (long long)(int)offsetof(struct mds_rec_create, cr_flags));
923         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
924                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
925         LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
926                  (long long)(int)offsetof(struct mds_rec_create, cr_mode));
927         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
928                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
929         LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
930                  (long long)(int)offsetof(struct mds_rec_create, cr_fid));
931         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
932                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
933         LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
934                  (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
935         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
936                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
937         LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
938                  (long long)(int)offsetof(struct mds_rec_create, cr_time));
939         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
940                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
941         LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
942                  (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
943         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
944                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
945         LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
946                  (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
947         LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
948                  (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
949
950         /* Checks for struct mds_rec_link */
951         LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
952                  (long long)(int)sizeof(struct mds_rec_link));
953         LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
954                  (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
955         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
956                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
957         LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
958                  (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
959         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
960                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
961         LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
962                  (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
963         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
964                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
965         LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
966                  (long long)(int)offsetof(struct mds_rec_link, lk_cap));
967         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
968                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
969         LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
970                  (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
971         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
972                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
973         LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
974                  (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
975         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
976                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
977         LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
978                  (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
979         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
980                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
981         LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
982                  (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
983         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
984                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
985         LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
986                  (long long)(int)offsetof(struct mds_rec_link, lk_time));
987         LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
988                  (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
989
990         /* Checks for struct mds_rec_unlink */
991         LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
992                  (long long)(int)sizeof(struct mds_rec_unlink));
993         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
994                  (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
995         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
996                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
997         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
998                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
999         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
1000                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
1001         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
1002                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
1003         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
1004                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
1005         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
1006                  (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
1007         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
1008                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
1009         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
1010                  (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
1011         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
1012                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
1013         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
1014                  (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
1015         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
1016                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
1017         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
1018                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
1019         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
1020                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
1021         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
1022                  (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
1023         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
1024                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
1025         LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
1026                  (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
1027         LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
1028                  (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
1029
1030         /* Checks for struct mds_rec_rename */
1031         LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
1032                  (long long)(int)sizeof(struct mds_rec_rename));
1033         LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
1034                  (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
1035         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
1036                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
1037         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
1038                  (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
1039         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
1040                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
1041         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
1042                  (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
1043         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
1044                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
1045         LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
1046                  (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
1047         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
1048                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
1049         LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
1050                  (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
1051         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
1052                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
1053         LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
1054                  (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
1055         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
1056                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
1057         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
1058                  (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
1059         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
1060                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
1061         LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
1062                  (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
1063         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
1064                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
1065         LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
1066                  (long long)(int)offsetof(struct mds_rec_rename, rn_time));
1067         LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
1068                  (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
1069
1070         /* Checks for struct lov_desc */
1071         LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
1072                  (long long)(int)sizeof(struct lov_desc));
1073         LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
1074                  (long long)(int)offsetof(struct lov_desc, ld_tgt_count));
1075         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
1076                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
1077         LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
1078                  (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count));
1079         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
1080                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
1081         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
1082                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count));
1083         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
1084                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
1085         LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
1086                  (long long)(int)offsetof(struct lov_desc, ld_pattern));
1087         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
1088                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
1089         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
1090                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size));
1091         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
1092                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
1093         LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
1094                  (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
1095         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
1096                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
1097         LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 48, " found %lld\n",
1098                  (long long)(int)offsetof(struct lov_desc, ld_uuid));
1099         LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
1100                  (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
1101
1102         /* Checks for struct ldlm_res_id */
1103         LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
1104                  (long long)(int)sizeof(struct ldlm_res_id));
1105         LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
1106                  (long long)(int)offsetof(struct ldlm_res_id, name[4]));
1107         LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
1108                  (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
1109
1110         /* Checks for struct ldlm_extent */
1111         LASSERTF((int)sizeof(struct ldlm_extent) == 16, " found %lld\n",
1112                  (long long)(int)sizeof(struct ldlm_extent));
1113         LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
1114                  (long long)(int)offsetof(struct ldlm_extent, start));
1115         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
1116                  (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
1117         LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
1118                  (long long)(int)offsetof(struct ldlm_extent, end));
1119         LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
1120                  (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
1121
1122         /* Checks for struct ldlm_flock */
1123         LASSERTF((int)sizeof(struct ldlm_flock) == 32, " found %lld\n",
1124                  (long long)(int)sizeof(struct ldlm_flock));
1125         LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
1126                  (long long)(int)offsetof(struct ldlm_flock, start));
1127         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
1128                  (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
1129         LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
1130                  (long long)(int)offsetof(struct ldlm_flock, end));
1131         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
1132                  (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
1133         LASSERTF((int)offsetof(struct ldlm_flock, blocking_export) == 16, " found %lld\n",
1134                  (long long)(int)offsetof(struct ldlm_flock, blocking_export));
1135         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_export) == 8, " found %lld\n",
1136                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_export));
1137         LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
1138                  (long long)(int)offsetof(struct ldlm_flock, blocking_pid));
1139         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4, " found %lld\n",
1140                  (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
1141         LASSERTF((int)offsetof(struct ldlm_flock, pid) == 28, " found %lld\n",
1142                  (long long)(int)offsetof(struct ldlm_flock, pid));
1143         LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 4, " found %lld\n",
1144                  (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
1145
1146         /* Checks for struct ldlm_intent */
1147         LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
1148                  (long long)(int)sizeof(struct ldlm_intent));
1149         LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
1150                  (long long)(int)offsetof(struct ldlm_intent, opc));
1151         LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
1152                  (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
1153
1154         /* Checks for struct ldlm_resource_desc */
1155         LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
1156                  (long long)(int)sizeof(struct ldlm_resource_desc));
1157         LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
1158                  (long long)(int)offsetof(struct ldlm_resource_desc, lr_type));
1159         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
1160                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
1161         LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
1162                  (long long)(int)offsetof(struct ldlm_resource_desc, lr_name));
1163         LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
1164                  (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
1165
1166         /* Checks for struct ldlm_lock_desc */
1167         LASSERTF((int)sizeof(struct ldlm_lock_desc) == 80, " found %lld\n",
1168                  (long long)(int)sizeof(struct ldlm_lock_desc));
1169         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
1170                  (long long)(int)offsetof(struct ldlm_lock_desc, l_resource));
1171         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
1172                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
1173         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
1174                  (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode));
1175         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
1176                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
1177         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
1178                  (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode));
1179         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
1180                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
1181         LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
1182                  (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data));
1183         LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32, " found %lld\n",
1184                  (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
1185
1186         /* Checks for struct ldlm_request */
1187         LASSERTF((int)sizeof(struct ldlm_request) == 104, " found %lld\n",
1188                  (long long)(int)sizeof(struct ldlm_request));
1189         LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
1190                  (long long)(int)offsetof(struct ldlm_request, lock_flags));
1191         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
1192                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
1193         LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
1194                  (long long)(int)offsetof(struct ldlm_request, lock_desc));
1195         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
1196                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
1197         LASSERTF((int)offsetof(struct ldlm_request, lock_handle1) == 88, " found %lld\n",
1198                  (long long)(int)offsetof(struct ldlm_request, lock_handle1));
1199         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8, " found %lld\n",
1200                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle1));
1201         LASSERTF((int)offsetof(struct ldlm_request, lock_handle2) == 96, " found %lld\n",
1202                  (long long)(int)offsetof(struct ldlm_request, lock_handle2));
1203         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8, " found %lld\n",
1204                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle2));
1205
1206         /* Checks for struct ldlm_reply */
1207         LASSERTF((int)sizeof(struct ldlm_reply) == 112, " found %lld\n",
1208                  (long long)(int)sizeof(struct ldlm_reply));
1209         LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
1210                  (long long)(int)offsetof(struct ldlm_reply, lock_flags));
1211         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
1212                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
1213         LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
1214                  (long long)(int)offsetof(struct ldlm_request, lock_desc));
1215         LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
1216                  (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
1217         LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n",
1218                  (long long)(int)offsetof(struct ldlm_reply, lock_handle));
1219         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
1220                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
1221         LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n",
1222                  (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1));
1223         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
1224                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
1225         LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n",
1226                  (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2));
1227         LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
1228                  (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
1229
1230         /* Checks for struct ost_lvb */
1231         LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
1232                  (long long)(int)sizeof(struct ost_lvb));
1233         LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
1234                  (long long)(int)offsetof(struct ost_lvb, lvb_size));
1235         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
1236                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
1237         LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
1238                  (long long)(int)offsetof(struct ost_lvb, lvb_mtime));
1239         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
1240                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
1241         LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
1242                  (long long)(int)offsetof(struct ost_lvb, lvb_atime));
1243         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
1244                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
1245         LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
1246                  (long long)(int)offsetof(struct ost_lvb, lvb_ctime));
1247         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
1248                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
1249         LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
1250                  (long long)(int)offsetof(struct ost_lvb, lvb_blocks));
1251         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
1252                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
1253
1254         /* Checks for struct ptlbd_op */
1255         LASSERTF((int)sizeof(struct ptlbd_op) == 12, " found %lld\n",
1256                  (long long)(int)sizeof(struct ptlbd_op));
1257         LASSERTF((int)offsetof(struct ptlbd_op, op_cmd) == 0, " found %lld\n",
1258                  (long long)(int)offsetof(struct ptlbd_op, op_cmd));
1259         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_cmd) == 2, " found %lld\n",
1260                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_cmd));
1261         LASSERTF((int)offsetof(struct ptlbd_op, op_lun) == 2, " found %lld\n",
1262                  (long long)(int)offsetof(struct ptlbd_op, op_lun));
1263         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_lun) == 2, " found %lld\n",
1264                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_lun));
1265         LASSERTF((int)offsetof(struct ptlbd_op, op_niob_cnt) == 4, " found %lld\n",
1266                  (long long)(int)offsetof(struct ptlbd_op, op_niob_cnt));
1267         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt) == 2, " found %lld\n",
1268                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt));
1269         LASSERTF((int)offsetof(struct ptlbd_op, op__padding) == 6, " found %lld\n",
1270                  (long long)(int)offsetof(struct ptlbd_op, op__padding));
1271         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op__padding) == 2, " found %lld\n",
1272                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op__padding));
1273         LASSERTF((int)offsetof(struct ptlbd_op, op_block_cnt) == 8, " found %lld\n",
1274                  (long long)(int)offsetof(struct ptlbd_op, op_block_cnt));
1275         LASSERTF((int)sizeof(((struct ptlbd_op *)0)->op_block_cnt) == 4, " found %lld\n",
1276                  (long long)(int)sizeof(((struct ptlbd_op *)0)->op_block_cnt));
1277
1278         /* Checks for struct ptlbd_niob */
1279         LASSERTF((int)sizeof(struct ptlbd_niob) == 24, " found %lld\n",
1280                  (long long)(int)sizeof(struct ptlbd_niob));
1281         LASSERTF((int)offsetof(struct ptlbd_niob, n_xid) == 0, " found %lld\n",
1282                  (long long)(int)offsetof(struct ptlbd_niob, n_xid));
1283         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_xid) == 8, " found %lld\n",
1284                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_xid));
1285         LASSERTF((int)offsetof(struct ptlbd_niob, n_block_nr) == 8, " found %lld\n",
1286                  (long long)(int)offsetof(struct ptlbd_niob, n_block_nr));
1287         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_block_nr) == 8, " found %lld\n",
1288                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_block_nr));
1289         LASSERTF((int)offsetof(struct ptlbd_niob, n_offset) == 16, " found %lld\n",
1290                  (long long)(int)offsetof(struct ptlbd_niob, n_offset));
1291         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_offset) == 4, " found %lld\n",
1292                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_offset));
1293         LASSERTF((int)offsetof(struct ptlbd_niob, n_length) == 20, " found %lld\n",
1294                  (long long)(int)offsetof(struct ptlbd_niob, n_length));
1295         LASSERTF((int)sizeof(((struct ptlbd_niob *)0)->n_length) == 4, " found %lld\n",
1296                  (long long)(int)sizeof(((struct ptlbd_niob *)0)->n_length));
1297
1298         /* Checks for struct ptlbd_rsp */
1299         LASSERTF((int)sizeof(struct ptlbd_rsp) == 4, " found %lld\n",
1300                  (long long)(int)sizeof(struct ptlbd_rsp));
1301         LASSERTF((int)offsetof(struct ptlbd_rsp, r_status) == 0, " found %lld\n",
1302                  (long long)(int)offsetof(struct ptlbd_rsp, r_status));
1303         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_status) == 2, " found %lld\n",
1304                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_status));
1305         LASSERTF((int)offsetof(struct ptlbd_rsp, r_error_cnt) == 2, " found %lld\n",
1306                  (long long)(int)offsetof(struct ptlbd_rsp, r_error_cnt));
1307         LASSERTF((int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt) == 2, " found %lld\n",
1308                  (long long)(int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt));
1309
1310         /* Checks for struct llog_logid */
1311         LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
1312                  (long long)(int)sizeof(struct llog_logid));
1313         LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
1314                  (long long)(int)offsetof(struct llog_logid, lgl_oid));
1315         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
1316                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
1317         LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
1318                  (long long)(int)offsetof(struct llog_logid, lgl_ogr));
1319         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
1320                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
1321         LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
1322                  (long long)(int)offsetof(struct llog_logid, lgl_ogen));
1323         LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
1324                  (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
1325         LASSERTF(OST_SZ_REC == 274730752, " found %lld\n",
1326                  (long long)OST_SZ_REC);
1327         LASSERTF(OST_RAID1_REC == 274731008, " found %lld\n",
1328                  (long long)OST_RAID1_REC);
1329         LASSERTF(MDS_UNLINK_REC == 274801668, " found %lld\n",
1330                  (long long)MDS_UNLINK_REC);
1331         LASSERTF(MDS_SETATTR_REC == 274801665, " found %lld\n",
1332                  (long long)MDS_SETATTR_REC);
1333         LASSERTF(OBD_CFG_REC == 274857984, " found %lld\n",
1334                  (long long)OBD_CFG_REC);
1335         LASSERTF(PTL_CFG_REC == 274923520, " found %lld\n",
1336                  (long long)PTL_CFG_REC);
1337         LASSERTF(LLOG_GEN_REC == 274989056, " found %lld\n",
1338                  (long long)LLOG_GEN_REC);
1339         LASSERTF(LLOG_HDR_MAGIC == 275010873, " found %lld\n",
1340                  (long long)LLOG_HDR_MAGIC);
1341         LASSERTF(LLOG_LOGID_MAGIC == 275010875, " found %lld\n",
1342                  (long long)LLOG_LOGID_MAGIC);
1343
1344         /* Checks for struct llog_catid */
1345         LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
1346                  (long long)(int)sizeof(struct llog_catid));
1347         LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
1348                  (long long)(int)offsetof(struct llog_catid, lci_logid));
1349         LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
1350                  (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
1351
1352         /* Checks for struct llog_rec_hdr */
1353         LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
1354                  (long long)(int)sizeof(struct llog_rec_hdr));
1355         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
1356                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_len));
1357         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
1358                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
1359         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
1360                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_index));
1361         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
1362                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
1363         LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
1364                  (long long)(int)offsetof(struct llog_rec_hdr, lrh_type));
1365         LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
1366                  (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
1367
1368         /* Checks for struct llog_rec_tail */
1369         LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
1370                  (long long)(int)sizeof(struct llog_rec_tail));
1371         LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
1372                  (long long)(int)offsetof(struct llog_rec_tail, lrt_len));
1373         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
1374                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
1375         LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
1376                  (long long)(int)offsetof(struct llog_rec_tail, lrt_index));
1377         LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
1378                  (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
1379
1380         /* Checks for struct llog_logid_rec */
1381         LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
1382                  (long long)(int)sizeof(struct llog_logid_rec));
1383         LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
1384                  (long long)(int)offsetof(struct llog_logid_rec, lid_hdr));
1385         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
1386                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
1387         LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
1388                  (long long)(int)offsetof(struct llog_logid_rec, lid_id));
1389         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
1390                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
1391         LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
1392                  (long long)(int)offsetof(struct llog_logid_rec, lid_tail));
1393         LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
1394                  (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
1395
1396         /* Checks for struct llog_create_rec */
1397         LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n",
1398                  (long long)(int)sizeof(struct llog_create_rec));
1399         LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
1400                  (long long)(int)offsetof(struct llog_create_rec, lcr_hdr));
1401         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
1402                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
1403         LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
1404                  (long long)(int)offsetof(struct llog_create_rec, lcr_fid));
1405         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n",
1406                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
1407         LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n",
1408                  (long long)(int)offsetof(struct llog_create_rec, lcr_oid));
1409         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
1410                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
1411         LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n",
1412                  (long long)(int)offsetof(struct llog_create_rec, lcr_ogen));
1413         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
1414                  (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
1415
1416         /* Checks for struct llog_orphan_rec */
1417         LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
1418                  (long long)(int)sizeof(struct llog_orphan_rec));
1419         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
1420                  (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr));
1421         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
1422                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
1423         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
1424                  (long long)(int)offsetof(struct llog_orphan_rec, lor_oid));
1425         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
1426                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
1427         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
1428                  (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen));
1429         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
1430                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
1431         LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
1432                  (long long)(int)offsetof(struct llog_orphan_rec, lor_tail));
1433         LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
1434                  (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
1435
1436         /* Checks for struct llog_unlink_rec */
1437         LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
1438                  (long long)(int)sizeof(struct llog_unlink_rec));
1439         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
1440                  (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr));
1441         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
1442                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
1443         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
1444                  (long long)(int)offsetof(struct llog_unlink_rec, lur_oid));
1445         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
1446                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
1447         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
1448                  (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen));
1449         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
1450                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
1451         LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
1452                  (long long)(int)offsetof(struct llog_unlink_rec, lur_tail));
1453         LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
1454                  (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
1455
1456         /* Checks for struct llog_size_change_rec */
1457         LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n",
1458                  (long long)(int)sizeof(struct llog_size_change_rec));
1459         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
1460                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr));
1461         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
1462                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
1463         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
1464                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid));
1465         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n",
1466                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
1467         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n",
1468                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch));
1469         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
1470                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
1471         LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n",
1472                  (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail));
1473         LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
1474                  (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
1475
1476         /* Checks for struct llog_gen */
1477         LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
1478                  (long long)(int)sizeof(struct llog_gen));
1479         LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
1480                  (long long)(int)offsetof(struct llog_gen, mnt_cnt));
1481         LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
1482                  (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
1483         LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
1484                  (long long)(int)offsetof(struct llog_gen, conn_cnt));
1485         LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
1486                  (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
1487
1488         /* Checks for struct llog_gen_rec */
1489         LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
1490                  (long long)(int)sizeof(struct llog_gen_rec));
1491         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
1492                  (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr));
1493         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
1494                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
1495         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
1496                  (long long)(int)offsetof(struct llog_gen_rec, lgr_gen));
1497         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
1498                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
1499         LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
1500                  (long long)(int)offsetof(struct llog_gen_rec, lgr_tail));
1501         LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
1502                  (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
1503
1504         /* Checks for struct llog_log_hdr */
1505         LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
1506                  (long long)(int)sizeof(struct llog_log_hdr));
1507         LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
1508                  (long long)(int)offsetof(struct llog_log_hdr, llh_hdr));
1509         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
1510                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
1511         LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
1512                  (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp));
1513         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
1514                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
1515         LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
1516                  (long long)(int)offsetof(struct llog_log_hdr, llh_count));
1517         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
1518                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
1519         LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
1520                  (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset));
1521         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
1522                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
1523         LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
1524                  (long long)(int)offsetof(struct llog_log_hdr, llh_size));
1525         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
1526                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
1527         LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
1528                  (long long)(int)offsetof(struct llog_log_hdr, llh_flags));
1529         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
1530                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
1531         LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
1532                  (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx));
1533         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
1534                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
1535         LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
1536                  (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid));
1537         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
1538                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
1539         LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
1540                  (long long)(int)offsetof(struct llog_log_hdr, llh_reserved));
1541         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
1542                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
1543         LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
1544                  (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
1545         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
1546                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
1547         LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
1548                  (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
1549         LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
1550                  (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
1551
1552         /* Checks for struct llog_cookie */
1553         LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
1554                  (long long)(int)sizeof(struct llog_cookie));
1555         LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
1556                  (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
1557         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
1558                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
1559         LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
1560                  (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
1561         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
1562                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
1563         LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
1564                  (long long)(int)offsetof(struct llog_cookie, lgc_index));
1565         LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
1566                  (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
1567
1568         /* Checks for struct llogd_body */
1569         LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
1570                  (long long)(int)sizeof(struct llogd_body));
1571         LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
1572                  (long long)(int)offsetof(struct llogd_body, lgd_logid));
1573         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
1574                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
1575         LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
1576                  (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx));
1577         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
1578                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
1579         LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
1580                  (long long)(int)offsetof(struct llogd_body, lgd_llh_flags));
1581         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
1582                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
1583         LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
1584                  (long long)(int)offsetof(struct llogd_body, lgd_index));
1585         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
1586                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
1587         LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
1588                  (long long)(int)offsetof(struct llogd_body, lgd_saved_index));
1589         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
1590                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
1591         LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
1592                  (long long)(int)offsetof(struct llogd_body, lgd_len));
1593         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
1594                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
1595         LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
1596                  (long long)(int)offsetof(struct llogd_body, lgd_cur_offset));
1597         LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
1598                  (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
1599         LASSERTF(LLOG_ORIGIN_HANDLE_CREATE == 501, " found %lld\n",
1600                  (long long)LLOG_ORIGIN_HANDLE_CREATE);
1601         LASSERTF(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502, " found %lld\n",
1602                  (long long)LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
1603         LASSERTF(LLOG_ORIGIN_HANDLE_READ_HEADER == 503, " found %lld\n",
1604                  (long long)LLOG_ORIGIN_HANDLE_READ_HEADER);
1605         LASSERTF(LLOG_ORIGIN_HANDLE_WRITE_REC == 504, " found %lld\n",
1606                  (long long)LLOG_ORIGIN_HANDLE_WRITE_REC);
1607         LASSERTF(LLOG_ORIGIN_HANDLE_CLOSE == 505, " found %lld\n",
1608                  (long long)LLOG_ORIGIN_HANDLE_CLOSE);
1609         LASSERTF(LLOG_ORIGIN_CONNECT == 506, " found %lld\n",
1610                  (long long)LLOG_ORIGIN_CONNECT);
1611         LASSERTF(LLOG_CATINFO == 507, " found %lld\n",
1612                  (long long)LLOG_CATINFO);
1613
1614         /* Checks for struct llogd_conn_body */
1615         LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
1616                  (long long)(int)sizeof(struct llogd_conn_body));
1617         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
1618                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen));
1619         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
1620                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
1621         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
1622                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid));
1623         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
1624                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
1625         LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
1626                  (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
1627         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
1628                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
1629
1630         /* Checks for struct qunit_data */
1631         LASSERTF((int)sizeof(struct qunit_data) == 16, " found %lld\n",
1632                  (long long)(int)sizeof(struct qunit_data));
1633         LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, " found %lld\n",
1634                  (long long)(int)offsetof(struct qunit_data, qd_id));
1635         LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, " found %lld\n",
1636                  (long long)(int)sizeof(((struct qunit_data *)0)->qd_id));
1637         LASSERTF((int)offsetof(struct qunit_data, qd_type) == 4, " found %lld\n",
1638                  (long long)(int)offsetof(struct qunit_data, qd_type));
1639         LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_type) == 4, " found %lld\n",
1640                  (long long)(int)sizeof(((struct qunit_data *)0)->qd_type));
1641         LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, " found %lld\n",
1642                  (long long)(int)offsetof(struct qunit_data, qd_count));
1643         LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 4, " found %lld\n",
1644                  (long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
1645         LASSERTF((int)offsetof(struct qunit_data, qd_isblk) == 12, " found %lld\n",
1646                  (long long)(int)offsetof(struct qunit_data, qd_isblk));
1647         LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_isblk) == 4, " found %lld\n",
1648                  (long long)(int)sizeof(((struct qunit_data *)0)->qd_isblk));
1649 }
1650