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