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