Whamcloud - gitweb
LU-14459 mdt: support fixed directory layout
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.gnu.org/licenses/gpl-2.0.html
19  *
20  * GPL HEADER END
21  */
22 /*
23  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Use is subject to license terms.
25  *
26  * Copyright (c) 2011, 2017, Intel Corporation.
27  */
28 /*
29  * This file is part of Lustre, http://www.lustre.org/
30  */
31
32 #define DEBUG_SUBSYSTEM S_RPC
33
34 #ifdef CONFIG_LUSTRE_FS_POSIX_ACL
35 # include <linux/fs.h>
36 # include <linux/posix_acl_xattr.h>
37 #endif /* CONFIG_LUSTRE_FS_POSIX_ACL */
38
39 #include <obd_support.h>
40 #include <obd_class.h>
41 #include <lustre_net.h>
42 #include <lustre_disk.h>
43 #include <uapi/linux/lustre/lustre_access_log.h>
44 #include <uapi/linux/lustre/lustre_lfsck_user.h>
45 #include <uapi/linux/lustre/lustre_cfg.h>
46
47
48 void lustre_assert_wire_constants(void)
49 {
50         /* Wire protocol assertions generated by 'wirecheck'
51          * (make -C lustre/utils newwiretest)
52          */
53
54         /* Constants... */
55         LASSERTF(PTL_RPC_MSG_REQUEST == 4711, "found %lld\n",
56                  (long long)PTL_RPC_MSG_REQUEST);
57         LASSERTF(PTL_RPC_MSG_ERR == 4712, "found %lld\n",
58                  (long long)PTL_RPC_MSG_ERR);
59         LASSERTF(PTL_RPC_MSG_REPLY == 4713, "found %lld\n",
60                  (long long)PTL_RPC_MSG_REPLY);
61         LASSERTF(MDS_DIR_END_OFF == 0xfffffffffffffffeULL, "found 0x%.16llxULL\n",
62                  MDS_DIR_END_OFF);
63         LASSERTF(DEAD_HANDLE_MAGIC == 0xdeadbeefcafebabeULL, "found 0x%.16llxULL\n",
64                  DEAD_HANDLE_MAGIC);
65         BUILD_BUG_ON(MTI_NAME_MAXLEN != 64);
66         LASSERTF(OST_REPLY == 0, "found %lld\n",
67                  (long long)OST_REPLY);
68         LASSERTF(OST_GETATTR == 1, "found %lld\n",
69                  (long long)OST_GETATTR);
70         LASSERTF(OST_SETATTR == 2, "found %lld\n",
71                  (long long)OST_SETATTR);
72         LASSERTF(OST_READ == 3, "found %lld\n",
73                  (long long)OST_READ);
74         LASSERTF(OST_WRITE == 4, "found %lld\n",
75                  (long long)OST_WRITE);
76         LASSERTF(OST_CREATE == 5, "found %lld\n",
77                  (long long)OST_CREATE);
78         LASSERTF(OST_DESTROY == 6, "found %lld\n",
79                  (long long)OST_DESTROY);
80         LASSERTF(OST_GET_INFO == 7, "found %lld\n",
81                  (long long)OST_GET_INFO);
82         LASSERTF(OST_CONNECT == 8, "found %lld\n",
83                  (long long)OST_CONNECT);
84         LASSERTF(OST_DISCONNECT == 9, "found %lld\n",
85                  (long long)OST_DISCONNECT);
86         LASSERTF(OST_PUNCH == 10, "found %lld\n",
87                  (long long)OST_PUNCH);
88         LASSERTF(OST_OPEN == 11, "found %lld\n",
89                  (long long)OST_OPEN);
90         LASSERTF(OST_CLOSE == 12, "found %lld\n",
91                  (long long)OST_CLOSE);
92         LASSERTF(OST_STATFS == 13, "found %lld\n",
93                  (long long)OST_STATFS);
94         LASSERTF(OST_SYNC == 16, "found %lld\n",
95                  (long long)OST_SYNC);
96         LASSERTF(OST_SET_INFO == 17, "found %lld\n",
97                  (long long)OST_SET_INFO);
98         LASSERTF(OST_QUOTACHECK == 18, "found %lld\n",
99                  (long long)OST_QUOTACHECK);
100         LASSERTF(OST_QUOTACTL == 19, "found %lld\n",
101                  (long long)OST_QUOTACTL);
102         LASSERTF(OST_QUOTA_ADJUST_QUNIT == 20, "found %lld\n",
103                  (long long)OST_QUOTA_ADJUST_QUNIT);
104         LASSERTF(OST_LADVISE == 21, "found %lld\n",
105                  (long long)OST_LADVISE);
106         LASSERTF(OST_FALLOCATE == 22, "found %lld\n",
107                  (long long)OST_FALLOCATE);
108         LASSERTF(OST_SEEK == 23, "found %lld\n",
109                  (long long)OST_SEEK);
110         LASSERTF(OST_LAST_OPC == 24, "found %lld\n",
111                  (long long)OST_LAST_OPC);
112         LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL, "found 0x%.16llxULL\n",
113                  OBD_OBJECT_EOF);
114         LASSERTF(OST_MIN_PRECREATE == 32, "found %lld\n",
115                  (long long)OST_MIN_PRECREATE);
116         LASSERTF(OST_MAX_PRECREATE == 20000, "found %lld\n",
117                  (long long)OST_MAX_PRECREATE);
118         LASSERTF(OST_LVB_ERR_INIT == 0xffbadbad80000000ULL, "found 0x%.16llxULL\n",
119                  OST_LVB_ERR_INIT);
120         LASSERTF(OST_LVB_ERR_MASK == 0xffbadbad00000000ULL, "found 0x%.16llxULL\n",
121                  OST_LVB_ERR_MASK);
122         LASSERTF(MDS_FIRST_OPC == 33, "found %lld\n",
123                  (long long)MDS_FIRST_OPC);
124         LASSERTF(MDS_GETATTR == 33, "found %lld\n",
125                  (long long)MDS_GETATTR);
126         LASSERTF(MDS_GETATTR_NAME == 34, "found %lld\n",
127                  (long long)MDS_GETATTR_NAME);
128         LASSERTF(MDS_CLOSE == 35, "found %lld\n",
129                  (long long)MDS_CLOSE);
130         LASSERTF(MDS_REINT == 36, "found %lld\n",
131                  (long long)MDS_REINT);
132         LASSERTF(MDS_READPAGE == 37, "found %lld\n",
133                  (long long)MDS_READPAGE);
134         LASSERTF(MDS_CONNECT == 38, "found %lld\n",
135                  (long long)MDS_CONNECT);
136         LASSERTF(MDS_DISCONNECT == 39, "found %lld\n",
137                  (long long)MDS_DISCONNECT);
138         LASSERTF(MDS_GET_ROOT == 40, "found %lld\n",
139                  (long long)MDS_GET_ROOT);
140         LASSERTF(MDS_STATFS == 41, "found %lld\n",
141                  (long long)MDS_STATFS);
142         LASSERTF(MDS_PIN == 42, "found %lld\n",
143                  (long long)MDS_PIN);
144         LASSERTF(MDS_UNPIN == 43, "found %lld\n",
145                  (long long)MDS_UNPIN);
146         LASSERTF(MDS_SYNC == 44, "found %lld\n",
147                  (long long)MDS_SYNC);
148         LASSERTF(MDS_DONE_WRITING == 45, "found %lld\n",
149                  (long long)MDS_DONE_WRITING);
150         LASSERTF(MDS_SET_INFO == 46, "found %lld\n",
151                  (long long)MDS_SET_INFO);
152         LASSERTF(MDS_QUOTACHECK == 47, "found %lld\n",
153                  (long long)MDS_QUOTACHECK);
154         LASSERTF(MDS_QUOTACTL == 48, "found %lld\n",
155                  (long long)MDS_QUOTACTL);
156         LASSERTF(MDS_GETXATTR == 49, "found %lld\n",
157                  (long long)MDS_GETXATTR);
158         LASSERTF(MDS_SETXATTR == 50, "found %lld\n",
159                  (long long)MDS_SETXATTR);
160         LASSERTF(MDS_WRITEPAGE == 51, "found %lld\n",
161                  (long long)MDS_WRITEPAGE);
162         LASSERTF(MDS_IS_SUBDIR == 52, "found %lld\n",
163                  (long long)MDS_IS_SUBDIR);
164         LASSERTF(MDS_GET_INFO == 53, "found %lld\n",
165                  (long long)MDS_GET_INFO);
166         LASSERTF(MDS_HSM_STATE_GET == 54, "found %lld\n",
167                  (long long)MDS_HSM_STATE_GET);
168         LASSERTF(MDS_HSM_STATE_SET == 55, "found %lld\n",
169                  (long long)MDS_HSM_STATE_SET);
170         LASSERTF(MDS_HSM_ACTION == 56, "found %lld\n",
171                  (long long)MDS_HSM_ACTION);
172         LASSERTF(MDS_HSM_PROGRESS == 57, "found %lld\n",
173                  (long long)MDS_HSM_PROGRESS);
174         LASSERTF(MDS_HSM_REQUEST == 58, "found %lld\n",
175                  (long long)MDS_HSM_REQUEST);
176         LASSERTF(MDS_HSM_CT_REGISTER == 59, "found %lld\n",
177                  (long long)MDS_HSM_CT_REGISTER);
178         LASSERTF(MDS_HSM_CT_UNREGISTER == 60, "found %lld\n",
179                  (long long)MDS_HSM_CT_UNREGISTER);
180         LASSERTF(MDS_SWAP_LAYOUTS == 61, "found %lld\n",
181                  (long long)MDS_SWAP_LAYOUTS);
182         LASSERTF(MDS_RMFID == 62, "found %lld\n",
183                  (long long)MDS_RMFID);
184         LASSERTF(MDS_LAST_OPC == 63, "found %lld\n",
185                  (long long)MDS_LAST_OPC);
186         LASSERTF(REINT_SETATTR == 1, "found %lld\n",
187                  (long long)REINT_SETATTR);
188         LASSERTF(REINT_CREATE == 2, "found %lld\n",
189                  (long long)REINT_CREATE);
190         LASSERTF(REINT_LINK == 3, "found %lld\n",
191                  (long long)REINT_LINK);
192         LASSERTF(REINT_UNLINK == 4, "found %lld\n",
193                  (long long)REINT_UNLINK);
194         LASSERTF(REINT_RENAME == 5, "found %lld\n",
195                  (long long)REINT_RENAME);
196         LASSERTF(REINT_OPEN == 6, "found %lld\n",
197                  (long long)REINT_OPEN);
198         LASSERTF(REINT_SETXATTR == 7, "found %lld\n",
199                  (long long)REINT_SETXATTR);
200         LASSERTF(REINT_RMENTRY == 8, "found %lld\n",
201                  (long long)REINT_RMENTRY);
202         LASSERTF(REINT_MIGRATE == 9, "found %lld\n",
203                  (long long)REINT_MIGRATE);
204         LASSERTF(REINT_MAX == 11, "found %lld\n",
205                  (long long)REINT_MAX);
206         LASSERTF(DISP_IT_EXECD == 0x00000001UL, "found 0x%.8xUL\n",
207                 (unsigned)DISP_IT_EXECD);
208         LASSERTF(DISP_LOOKUP_EXECD == 0x00000002UL, "found 0x%.8xUL\n",
209                 (unsigned)DISP_LOOKUP_EXECD);
210         LASSERTF(DISP_LOOKUP_NEG == 0x00000004UL, "found 0x%.8xUL\n",
211                 (unsigned)DISP_LOOKUP_NEG);
212         LASSERTF(DISP_LOOKUP_POS == 0x00000008UL, "found 0x%.8xUL\n",
213                 (unsigned)DISP_LOOKUP_POS);
214         LASSERTF(DISP_OPEN_CREATE == 0x00000010UL, "found 0x%.8xUL\n",
215                 (unsigned)DISP_OPEN_CREATE);
216         LASSERTF(DISP_OPEN_OPEN == 0x00000020UL, "found 0x%.8xUL\n",
217                 (unsigned)DISP_OPEN_OPEN);
218         LASSERTF(DISP_ENQ_COMPLETE == 0x00400000UL, "found 0x%.8xUL\n",
219                 (unsigned)DISP_ENQ_COMPLETE);
220         LASSERTF(DISP_ENQ_OPEN_REF == 0x00800000UL, "found 0x%.8xUL\n",
221                 (unsigned)DISP_ENQ_OPEN_REF);
222         LASSERTF(DISP_ENQ_CREATE_REF == 0x01000000UL, "found 0x%.8xUL\n",
223                 (unsigned)DISP_ENQ_CREATE_REF);
224         LASSERTF(DISP_OPEN_LOCK == 0x02000000UL, "found 0x%.8xUL\n",
225                 (unsigned)DISP_OPEN_LOCK);
226         LASSERTF(MDS_STATUS_CONN == 1, "found %lld\n",
227                  (long long)MDS_STATUS_CONN);
228         LASSERTF(MDS_STATUS_LOV == 2, "found %lld\n",
229                  (long long)MDS_STATUS_LOV);
230         LASSERTF(MDS_ATTR_MODE == 0x0000000000000001ULL, "found 0x%.16llxULL\n",
231                         (long long)MDS_ATTR_MODE);
232         LASSERTF(MDS_ATTR_UID == 0x0000000000000002ULL, "found 0x%.16llxULL\n",
233                         (long long)MDS_ATTR_UID);
234         LASSERTF(MDS_ATTR_GID == 0x0000000000000004ULL, "found 0x%.16llxULL\n",
235                         (long long)MDS_ATTR_GID);
236         LASSERTF(MDS_ATTR_SIZE == 0x0000000000000008ULL, "found 0x%.16llxULL\n",
237                         (long long)MDS_ATTR_SIZE);
238         LASSERTF(MDS_ATTR_ATIME == 0x0000000000000010ULL, "found 0x%.16llxULL\n",
239                         (long long)MDS_ATTR_ATIME);
240         LASSERTF(MDS_ATTR_MTIME == 0x0000000000000020ULL, "found 0x%.16llxULL\n",
241                         (long long)MDS_ATTR_MTIME);
242         LASSERTF(MDS_ATTR_CTIME == 0x0000000000000040ULL, "found 0x%.16llxULL\n",
243                         (long long)MDS_ATTR_CTIME);
244         LASSERTF(MDS_ATTR_ATIME_SET == 0x0000000000000080ULL, "found 0x%.16llxULL\n",
245                         (long long)MDS_ATTR_ATIME_SET);
246         LASSERTF(MDS_ATTR_MTIME_SET == 0x0000000000000100ULL, "found 0x%.16llxULL\n",
247                         (long long)MDS_ATTR_MTIME_SET);
248         LASSERTF(MDS_ATTR_FORCE == 0x0000000000000200ULL, "found 0x%.16llxULL\n",
249                         (long long)MDS_ATTR_FORCE);
250         LASSERTF(MDS_ATTR_ATTR_FLAG == 0x0000000000000400ULL, "found 0x%.16llxULL\n",
251                         (long long)MDS_ATTR_ATTR_FLAG);
252         LASSERTF(MDS_ATTR_KILL_SUID == 0x0000000000000800ULL, "found 0x%.16llxULL\n",
253                         (long long)MDS_ATTR_KILL_SUID);
254         LASSERTF(MDS_ATTR_KILL_SGID == 0x0000000000001000ULL, "found 0x%.16llxULL\n",
255                         (long long)MDS_ATTR_KILL_SGID);
256         LASSERTF(MDS_ATTR_CTIME_SET == 0x0000000000002000ULL, "found 0x%.16llxULL\n",
257                         (long long)MDS_ATTR_CTIME_SET);
258         LASSERTF(MDS_ATTR_FROM_OPEN == 0x0000000000004000ULL, "found 0x%.16llxULL\n",
259                         (long long)MDS_ATTR_FROM_OPEN);
260         LASSERTF(MDS_ATTR_BLOCKS == 0x0000000000008000ULL, "found 0x%.16llxULL\n",
261                         (long long)MDS_ATTR_BLOCKS);
262         LASSERTF(MDS_ATTR_PROJID == 0x0000000000010000ULL, "found 0x%.16llxULL\n",
263                         (long long)MDS_ATTR_PROJID);
264         LASSERTF(MDS_ATTR_LSIZE == 0x0000000000020000ULL, "found 0x%.16llxULL\n",
265                         (long long)MDS_ATTR_LSIZE);
266         LASSERTF(MDS_ATTR_LBLOCKS == 0x0000000000040000ULL, "found 0x%.16llxULL\n",
267                         (long long)MDS_ATTR_LBLOCKS);
268         LASSERTF(MDS_ATTR_OVERRIDE == 0x0000000002000000ULL, "found 0x%.16llxULL\n",
269                         (long long)MDS_ATTR_OVERRIDE);
270         LASSERTF(FLD_QUERY == 900, "found %lld\n",
271                  (long long)FLD_QUERY);
272         LASSERTF(FLD_READ == 901, "found %lld\n",
273                  (long long)FLD_READ);
274         LASSERTF(FLD_FIRST_OPC == 900, "found %lld\n",
275                  (long long)FLD_FIRST_OPC);
276         LASSERTF(FLD_LAST_OPC == 902, "found %lld\n",
277                  (long long)FLD_LAST_OPC);
278         LASSERTF(SEQ_QUERY == 700, "found %lld\n",
279                  (long long)SEQ_QUERY);
280         LASSERTF(SEQ_FIRST_OPC == 700, "found %lld\n",
281                  (long long)SEQ_FIRST_OPC);
282         LASSERTF(SEQ_LAST_OPC == 701, "found %lld\n",
283                  (long long)SEQ_LAST_OPC);
284         LASSERTF(LFSCK_NOTIFY == 1101, "found %lld\n",
285                  (long long)LFSCK_NOTIFY);
286         LASSERTF(LFSCK_QUERY == 1102, "found %lld\n",
287                  (long long)LFSCK_QUERY);
288         LASSERTF(LFSCK_FIRST_OPC == 1101, "found %lld\n",
289                  (long long)LFSCK_FIRST_OPC);
290         LASSERTF(LFSCK_LAST_OPC == 1103, "found %lld\n",
291                  (long long)LFSCK_LAST_OPC);
292         LASSERTF(SEQ_ALLOC_SUPER == 0, "found %lld\n",
293                  (long long)SEQ_ALLOC_SUPER);
294         LASSERTF(SEQ_ALLOC_META == 1, "found %lld\n",
295                  (long long)SEQ_ALLOC_META);
296         LASSERTF(LDLM_ENQUEUE == 101, "found %lld\n",
297                  (long long)LDLM_ENQUEUE);
298         LASSERTF(LDLM_CONVERT == 102, "found %lld\n",
299                  (long long)LDLM_CONVERT);
300         LASSERTF(LDLM_CANCEL == 103, "found %lld\n",
301                  (long long)LDLM_CANCEL);
302         LASSERTF(LDLM_BL_CALLBACK == 104, "found %lld\n",
303                  (long long)LDLM_BL_CALLBACK);
304         LASSERTF(LDLM_CP_CALLBACK == 105, "found %lld\n",
305                  (long long)LDLM_CP_CALLBACK);
306         LASSERTF(LDLM_GL_CALLBACK == 106, "found %lld\n",
307                  (long long)LDLM_GL_CALLBACK);
308         LASSERTF(LDLM_SET_INFO == 107, "found %lld\n",
309                  (long long)LDLM_SET_INFO);
310         LASSERTF(LDLM_LAST_OPC == 108, "found %lld\n",
311                  (long long)LDLM_LAST_OPC);
312         LASSERTF(LCK_MINMODE == 0, "found %lld\n",
313                  (long long)LCK_MINMODE);
314         LASSERTF(LCK_EX == 1, "found %lld\n",
315                  (long long)LCK_EX);
316         LASSERTF(LCK_PW == 2, "found %lld\n",
317                  (long long)LCK_PW);
318         LASSERTF(LCK_PR == 4, "found %lld\n",
319                  (long long)LCK_PR);
320         LASSERTF(LCK_CW == 8, "found %lld\n",
321                  (long long)LCK_CW);
322         LASSERTF(LCK_CR == 16, "found %lld\n",
323                  (long long)LCK_CR);
324         LASSERTF(LCK_NL == 32, "found %lld\n",
325                  (long long)LCK_NL);
326         LASSERTF(LCK_GROUP == 64, "found %lld\n",
327                  (long long)LCK_GROUP);
328         LASSERTF(LCK_COS == 128, "found %lld\n",
329                  (long long)LCK_COS);
330         LASSERTF(LCK_MAXMODE == 129, "found %lld\n",
331                  (long long)LCK_MAXMODE);
332         LASSERTF(LCK_MODE_NUM == 8, "found %lld\n",
333                  (long long)LCK_MODE_NUM);
334         BUILD_BUG_ON(LDLM_PLAIN != 10);
335         BUILD_BUG_ON(LDLM_EXTENT != 11);
336         BUILD_BUG_ON(LDLM_FLOCK != 12);
337         BUILD_BUG_ON(LDLM_IBITS != 13);
338         BUILD_BUG_ON(LDLM_MAX_TYPE != 14);
339         BUILD_BUG_ON(LUSTRE_RES_ID_SEQ_OFF != 0);
340         BUILD_BUG_ON(LUSTRE_RES_ID_VER_OID_OFF != 1);
341         LASSERTF(OUT_UPDATE == 1000, "found %lld\n",
342                  (long long)OUT_UPDATE);
343         LASSERTF(OUT_UPDATE_LAST_OPC == 1001, "found %lld\n",
344                  (long long)OUT_UPDATE_LAST_OPC);
345         BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_SEQ_OFF != 2);
346         BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_VER_OID_OFF != 3);
347         BUILD_BUG_ON(LUSTRE_RES_ID_HSH_OFF != 3);
348         BUILD_BUG_ON(LQUOTA_TYPE_USR != 0);
349         BUILD_BUG_ON(LQUOTA_TYPE_GRP != 1);
350         BUILD_BUG_ON(LQUOTA_RES_MD != 1);
351         BUILD_BUG_ON(LQUOTA_RES_DT != 2);
352         LASSERTF(OBD_PING == 400, "found %lld\n",
353                  (long long)OBD_PING);
354         LASSERTF(OBD_IDX_READ == 403, "found %lld\n",
355                  (long long)OBD_IDX_READ);
356         LASSERTF(OBD_LAST_OPC == 404, "found %lld\n",
357                  (long long)OBD_LAST_OPC);
358         LASSERTF(QUOTA_DQACQ == 601, "found %lld\n",
359                  (long long)QUOTA_DQACQ);
360         LASSERTF(QUOTA_DQREL == 602, "found %lld\n",
361                  (long long)QUOTA_DQREL);
362         LASSERTF(QUOTA_LAST_OPC == 603, "found %lld\n",
363                  (long long)QUOTA_LAST_OPC);
364         LASSERTF(MGS_CONNECT == 250, "found %lld\n",
365                  (long long)MGS_CONNECT);
366         LASSERTF(MGS_DISCONNECT == 251, "found %lld\n",
367                  (long long)MGS_DISCONNECT);
368         LASSERTF(MGS_EXCEPTION == 252, "found %lld\n",
369                  (long long)MGS_EXCEPTION);
370         LASSERTF(MGS_TARGET_REG == 253, "found %lld\n",
371                  (long long)MGS_TARGET_REG);
372         LASSERTF(MGS_TARGET_DEL == 254, "found %lld\n",
373                  (long long)MGS_TARGET_DEL);
374         LASSERTF(MGS_SET_INFO == 255, "found %lld\n",
375                  (long long)MGS_SET_INFO);
376         LASSERTF(MGS_CONFIG_READ == 256, "found %lld\n",
377                  (long long)MGS_CONFIG_READ);
378         LASSERTF(MGS_LAST_OPC == 257, "found %lld\n",
379                  (long long)MGS_LAST_OPC);
380         LASSERTF(SEC_CTX_INIT == 801, "found %lld\n",
381                  (long long)SEC_CTX_INIT);
382         LASSERTF(SEC_CTX_INIT_CONT == 802, "found %lld\n",
383                  (long long)SEC_CTX_INIT_CONT);
384         LASSERTF(SEC_CTX_FINI == 803, "found %lld\n",
385                  (long long)SEC_CTX_FINI);
386         LASSERTF(SEC_LAST_OPC == 804, "found %lld\n",
387                  (long long)SEC_LAST_OPC);
388         /* Sizes and Offsets */
389
390         /* Checks for struct obd_uuid */
391         LASSERTF((int)sizeof(struct obd_uuid) == 40, "found %lld\n",
392                  (long long)(int)sizeof(struct obd_uuid));
393
394         /* Checks for struct lu_seq_range */
395         LASSERTF((int)sizeof(struct lu_seq_range) == 24, "found %lld\n",
396                  (long long)(int)sizeof(struct lu_seq_range));
397         LASSERTF((int)offsetof(struct lu_seq_range, lsr_start) == 0, "found %lld\n",
398                  (long long)(int)offsetof(struct lu_seq_range, lsr_start));
399         LASSERTF((int)sizeof(((struct lu_seq_range *)0)->lsr_start) == 8, "found %lld\n",
400                  (long long)(int)sizeof(((struct lu_seq_range *)0)->lsr_start));
401         LASSERTF((int)offsetof(struct lu_seq_range, lsr_end) == 8, "found %lld\n",
402                  (long long)(int)offsetof(struct lu_seq_range, lsr_end));
403         LASSERTF((int)sizeof(((struct lu_seq_range *)0)->lsr_end) == 8, "found %lld\n",
404                  (long long)(int)sizeof(((struct lu_seq_range *)0)->lsr_end));
405         LASSERTF((int)offsetof(struct lu_seq_range, lsr_index) == 16, "found %lld\n",
406                  (long long)(int)offsetof(struct lu_seq_range, lsr_index));
407         LASSERTF((int)sizeof(((struct lu_seq_range *)0)->lsr_index) == 4, "found %lld\n",
408                  (long long)(int)sizeof(((struct lu_seq_range *)0)->lsr_index));
409         LASSERTF((int)offsetof(struct lu_seq_range, lsr_flags) == 20, "found %lld\n",
410                  (long long)(int)offsetof(struct lu_seq_range, lsr_flags));
411         LASSERTF((int)sizeof(((struct lu_seq_range *)0)->lsr_flags) == 4, "found %lld\n",
412                  (long long)(int)sizeof(((struct lu_seq_range *)0)->lsr_flags));
413         LASSERTF(LU_SEQ_RANGE_MDT == 0, "found %lld\n",
414                  (long long)LU_SEQ_RANGE_MDT);
415         LASSERTF(LU_SEQ_RANGE_OST == 1, "found %lld\n",
416                  (long long)LU_SEQ_RANGE_OST);
417
418         /* Checks for struct lustre_mdt_attrs */
419         LASSERTF((int)sizeof(struct lustre_mdt_attrs) == 24, "found %lld\n",
420                  (long long)(int)sizeof(struct lustre_mdt_attrs));
421         LASSERTF((int)offsetof(struct lustre_mdt_attrs, lma_compat) == 0, "found %lld\n",
422                  (long long)(int)offsetof(struct lustre_mdt_attrs, lma_compat));
423         LASSERTF((int)sizeof(((struct lustre_mdt_attrs *)0)->lma_compat) == 4, "found %lld\n",
424                  (long long)(int)sizeof(((struct lustre_mdt_attrs *)0)->lma_compat));
425         LASSERTF((int)offsetof(struct lustre_mdt_attrs, lma_incompat) == 4, "found %lld\n",
426                  (long long)(int)offsetof(struct lustre_mdt_attrs, lma_incompat));
427         LASSERTF((int)sizeof(((struct lustre_mdt_attrs *)0)->lma_incompat) == 4, "found %lld\n",
428                  (long long)(int)sizeof(((struct lustre_mdt_attrs *)0)->lma_incompat));
429         LASSERTF((int)offsetof(struct lustre_mdt_attrs, lma_self_fid) == 8, "found %lld\n",
430                  (long long)(int)offsetof(struct lustre_mdt_attrs, lma_self_fid));
431         LASSERTF((int)sizeof(((struct lustre_mdt_attrs *)0)->lma_self_fid) == 16, "found %lld\n",
432                  (long long)(int)sizeof(((struct lustre_mdt_attrs *)0)->lma_self_fid));
433         LASSERTF(LMAC_HSM == 0x00000001UL, "found 0x%.8xUL\n",
434                 (unsigned)LMAC_HSM);
435         LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n",
436                 (unsigned)LMAC_NOT_IN_OI);
437         LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n",
438                 (unsigned)LMAC_FID_ON_OST);
439         LASSERTF(LMAC_STRIPE_INFO == 0x00000010UL, "found 0x%.8xUL\n",
440                 (unsigned)LMAC_STRIPE_INFO);
441         LASSERTF(LMAC_COMP_INFO == 0x00000020UL, "found 0x%.8xUL\n",
442                 (unsigned)LMAC_COMP_INFO);
443         LASSERTF(LMAC_IDX_BACKUP == 0x00000040UL, "found 0x%.8xUL\n",
444                 (unsigned)LMAC_IDX_BACKUP);
445         LASSERTF(LMAI_RELEASED == 0x00000001UL, "found 0x%.8xUL\n",
446                 (unsigned)LMAI_RELEASED);
447         LASSERTF(LMAI_AGENT == 0x00000002UL, "found 0x%.8xUL\n",
448                 (unsigned)LMAI_AGENT);
449         LASSERTF(LMAI_REMOTE_PARENT == 0x00000004UL, "found 0x%.8xUL\n",
450                 (unsigned)LMAI_REMOTE_PARENT);
451         LASSERTF(LMAI_STRIPED == 0x00000008UL, "found 0x%.8xUL\n",
452                 (unsigned)LMAI_STRIPED);
453         LASSERTF(LMAI_ORPHAN == 0x00000010UL, "found 0x%.8xUL\n",
454                 (unsigned)LMAI_ORPHAN);
455         LASSERTF(LMAI_ENCRYPT == 0x00000020UL, "found 0x%.8xUL\n",
456                 (unsigned)LMAI_ENCRYPT);
457
458         /* Checks for struct lustre_ost_attrs */
459         LASSERTF((int)sizeof(struct lustre_ost_attrs) == 64, "found %lld\n",
460                  (long long)(int)sizeof(struct lustre_ost_attrs));
461         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_lma) == 0, "found %lld\n",
462                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_lma));
463         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_lma) == 24, "found %lld\n",
464                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_lma));
465         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_parent_fid) == 24, "found %lld\n",
466                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_parent_fid));
467         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_parent_fid) == 16, "found %lld\n",
468                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_parent_fid));
469         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_stripe_size) == 40, "found %lld\n",
470                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_stripe_size));
471         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_stripe_size) == 4, "found %lld\n",
472                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_stripe_size));
473         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_id) == 44, "found %lld\n",
474                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_id));
475         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_id) == 4, "found %lld\n",
476                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_id));
477         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_start) == 48, "found %lld\n",
478                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_start));
479         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_start) == 8, "found %lld\n",
480                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_start));
481         LASSERTF((int)offsetof(struct lustre_ost_attrs, loa_comp_end) == 56, "found %lld\n",
482                  (long long)(int)offsetof(struct lustre_ost_attrs, loa_comp_end));
483         LASSERTF((int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_end) == 8, "found %lld\n",
484                  (long long)(int)sizeof(((struct lustre_ost_attrs *)0)->loa_comp_end));
485         LASSERTF(OUT_CREATE == 1, "found %lld\n",
486                  (long long)OUT_CREATE);
487         LASSERTF(OUT_DESTROY == 2, "found %lld\n",
488                  (long long)OUT_DESTROY);
489         LASSERTF(OUT_REF_ADD == 3, "found %lld\n",
490                  (long long)OUT_REF_ADD);
491         LASSERTF(OUT_REF_DEL == 4, "found %lld\n",
492                  (long long)OUT_REF_DEL);
493         LASSERTF(OUT_ATTR_SET == 5, "found %lld\n",
494                  (long long)OUT_ATTR_SET);
495         LASSERTF(OUT_ATTR_GET == 6, "found %lld\n",
496                  (long long)OUT_ATTR_GET);
497         LASSERTF(OUT_XATTR_SET == 7, "found %lld\n",
498                  (long long)OUT_XATTR_SET);
499         LASSERTF(OUT_XATTR_GET == 8, "found %lld\n",
500                  (long long)OUT_XATTR_GET);
501         LASSERTF(OUT_INDEX_LOOKUP == 9, "found %lld\n",
502                  (long long)OUT_INDEX_LOOKUP);
503         LASSERTF(OUT_INDEX_LOOKUP == 9, "found %lld\n",
504                  (long long)OUT_INDEX_LOOKUP);
505         LASSERTF(OUT_INDEX_INSERT == 10, "found %lld\n",
506                  (long long)OUT_INDEX_INSERT);
507         LASSERTF(OUT_INDEX_DELETE == 11, "found %lld\n",
508                  (long long)OUT_INDEX_DELETE);
509         LASSERTF(OUT_WRITE == 12, "found %lld\n",
510                  (long long)OUT_WRITE);
511         LASSERTF(OUT_XATTR_DEL == 13, "found %lld\n",
512                  (long long)OUT_XATTR_DEL);
513         LASSERTF(OUT_PUNCH == 14, "found %lld\n",
514                  (long long)OUT_PUNCH);
515         LASSERTF(OUT_READ == 15, "found %lld\n",
516                  (long long)OUT_READ);
517         LASSERTF(OUT_NOOP == 16, "found %lld\n",
518                  (long long)OUT_NOOP);
519         LASSERTF(OUT_XATTR_LIST == 17, "found %lld\n",
520                  (long long)OUT_XATTR_LIST);
521
522         /* Checks for struct lustre_som_attrs */
523         LASSERTF((int)sizeof(struct lustre_som_attrs) == 24, "found %lld\n",
524                  (long long)(int)sizeof(struct lustre_som_attrs));
525         LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_valid) == 0, "found %lld\n",
526                  (long long)(int)offsetof(struct lustre_som_attrs, lsa_valid));
527         LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_valid) == 2, "found %lld\n",
528                  (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_valid));
529         LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_reserved) == 2, "found %lld\n",
530                  (long long)(int)offsetof(struct lustre_som_attrs, lsa_reserved));
531         LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_reserved) == 6, "found %lld\n",
532                  (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_reserved));
533         LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_size) == 8, "found %lld\n",
534                  (long long)(int)offsetof(struct lustre_som_attrs, lsa_size));
535         LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_size) == 8, "found %lld\n",
536                  (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_size));
537         LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_blocks) == 16, "found %lld\n",
538                  (long long)(int)offsetof(struct lustre_som_attrs, lsa_blocks));
539         LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_blocks) == 8, "found %lld\n",
540                  (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_blocks));
541
542         /* Checks for struct hsm_attrs */
543         LASSERTF((int)sizeof(struct hsm_attrs) == 24, "found %lld\n",
544                  (long long)(int)sizeof(struct hsm_attrs));
545         LASSERTF((int)offsetof(struct hsm_attrs, hsm_compat) == 0, "found %lld\n",
546                  (long long)(int)offsetof(struct hsm_attrs, hsm_compat));
547         LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_compat) == 4, "found %lld\n",
548                  (long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_compat));
549         LASSERTF((int)offsetof(struct hsm_attrs, hsm_flags) == 4, "found %lld\n",
550                  (long long)(int)offsetof(struct hsm_attrs, hsm_flags));
551         LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_flags) == 4, "found %lld\n",
552                  (long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_flags));
553         LASSERTF((int)offsetof(struct hsm_attrs, hsm_arch_id) == 8, "found %lld\n",
554                  (long long)(int)offsetof(struct hsm_attrs, hsm_arch_id));
555         LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_arch_id) == 8, "found %lld\n",
556                  (long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_arch_id));
557         LASSERTF((int)offsetof(struct hsm_attrs, hsm_arch_ver) == 16, "found %lld\n",
558                  (long long)(int)offsetof(struct hsm_attrs, hsm_arch_ver));
559         LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver) == 8, "found %lld\n",
560                  (long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver));
561
562         /* Checks for struct ost_id */
563         LASSERTF((int)sizeof(struct ost_id) == 16, "found %lld\n",
564                  (long long)(int)sizeof(struct ost_id));
565         LASSERTF((int)offsetof(struct ost_id, oi) == 0, "found %lld\n",
566                  (long long)(int)offsetof(struct ost_id, oi));
567         LASSERTF((int)sizeof(((struct ost_id *)0)->oi) == 16, "found %lld\n",
568                  (long long)(int)sizeof(((struct ost_id *)0)->oi));
569         LASSERTF(LUSTRE_FID_INIT_OID == 1, "found %lld\n",
570                  (long long)LUSTRE_FID_INIT_OID);
571         LASSERTF(FID_SEQ_OST_MDT0 == 0, "found %lld\n",
572                  (long long)FID_SEQ_OST_MDT0);
573         LASSERTF(FID_SEQ_LLOG == 1, "found %lld\n",
574                  (long long)FID_SEQ_LLOG);
575         LASSERTF(FID_SEQ_ECHO == 2, "found %lld\n",
576                  (long long)FID_SEQ_ECHO);
577         LASSERTF(FID_SEQ_UNUSED_START == 3, "found %lld\n",
578                  (long long)FID_SEQ_UNUSED_START);
579         LASSERTF(FID_SEQ_UNUSED_END == 9, "found %lld\n",
580                  (long long)FID_SEQ_UNUSED_END);
581         LASSERTF(FID_SEQ_LLOG_NAME == 10, "found %lld\n",
582                  (long long)FID_SEQ_LLOG_NAME);
583         LASSERTF(FID_SEQ_RSVD == 11, "found %lld\n",
584                  (long long)FID_SEQ_RSVD);
585         LASSERTF(FID_SEQ_IGIF == 12, "found %lld\n",
586                  (long long)FID_SEQ_IGIF);
587         LASSERTF(FID_SEQ_IGIF_MAX == 0x00000000ffffffffULL, "found 0x%.16llxULL\n",
588                         (long long)FID_SEQ_IGIF_MAX);
589         LASSERTF(FID_SEQ_IDIF == 0x0000000100000000ULL, "found 0x%.16llxULL\n",
590                         (long long)FID_SEQ_IDIF);
591         LASSERTF(FID_SEQ_IDIF_MAX == 0x00000001ffffffffULL, "found 0x%.16llxULL\n",
592                         (long long)FID_SEQ_IDIF_MAX);
593         LASSERTF(FID_SEQ_START == 0x0000000200000000ULL, "found 0x%.16llxULL\n",
594                         (long long)FID_SEQ_START);
595         LASSERTF(FID_SEQ_LOCAL_FILE == 0x0000000200000001ULL, "found 0x%.16llxULL\n",
596                         (long long)FID_SEQ_LOCAL_FILE);
597         LASSERTF(FID_SEQ_DOT_LUSTRE == 0x0000000200000002ULL, "found 0x%.16llxULL\n",
598                         (long long)FID_SEQ_DOT_LUSTRE);
599         LASSERTF(FID_SEQ_LOCAL_NAME == 0x0000000200000003ULL, "found 0x%.16llxULL\n",
600                         (long long)FID_SEQ_LOCAL_NAME);
601         LASSERTF(FID_SEQ_SPECIAL == 0x0000000200000004ULL, "found 0x%.16llxULL\n",
602                         (long long)FID_SEQ_SPECIAL);
603         LASSERTF(FID_SEQ_QUOTA == 0x0000000200000005ULL, "found 0x%.16llxULL\n",
604                         (long long)FID_SEQ_QUOTA);
605         LASSERTF(FID_SEQ_QUOTA_GLB == 0x0000000200000006ULL, "found 0x%.16llxULL\n",
606                         (long long)FID_SEQ_QUOTA_GLB);
607         LASSERTF(FID_SEQ_ROOT == 0x0000000200000007ULL, "found 0x%.16llxULL\n",
608                         (long long)FID_SEQ_ROOT);
609         LASSERTF(FID_SEQ_LAYOUT_RBTREE == 0x0000000200000008ULL, "found 0x%.16llxULL\n",
610                         (long long)FID_SEQ_LAYOUT_RBTREE);
611         LASSERTF(FID_SEQ_UPDATE_LOG == 0x0000000200000009ULL, "found 0x%.16llxULL\n",
612                         (long long)FID_SEQ_UPDATE_LOG);
613         LASSERTF(FID_SEQ_UPDATE_LOG_DIR == 0x000000020000000aULL, "found 0x%.16llxULL\n",
614                         (long long)FID_SEQ_UPDATE_LOG_DIR);
615         LASSERTF(FID_SEQ_NORMAL == 0x0000000200000400ULL, "found 0x%.16llxULL\n",
616                         (long long)FID_SEQ_NORMAL);
617         LASSERTF(FID_SEQ_LOV_DEFAULT == 0xffffffffffffffffULL, "found 0x%.16llxULL\n",
618                         (long long)FID_SEQ_LOV_DEFAULT);
619         LASSERTF(FID_OID_SPECIAL_BFL == 0x00000001UL, "found 0x%.8xUL\n",
620                 (unsigned)FID_OID_SPECIAL_BFL);
621         LASSERTF(FID_OID_DOT_LUSTRE == 0x00000001UL, "found 0x%.8xUL\n",
622                 (unsigned)FID_OID_DOT_LUSTRE);
623         LASSERTF(FID_OID_DOT_LUSTRE_OBF == 0x00000002UL, "found 0x%.8xUL\n",
624                 (unsigned)FID_OID_DOT_LUSTRE_OBF);
625         LASSERTF(FID_OID_DOT_LUSTRE_LPF == 0x00000003UL, "found 0x%.8xUL\n",
626                 (unsigned)FID_OID_DOT_LUSTRE_LPF);
627
628         /* Checks for struct lu_dirent */
629         LASSERTF((int)sizeof(struct lu_dirent) == 32, "found %lld\n",
630                  (long long)(int)sizeof(struct lu_dirent));
631         LASSERTF((int)offsetof(struct lu_dirent, lde_fid) == 0, "found %lld\n",
632                  (long long)(int)offsetof(struct lu_dirent, lde_fid));
633         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_fid) == 16, "found %lld\n",
634                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_fid));
635         LASSERTF((int)offsetof(struct lu_dirent, lde_hash) == 16, "found %lld\n",
636                  (long long)(int)offsetof(struct lu_dirent, lde_hash));
637         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_hash) == 8, "found %lld\n",
638                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_hash));
639         LASSERTF((int)offsetof(struct lu_dirent, lde_reclen) == 24, "found %lld\n",
640                  (long long)(int)offsetof(struct lu_dirent, lde_reclen));
641         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_reclen) == 2, "found %lld\n",
642                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_reclen));
643         LASSERTF((int)offsetof(struct lu_dirent, lde_namelen) == 26, "found %lld\n",
644                  (long long)(int)offsetof(struct lu_dirent, lde_namelen));
645         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_namelen) == 2, "found %lld\n",
646                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_namelen));
647         LASSERTF((int)offsetof(struct lu_dirent, lde_attrs) == 28, "found %lld\n",
648                  (long long)(int)offsetof(struct lu_dirent, lde_attrs));
649         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_attrs) == 4, "found %lld\n",
650                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_attrs));
651         LASSERTF((int)offsetof(struct lu_dirent, lde_name[0]) == 32, "found %lld\n",
652                  (long long)(int)offsetof(struct lu_dirent, lde_name[0]));
653         LASSERTF((int)sizeof(((struct lu_dirent *)0)->lde_name[0]) == 1, "found %lld\n",
654                  (long long)(int)sizeof(((struct lu_dirent *)0)->lde_name[0]));
655         LASSERTF(LUDA_FID == 0x00000001UL, "found 0x%.8xUL\n",
656                 (unsigned)LUDA_FID);
657         LASSERTF(LUDA_TYPE == 0x00000002UL, "found 0x%.8xUL\n",
658                 (unsigned)LUDA_TYPE);
659         LASSERTF(LUDA_64BITHASH == 0x00000004UL, "found 0x%.8xUL\n",
660                 (unsigned)LUDA_64BITHASH);
661
662         /* Checks for struct luda_type */
663         LASSERTF((int)sizeof(struct luda_type) == 2, "found %lld\n",
664                  (long long)(int)sizeof(struct luda_type));
665         LASSERTF((int)offsetof(struct luda_type, lt_type) == 0, "found %lld\n",
666                  (long long)(int)offsetof(struct luda_type, lt_type));
667         LASSERTF((int)sizeof(((struct luda_type *)0)->lt_type) == 2, "found %lld\n",
668                  (long long)(int)sizeof(((struct luda_type *)0)->lt_type));
669
670         /* Checks for struct lu_dirpage */
671         LASSERTF((int)sizeof(struct lu_dirpage) == 24, "found %lld\n",
672                  (long long)(int)sizeof(struct lu_dirpage));
673         LASSERTF((int)offsetof(struct lu_dirpage, ldp_hash_start) == 0, "found %lld\n",
674                  (long long)(int)offsetof(struct lu_dirpage, ldp_hash_start));
675         LASSERTF((int)sizeof(((struct lu_dirpage *)0)->ldp_hash_start) == 8, "found %lld\n",
676                  (long long)(int)sizeof(((struct lu_dirpage *)0)->ldp_hash_start));
677         LASSERTF((int)offsetof(struct lu_dirpage, ldp_hash_end) == 8, "found %lld\n",
678                  (long long)(int)offsetof(struct lu_dirpage, ldp_hash_end));
679         LASSERTF((int)sizeof(((struct lu_dirpage *)0)->ldp_hash_end) == 8, "found %lld\n",
680                  (long long)(int)sizeof(((struct lu_dirpage *)0)->ldp_hash_end));
681         LASSERTF((int)offsetof(struct lu_dirpage, ldp_flags) == 16, "found %lld\n",
682                  (long long)(int)offsetof(struct lu_dirpage, ldp_flags));
683         LASSERTF((int)sizeof(((struct lu_dirpage *)0)->ldp_flags) == 4, "found %lld\n",
684                  (long long)(int)sizeof(((struct lu_dirpage *)0)->ldp_flags));
685         LASSERTF((int)offsetof(struct lu_dirpage, ldp_pad0) == 20, "found %lld\n",
686                  (long long)(int)offsetof(struct lu_dirpage, ldp_pad0));
687         LASSERTF((int)sizeof(((struct lu_dirpage *)0)->ldp_pad0) == 4, "found %lld\n",
688                  (long long)(int)sizeof(((struct lu_dirpage *)0)->ldp_pad0));
689         LASSERTF((int)offsetof(struct lu_dirpage, ldp_entries[0]) == 24, "found %lld\n",
690                  (long long)(int)offsetof(struct lu_dirpage, ldp_entries[0]));
691         LASSERTF((int)sizeof(((struct lu_dirpage *)0)->ldp_entries[0]) == 32, "found %lld\n",
692                  (long long)(int)sizeof(((struct lu_dirpage *)0)->ldp_entries[0]));
693         LASSERTF(LDF_EMPTY == 1, "found %lld\n",
694                  (long long)LDF_EMPTY);
695         LASSERTF(LDF_COLLIDE == 2, "found %lld\n",
696                  (long long)LDF_COLLIDE);
697         LASSERTF(LU_PAGE_SIZE == 4096, "found %lld\n",
698                  (long long)LU_PAGE_SIZE);
699         /* Checks for union lu_page */
700         LASSERTF((int)sizeof(union lu_page) == 4096, "found %lld\n",
701                  (long long)(int)sizeof(union lu_page));
702
703         /* Checks for struct lu_ladvise */
704         LASSERTF((int)sizeof(struct lu_ladvise) == 32, "found %lld\n",
705                  (long long)(int)sizeof(struct lu_ladvise));
706         LASSERTF((int)offsetof(struct lu_ladvise, lla_advice) == 0, "found %lld\n",
707                  (long long)(int)offsetof(struct lu_ladvise, lla_advice));
708         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_advice) == 2, "found %lld\n",
709                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_advice));
710         LASSERTF((int)offsetof(struct lu_ladvise, lla_value1) == 2, "found %lld\n",
711                  (long long)(int)offsetof(struct lu_ladvise, lla_value1));
712         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value1) == 2, "found %lld\n",
713                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value1));
714         LASSERTF((int)offsetof(struct lu_ladvise, lla_value2) == 4, "found %lld\n",
715                  (long long)(int)offsetof(struct lu_ladvise, lla_value2));
716         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value2) == 4, "found %lld\n",
717                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value2));
718         LASSERTF((int)offsetof(struct lu_ladvise, lla_start) == 8, "found %lld\n",
719                  (long long)(int)offsetof(struct lu_ladvise, lla_start));
720         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_start) == 8, "found %lld\n",
721                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_start));
722         LASSERTF((int)offsetof(struct lu_ladvise, lla_end) == 16, "found %lld\n",
723                  (long long)(int)offsetof(struct lu_ladvise, lla_end));
724         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_end) == 8, "found %lld\n",
725                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_end));
726         LASSERTF((int)offsetof(struct lu_ladvise, lla_value3) == 24, "found %lld\n",
727                  (long long)(int)offsetof(struct lu_ladvise, lla_value3));
728         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value3) == 4, "found %lld\n",
729                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value3));
730         LASSERTF((int)offsetof(struct lu_ladvise, lla_value4) == 28, "found %lld\n",
731                  (long long)(int)offsetof(struct lu_ladvise, lla_value4));
732         LASSERTF((int)sizeof(((struct lu_ladvise *)0)->lla_value4) == 4, "found %lld\n",
733                  (long long)(int)sizeof(((struct lu_ladvise *)0)->lla_value4));
734         LASSERTF(LU_LADVISE_WILLREAD == 1, "found %lld\n",
735                  (long long)LU_LADVISE_WILLREAD);
736         LASSERTF(LU_LADVISE_DONTNEED == 2, "found %lld\n",
737                  (long long)LU_LADVISE_DONTNEED);
738         LASSERTF(LU_LADVISE_LOCKNOEXPAND == 3, "found %lld\n",
739                  (long long)LU_LADVISE_LOCKNOEXPAND);
740         LASSERTF(LU_LADVISE_LOCKAHEAD == 4, "found %lld\n",
741                  (long long)LU_LADVISE_LOCKAHEAD);
742
743         /* Checks for struct ladvise_hdr */
744         LASSERTF((int)sizeof(struct ladvise_hdr) == 32, "found %lld\n",
745                  (long long)(int)sizeof(struct ladvise_hdr));
746         LASSERTF((int)offsetof(struct ladvise_hdr, lah_magic) == 0, "found %lld\n",
747                  (long long)(int)offsetof(struct ladvise_hdr, lah_magic));
748         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_magic) == 4, "found %lld\n",
749                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_magic));
750         LASSERTF((int)offsetof(struct ladvise_hdr, lah_count) == 4, "found %lld\n",
751                  (long long)(int)offsetof(struct ladvise_hdr, lah_count));
752         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_count) == 4, "found %lld\n",
753                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_count));
754         LASSERTF((int)offsetof(struct ladvise_hdr, lah_flags) == 8, "found %lld\n",
755                  (long long)(int)offsetof(struct ladvise_hdr, lah_flags));
756         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_flags) == 8, "found %lld\n",
757                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_flags));
758         LASSERTF((int)offsetof(struct ladvise_hdr, lah_value1) == 16, "found %lld\n",
759                  (long long)(int)offsetof(struct ladvise_hdr, lah_value1));
760         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value1) == 4, "found %lld\n",
761                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value1));
762         LASSERTF((int)offsetof(struct ladvise_hdr, lah_value2) == 20, "found %lld\n",
763                  (long long)(int)offsetof(struct ladvise_hdr, lah_value2));
764         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value2) == 4, "found %lld\n",
765                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value2));
766         LASSERTF((int)offsetof(struct ladvise_hdr, lah_value3) == 24, "found %lld\n",
767                  (long long)(int)offsetof(struct ladvise_hdr, lah_value3));
768         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_value3) == 8, "found %lld\n",
769                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_value3));
770         LASSERTF((int)offsetof(struct ladvise_hdr, lah_advise) == 32, "found %lld\n",
771                  (long long)(int)offsetof(struct ladvise_hdr, lah_advise));
772         LASSERTF((int)sizeof(((struct ladvise_hdr *)0)->lah_advise) == 0, "found %lld\n",
773                  (long long)(int)sizeof(((struct ladvise_hdr *)0)->lah_advise));
774         BUILD_BUG_ON(LF_ASYNC != 0x00000001);
775         BUILD_BUG_ON(LF_UNSET != 0x00000002);
776         BUILD_BUG_ON(LADVISE_MAGIC != 0x1adf1ce0);
777
778         /* Checks for struct lustre_handle */
779         LASSERTF((int)sizeof(struct lustre_handle) == 8, "found %lld\n",
780                  (long long)(int)sizeof(struct lustre_handle));
781         LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, "found %lld\n",
782                  (long long)(int)offsetof(struct lustre_handle, cookie));
783         LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, "found %lld\n",
784                  (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
785
786         /* Checks for struct lustre_msg_v2 */
787         LASSERTF((int)sizeof(struct lustre_msg_v2) == 32, "found %lld\n",
788                  (long long)(int)sizeof(struct lustre_msg_v2));
789         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_bufcount) == 0, "found %lld\n",
790                  (long long)(int)offsetof(struct lustre_msg_v2, lm_bufcount));
791         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount) == 4, "found %lld\n",
792                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount));
793         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_secflvr) == 4, "found %lld\n",
794                  (long long)(int)offsetof(struct lustre_msg_v2, lm_secflvr));
795         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr) == 4, "found %lld\n",
796                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr));
797         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_magic) == 8, "found %lld\n",
798                  (long long)(int)offsetof(struct lustre_msg_v2, lm_magic));
799         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic) == 4, "found %lld\n",
800                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic));
801         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_repsize) == 12, "found %lld\n",
802                  (long long)(int)offsetof(struct lustre_msg_v2, lm_repsize));
803         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize) == 4, "found %lld\n",
804                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize));
805         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_cksum) == 16, "found %lld\n",
806                  (long long)(int)offsetof(struct lustre_msg_v2, lm_cksum));
807         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum) == 4, "found %lld\n",
808                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum));
809         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_flags) == 20, "found %lld\n",
810                  (long long)(int)offsetof(struct lustre_msg_v2, lm_flags));
811         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags) == 4, "found %lld\n",
812                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags));
813         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_2) == 24, "found %lld\n",
814                  (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_2));
815         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2) == 4, "found %lld\n",
816                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2));
817         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_3) == 28, "found %lld\n",
818                  (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_3));
819         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3) == 4, "found %lld\n",
820                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3));
821         LASSERTF((int)offsetof(struct lustre_msg_v2, lm_buflens[0]) == 32, "found %lld\n",
822                  (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0]));
823         LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, "found %lld\n",
824                  (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]));
825         LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0bd00bd3UL, "found 0x%.8xUL\n",
826                 (unsigned)LUSTRE_MSG_MAGIC_V2);
827         LASSERTF(LUSTRE_MSG_MAGIC_V2_SWABBED == 0xd30bd00bUL, "found 0x%.8xUL\n",
828                 (unsigned)LUSTRE_MSG_MAGIC_V2_SWABBED);
829
830         /* Checks for struct ptlrpc_body */
831         LASSERTF((int)sizeof(struct ptlrpc_body_v3) == 184, "found %lld\n",
832                  (long long)(int)sizeof(struct ptlrpc_body_v3));
833         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_handle) == 0, "found %lld\n",
834                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_handle));
835         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_handle) == 8, "found %lld\n",
836                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_handle));
837         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_type) == 8, "found %lld\n",
838                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_type));
839         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_type) == 4, "found %lld\n",
840                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_type));
841         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_version) == 12, "found %lld\n",
842                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_version));
843         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_version) == 4, "found %lld\n",
844                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_version));
845         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_opc) == 16, "found %lld\n",
846                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_opc));
847         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_opc) == 4, "found %lld\n",
848                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_opc));
849         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_status) == 20, "found %lld\n",
850                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_status));
851         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_status) == 4, "found %lld\n",
852                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_status));
853         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_xid) == 24, "found %lld\n",
854                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_last_xid));
855         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid) == 8, "found %lld\n",
856                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid));
857         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_tag) == 32, "found %lld\n",
858                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_tag));
859         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag) == 2, "found %lld\n",
860                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag));
861         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding0) == 34, "found %lld\n",
862                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding0));
863         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0) == 2, "found %lld\n",
864                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0));
865         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding1) == 36, "found %lld\n",
866                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding1));
867         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1) == 4, "found %lld\n",
868                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1));
869         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_committed) == 40, "found %lld\n",
870                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_last_committed));
871         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed) == 8, "found %lld\n",
872                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed));
873         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_transno) == 48, "found %lld\n",
874                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_transno));
875         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_transno) == 8, "found %lld\n",
876                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_transno));
877         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_flags) == 56, "found %lld\n",
878                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_flags));
879         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_flags) == 4, "found %lld\n",
880                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_flags));
881         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_op_flags) == 60, "found %lld\n",
882                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_op_flags));
883         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_op_flags) == 4, "found %lld\n",
884                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_op_flags));
885         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_conn_cnt) == 64, "found %lld\n",
886                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_conn_cnt));
887         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_conn_cnt) == 4, "found %lld\n",
888                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_conn_cnt));
889         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_timeout) == 68, "found %lld\n",
890                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_timeout));
891         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_timeout) == 4, "found %lld\n",
892                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_timeout));
893         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_service_time) == 72, "found %lld\n",
894                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_service_time));
895         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_service_time) == 4, "found %lld\n",
896                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_service_time));
897         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_limit) == 76, "found %lld\n",
898                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_limit));
899         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_limit) == 4, "found %lld\n",
900                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_limit));
901         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_slv) == 80, "found %lld\n",
902                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_slv));
903         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_slv) == 8, "found %lld\n",
904                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_slv));
905         BUILD_BUG_ON(PTLRPC_NUM_VERSIONS != 4);
906         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_pre_versions) == 88, "found %lld\n",
907                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_pre_versions));
908         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_pre_versions) == 32, "found %lld\n",
909                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_pre_versions));
910         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_mbits) == 120, "found %lld\n",
911                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_mbits));
912         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_mbits) == 8, "found %lld\n",
913                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_mbits));
914         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_0) == 128, "found %lld\n",
915                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding64_0));
916         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_0) == 8, "found %lld\n",
917                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_0));
918         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_1) == 136, "found %lld\n",
919                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding64_1));
920         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_1) == 8, "found %lld\n",
921                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_1));
922         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_2) == 144, "found %lld\n",
923                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding64_2));
924         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_2) == 8, "found %lld\n",
925                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_2));
926         BUILD_BUG_ON(LUSTRE_JOBID_SIZE != 32);
927         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_jobid) == 152, "found %lld\n",
928                  (long long)(int)offsetof(struct ptlrpc_body_v3, pb_jobid));
929         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_jobid) == 32, "found %lld\n",
930                  (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_jobid));
931         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_handle) == (int)offsetof(struct ptlrpc_body_v2, pb_handle), "%d != %d\n",
932                  (int)offsetof(struct ptlrpc_body_v3, pb_handle), (int)offsetof(struct ptlrpc_body_v2, pb_handle));
933         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_handle) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_handle), "%d != %d\n",
934                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_handle), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_handle));
935         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_type) == (int)offsetof(struct ptlrpc_body_v2, pb_type), "%d != %d\n",
936                  (int)offsetof(struct ptlrpc_body_v3, pb_type), (int)offsetof(struct ptlrpc_body_v2, pb_type));
937         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_type) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_type), "%d != %d\n",
938                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_type), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_type));
939         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_version) == (int)offsetof(struct ptlrpc_body_v2, pb_version), "%d != %d\n",
940                  (int)offsetof(struct ptlrpc_body_v3, pb_version), (int)offsetof(struct ptlrpc_body_v2, pb_version));
941         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_version) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_version), "%d != %d\n",
942                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_version), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_version));
943         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_opc) == (int)offsetof(struct ptlrpc_body_v2, pb_opc), "%d != %d\n",
944                  (int)offsetof(struct ptlrpc_body_v3, pb_opc), (int)offsetof(struct ptlrpc_body_v2, pb_opc));
945         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_opc) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_opc), "%d != %d\n",
946                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_opc), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_opc));
947         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_status) == (int)offsetof(struct ptlrpc_body_v2, pb_status), "%d != %d\n",
948                  (int)offsetof(struct ptlrpc_body_v3, pb_status), (int)offsetof(struct ptlrpc_body_v2, pb_status));
949         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_status) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_status), "%d != %d\n",
950                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_status), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_status));
951         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_xid) == (int)offsetof(struct ptlrpc_body_v2, pb_last_xid), "%d != %d\n",
952                  (int)offsetof(struct ptlrpc_body_v3, pb_last_xid), (int)offsetof(struct ptlrpc_body_v2, pb_last_xid));
953         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_xid), "%d != %d\n",
954                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_xid));
955         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_tag) == (int)offsetof(struct ptlrpc_body_v2, pb_tag), "%d != %d\n",
956                  (int)offsetof(struct ptlrpc_body_v3, pb_tag), (int)offsetof(struct ptlrpc_body_v2, pb_tag));
957         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_tag), "%d != %d\n",
958                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_tag));
959         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding0) == (int)offsetof(struct ptlrpc_body_v2, pb_padding0), "%d != %d\n",
960                  (int)offsetof(struct ptlrpc_body_v3, pb_padding0), (int)offsetof(struct ptlrpc_body_v2, pb_padding0));
961         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding0), "%d != %d\n",
962                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding0));
963         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding1) == (int)offsetof(struct ptlrpc_body_v2, pb_padding1), "%d != %d\n",
964                  (int)offsetof(struct ptlrpc_body_v3, pb_padding1), (int)offsetof(struct ptlrpc_body_v2, pb_padding1));
965         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding1), "%d != %d\n",
966                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding1));
967         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_committed) == (int)offsetof(struct ptlrpc_body_v2, pb_last_committed), "%d != %d\n",
968                  (int)offsetof(struct ptlrpc_body_v3, pb_last_committed), (int)offsetof(struct ptlrpc_body_v2, pb_last_committed));
969         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_committed), "%d != %d\n",
970                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_committed));
971         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_transno) == (int)offsetof(struct ptlrpc_body_v2, pb_transno), "%d != %d\n",
972                  (int)offsetof(struct ptlrpc_body_v3, pb_transno), (int)offsetof(struct ptlrpc_body_v2, pb_transno));
973         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_transno) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_transno), "%d != %d\n",
974                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_transno), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_transno));
975         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_flags) == (int)offsetof(struct ptlrpc_body_v2, pb_flags), "%d != %d\n",
976                  (int)offsetof(struct ptlrpc_body_v3, pb_flags), (int)offsetof(struct ptlrpc_body_v2, pb_flags));
977         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_flags) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_flags), "%d != %d\n",
978                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_flags), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_flags));
979         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_op_flags) == (int)offsetof(struct ptlrpc_body_v2, pb_op_flags), "%d != %d\n",
980                  (int)offsetof(struct ptlrpc_body_v3, pb_op_flags), (int)offsetof(struct ptlrpc_body_v2, pb_op_flags));
981         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_op_flags) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_op_flags), "%d != %d\n",
982                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_op_flags), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_op_flags));
983         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_conn_cnt) == (int)offsetof(struct ptlrpc_body_v2, pb_conn_cnt), "%d != %d\n",
984                  (int)offsetof(struct ptlrpc_body_v3, pb_conn_cnt), (int)offsetof(struct ptlrpc_body_v2, pb_conn_cnt));
985         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_conn_cnt) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_conn_cnt), "%d != %d\n",
986                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_conn_cnt), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_conn_cnt));
987         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_timeout) == (int)offsetof(struct ptlrpc_body_v2, pb_timeout), "%d != %d\n",
988                  (int)offsetof(struct ptlrpc_body_v3, pb_timeout), (int)offsetof(struct ptlrpc_body_v2, pb_timeout));
989         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_timeout) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_timeout), "%d != %d\n",
990                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_timeout), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_timeout));
991         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_service_time) == (int)offsetof(struct ptlrpc_body_v2, pb_service_time), "%d != %d\n",
992                  (int)offsetof(struct ptlrpc_body_v3, pb_service_time), (int)offsetof(struct ptlrpc_body_v2, pb_service_time));
993         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_service_time) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_service_time), "%d != %d\n",
994                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_service_time), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_service_time));
995         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_limit) == (int)offsetof(struct ptlrpc_body_v2, pb_limit), "%d != %d\n",
996                  (int)offsetof(struct ptlrpc_body_v3, pb_limit), (int)offsetof(struct ptlrpc_body_v2, pb_limit));
997         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_limit) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_limit), "%d != %d\n",
998                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_limit), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_limit));
999         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_slv) == (int)offsetof(struct ptlrpc_body_v2, pb_slv), "%d != %d\n",
1000                  (int)offsetof(struct ptlrpc_body_v3, pb_slv), (int)offsetof(struct ptlrpc_body_v2, pb_slv));
1001         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_slv) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_slv), "%d != %d\n",
1002                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_slv), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_slv));
1003         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_pre_versions) == (int)offsetof(struct ptlrpc_body_v2, pb_pre_versions), "%d != %d\n",
1004                  (int)offsetof(struct ptlrpc_body_v3, pb_pre_versions), (int)offsetof(struct ptlrpc_body_v2, pb_pre_versions));
1005         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_pre_versions) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_pre_versions), "%d != %d\n",
1006                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_pre_versions), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_pre_versions));
1007         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_mbits) == (int)offsetof(struct ptlrpc_body_v2, pb_mbits), "%d != %d\n",
1008                  (int)offsetof(struct ptlrpc_body_v3, pb_mbits), (int)offsetof(struct ptlrpc_body_v2, pb_mbits));
1009         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_mbits) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_mbits), "%d != %d\n",
1010                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_mbits), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_mbits));
1011         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_0) == (int)offsetof(struct ptlrpc_body_v2, pb_padding64_0), "%d != %d\n",
1012                  (int)offsetof(struct ptlrpc_body_v3, pb_padding64_0), (int)offsetof(struct ptlrpc_body_v2, pb_padding64_0));
1013         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_0) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_0), "%d != %d\n",
1014                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_0), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_0));
1015         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_1) == (int)offsetof(struct ptlrpc_body_v2, pb_padding64_1), "%d != %d\n",
1016                  (int)offsetof(struct ptlrpc_body_v3, pb_padding64_1), (int)offsetof(struct ptlrpc_body_v2, pb_padding64_1));
1017         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_1) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_1), "%d != %d\n",
1018                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_1), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_1));
1019         LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding64_2) == (int)offsetof(struct ptlrpc_body_v2, pb_padding64_2), "%d != %d\n",
1020                  (int)offsetof(struct ptlrpc_body_v3, pb_padding64_2), (int)offsetof(struct ptlrpc_body_v2, pb_padding64_2));
1021         LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_2) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_2), "%d != %d\n",
1022                  (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding64_2), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding64_2));
1023         LASSERTF(MSG_PTLRPC_BODY_OFF == 0, "found %lld\n",
1024                  (long long)MSG_PTLRPC_BODY_OFF);
1025         LASSERTF(REQ_REC_OFF == 1, "found %lld\n",
1026                  (long long)REQ_REC_OFF);
1027         LASSERTF(REPLY_REC_OFF == 1, "found %lld\n",
1028                  (long long)REPLY_REC_OFF);
1029         LASSERTF(DLM_LOCKREQ_OFF == 1, "found %lld\n",
1030                  (long long)DLM_LOCKREQ_OFF);
1031         LASSERTF(DLM_REQ_REC_OFF == 2, "found %lld\n",
1032                  (long long)DLM_REQ_REC_OFF);
1033         LASSERTF(DLM_INTENT_IT_OFF == 2, "found %lld\n",
1034                  (long long)DLM_INTENT_IT_OFF);
1035         LASSERTF(DLM_INTENT_REC_OFF == 3, "found %lld\n",
1036                  (long long)DLM_INTENT_REC_OFF);
1037         LASSERTF(DLM_LOCKREPLY_OFF == 1, "found %lld\n",
1038                  (long long)DLM_LOCKREPLY_OFF);
1039         LASSERTF(DLM_REPLY_REC_OFF == 2, "found %lld\n",
1040                  (long long)DLM_REPLY_REC_OFF);
1041         LASSERTF(MSG_PTLRPC_HEADER_OFF == 31, "found %lld\n",
1042                  (long long)MSG_PTLRPC_HEADER_OFF);
1043         LASSERTF(PTLRPC_MSG_VERSION == 0x00000003UL, "found 0x%.8xUL\n",
1044                 (unsigned)PTLRPC_MSG_VERSION);
1045         LASSERTF(LUSTRE_VERSION_MASK == 0xffff0000UL, "found 0x%.8xUL\n",
1046                 (unsigned)LUSTRE_VERSION_MASK);
1047         LASSERTF(LUSTRE_OBD_VERSION == 0x00010000UL, "found 0x%.8xUL\n",
1048                 (unsigned)LUSTRE_OBD_VERSION);
1049         LASSERTF(LUSTRE_MDS_VERSION == 0x00020000UL, "found 0x%.8xUL\n",
1050                 (unsigned)LUSTRE_MDS_VERSION);
1051         LASSERTF(LUSTRE_OST_VERSION == 0x00030000UL, "found 0x%.8xUL\n",
1052                 (unsigned)LUSTRE_OST_VERSION);
1053         LASSERTF(LUSTRE_DLM_VERSION == 0x00040000UL, "found 0x%.8xUL\n",
1054                 (unsigned)LUSTRE_DLM_VERSION);
1055         LASSERTF(LUSTRE_LOG_VERSION == 0x00050000UL, "found 0x%.8xUL\n",
1056                 (unsigned)LUSTRE_LOG_VERSION);
1057         LASSERTF(LUSTRE_MGS_VERSION == 0x00060000UL, "found 0x%.8xUL\n",
1058                 (unsigned)LUSTRE_MGS_VERSION);
1059         LASSERTF(MSGHDR_AT_SUPPORT == 1, "found %lld\n",
1060                  (long long)MSGHDR_AT_SUPPORT);
1061         LASSERTF(MSGHDR_CKSUM_INCOMPAT18 == 2, "found %lld\n",
1062                  (long long)MSGHDR_CKSUM_INCOMPAT18);
1063         LASSERTF(MSG_RESENT == 0x00000002UL, "found 0x%.8xUL\n",
1064                 (unsigned)MSG_RESENT);
1065         LASSERTF(MSG_REPLAY == 0x00000004UL, "found 0x%.8xUL\n",
1066                 (unsigned)MSG_REPLAY);
1067         LASSERTF(MSG_REQ_REPLAY_DONE == 0x00000040UL, "found 0x%.8xUL\n",
1068                 (unsigned)MSG_REQ_REPLAY_DONE);
1069         LASSERTF(MSG_LOCK_REPLAY_DONE == 0x00000080UL, "found 0x%.8xUL\n",
1070                 (unsigned)MSG_LOCK_REPLAY_DONE);
1071         LASSERTF(MSG_CONNECT_RECOVERING == 0x00000001UL, "found 0x%.8xUL\n",
1072                 (unsigned)MSG_CONNECT_RECOVERING);
1073         LASSERTF(MSG_CONNECT_RECONNECT == 0x00000002UL, "found 0x%.8xUL\n",
1074                 (unsigned)MSG_CONNECT_RECONNECT);
1075         LASSERTF(MSG_CONNECT_REPLAYABLE == 0x00000004UL, "found 0x%.8xUL\n",
1076                 (unsigned)MSG_CONNECT_REPLAYABLE);
1077         LASSERTF(MSG_CONNECT_LIBCLIENT == 0x00000010UL, "found 0x%.8xUL\n",
1078                 (unsigned)MSG_CONNECT_LIBCLIENT);
1079         LASSERTF(MSG_CONNECT_INITIAL == 0x00000020UL, "found 0x%.8xUL\n",
1080                 (unsigned)MSG_CONNECT_INITIAL);
1081         LASSERTF(MSG_CONNECT_NEXT_VER == 0x00000080UL, "found 0x%.8xUL\n",
1082                 (unsigned)MSG_CONNECT_NEXT_VER);
1083         LASSERTF(MSG_CONNECT_TRANSNO == 0x00000100UL, "found 0x%.8xUL\n",
1084                 (unsigned)MSG_CONNECT_TRANSNO);
1085
1086         /* Checks for struct obd_connect_data */
1087         LASSERTF((int)sizeof(struct obd_connect_data) == 192, "found %lld\n",
1088                  (long long)(int)sizeof(struct obd_connect_data));
1089         LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags) == 0, "found %lld\n",
1090                  (long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags));
1091         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags) == 8, "found %lld\n",
1092                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags));
1093         LASSERTF((int)offsetof(struct obd_connect_data, ocd_version) == 8, "found %lld\n",
1094                  (long long)(int)offsetof(struct obd_connect_data, ocd_version));
1095         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_version) == 4, "found %lld\n",
1096                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_version));
1097         LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant) == 12, "found %lld\n",
1098                  (long long)(int)offsetof(struct obd_connect_data, ocd_grant));
1099         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant) == 4, "found %lld\n",
1100                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant));
1101         LASSERTF((int)offsetof(struct obd_connect_data, ocd_index) == 16, "found %lld\n",
1102                  (long long)(int)offsetof(struct obd_connect_data, ocd_index));
1103         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_index) == 4, "found %lld\n",
1104                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_index));
1105         LASSERTF((int)offsetof(struct obd_connect_data, ocd_brw_size) == 20, "found %lld\n",
1106                  (long long)(int)offsetof(struct obd_connect_data, ocd_brw_size));
1107         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size) == 4, "found %lld\n",
1108                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size));
1109         LASSERTF((int)offsetof(struct obd_connect_data, ocd_ibits_known) == 24, "found %lld\n",
1110                  (long long)(int)offsetof(struct obd_connect_data, ocd_ibits_known));
1111         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known) == 8, "found %lld\n",
1112                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known));
1113         LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant_blkbits) == 32, "found %lld\n",
1114                  (long long)(int)offsetof(struct obd_connect_data, ocd_grant_blkbits));
1115         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant_blkbits) == 1, "found %lld\n",
1116                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant_blkbits));
1117         LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant_inobits) == 33, "found %lld\n",
1118                  (long long)(int)offsetof(struct obd_connect_data, ocd_grant_inobits));
1119         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant_inobits) == 1, "found %lld\n",
1120                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant_inobits));
1121         LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant_tax_kb) == 34, "found %lld\n",
1122                  (long long)(int)offsetof(struct obd_connect_data, ocd_grant_tax_kb));
1123         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant_tax_kb) == 2, "found %lld\n",
1124                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant_tax_kb));
1125         LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant_max_blks) == 36, "found %lld\n",
1126                  (long long)(int)offsetof(struct obd_connect_data, ocd_grant_max_blks));
1127         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant_max_blks) == 4, "found %lld\n",
1128                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant_max_blks));
1129         LASSERTF((int)offsetof(struct obd_connect_data, ocd_transno) == 40, "found %lld\n",
1130                  (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
1131         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_transno) == 8, "found %lld\n",
1132                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_transno));
1133         LASSERTF((int)offsetof(struct obd_connect_data, ocd_group) == 48, "found %lld\n",
1134                  (long long)(int)offsetof(struct obd_connect_data, ocd_group));
1135         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_group) == 4, "found %lld\n",
1136                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_group));
1137         LASSERTF((int)offsetof(struct obd_connect_data, ocd_cksum_types) == 52, "found %lld\n",
1138                  (long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types));
1139         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, "found %lld\n",
1140                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types));
1141         LASSERTF((int)offsetof(struct obd_connect_data, ocd_max_easize) == 56, "found %lld\n",
1142                  (long long)(int)offsetof(struct obd_connect_data, ocd_max_easize));
1143         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize) == 4, "found %lld\n",
1144                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_max_easize));
1145         LASSERTF((int)offsetof(struct obd_connect_data, ocd_instance) == 60, "found %lld\n",
1146                  (long long)(int)offsetof(struct obd_connect_data, ocd_instance));
1147         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_instance) == 4, "found %lld\n",
1148                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_instance));
1149         LASSERTF((int)offsetof(struct obd_connect_data, ocd_maxbytes) == 64, "found %lld\n",
1150                  (long long)(int)offsetof(struct obd_connect_data, ocd_maxbytes));
1151         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes) == 8, "found %lld\n",
1152                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes));
1153         LASSERTF((int)offsetof(struct obd_connect_data, ocd_maxmodrpcs) == 72, "found %lld\n",
1154                  (long long)(int)offsetof(struct obd_connect_data, ocd_maxmodrpcs));
1155         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs) == 2, "found %lld\n",
1156                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs));
1157         LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 74, "found %lld\n",
1158                  (long long)(int)offsetof(struct obd_connect_data, padding0));
1159         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 2, "found %lld\n",
1160                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding0));
1161         LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 76, "found %lld\n",
1162                  (long long)(int)offsetof(struct obd_connect_data, padding1));
1163         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 4, "found %lld\n",
1164                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
1165         LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags2) == 80, "found %lld\n",
1166                  (long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags2));
1167         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags2) == 8, "found %lld\n",
1168                  (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags2));
1169         LASSERTF((int)offsetof(struct obd_connect_data, padding3) == 88, "found %lld\n",
1170                  (long long)(int)offsetof(struct obd_connect_data, padding3));
1171         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding3) == 8, "found %lld\n",
1172                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding3));
1173         LASSERTF((int)offsetof(struct obd_connect_data, padding4) == 96, "found %lld\n",
1174                  (long long)(int)offsetof(struct obd_connect_data, padding4));
1175         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding4) == 8, "found %lld\n",
1176                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding4));
1177         LASSERTF((int)offsetof(struct obd_connect_data, padding5) == 104, "found %lld\n",
1178                  (long long)(int)offsetof(struct obd_connect_data, padding5));
1179         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding5) == 8, "found %lld\n",
1180                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding5));
1181         LASSERTF((int)offsetof(struct obd_connect_data, padding6) == 112, "found %lld\n",
1182                  (long long)(int)offsetof(struct obd_connect_data, padding6));
1183         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding6) == 8, "found %lld\n",
1184                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding6));
1185         LASSERTF((int)offsetof(struct obd_connect_data, padding7) == 120, "found %lld\n",
1186                  (long long)(int)offsetof(struct obd_connect_data, padding7));
1187         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding7) == 8, "found %lld\n",
1188                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding7));
1189         LASSERTF((int)offsetof(struct obd_connect_data, padding8) == 128, "found %lld\n",
1190                  (long long)(int)offsetof(struct obd_connect_data, padding8));
1191         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding8) == 8, "found %lld\n",
1192                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding8));
1193         LASSERTF((int)offsetof(struct obd_connect_data, padding9) == 136, "found %lld\n",
1194                  (long long)(int)offsetof(struct obd_connect_data, padding9));
1195         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding9) == 8, "found %lld\n",
1196                  (long long)(int)sizeof(((struct obd_connect_data *)0)->padding9));
1197         LASSERTF((int)offsetof(struct obd_connect_data, paddingA) == 144, "found %lld\n",
1198                  (long long)(int)offsetof(struct obd_connect_data, paddingA));
1199         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingA) == 8, "found %lld\n",
1200                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingA));
1201         LASSERTF((int)offsetof(struct obd_connect_data, paddingB) == 152, "found %lld\n",
1202                  (long long)(int)offsetof(struct obd_connect_data, paddingB));
1203         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingB) == 8, "found %lld\n",
1204                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingB));
1205         LASSERTF((int)offsetof(struct obd_connect_data, paddingC) == 160, "found %lld\n",
1206                  (long long)(int)offsetof(struct obd_connect_data, paddingC));
1207         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingC) == 8, "found %lld\n",
1208                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingC));
1209         LASSERTF((int)offsetof(struct obd_connect_data, paddingD) == 168, "found %lld\n",
1210                  (long long)(int)offsetof(struct obd_connect_data, paddingD));
1211         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingD) == 8, "found %lld\n",
1212                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingD));
1213         LASSERTF((int)offsetof(struct obd_connect_data, paddingE) == 176, "found %lld\n",
1214                  (long long)(int)offsetof(struct obd_connect_data, paddingE));
1215         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingE) == 8, "found %lld\n",
1216                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingE));
1217         LASSERTF((int)offsetof(struct obd_connect_data, paddingF) == 184, "found %lld\n",
1218                  (long long)(int)offsetof(struct obd_connect_data, paddingF));
1219         LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingF) == 8, "found %lld\n",
1220                  (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingF));
1221         LASSERTF(OBD_CONNECT_RDONLY == 0x1ULL, "found 0x%.16llxULL\n",
1222                  OBD_CONNECT_RDONLY);
1223         LASSERTF(OBD_CONNECT_INDEX == 0x2ULL, "found 0x%.16llxULL\n",
1224                  OBD_CONNECT_INDEX);
1225         LASSERTF(OBD_CONNECT_MDS == 0x4ULL, "found 0x%.16llxULL\n",
1226                  OBD_CONNECT_MDS);
1227         LASSERTF(OBD_CONNECT_GRANT == 0x8ULL, "found 0x%.16llxULL\n",
1228                  OBD_CONNECT_GRANT);
1229         LASSERTF(OBD_CONNECT_SRVLOCK == 0x10ULL, "found 0x%.16llxULL\n",
1230                  OBD_CONNECT_SRVLOCK);
1231         LASSERTF(OBD_CONNECT_VERSION == 0x20ULL, "found 0x%.16llxULL\n",
1232                  OBD_CONNECT_VERSION);
1233         LASSERTF(OBD_CONNECT_REQPORTAL == 0x40ULL, "found 0x%.16llxULL\n",
1234                  OBD_CONNECT_REQPORTAL);
1235         LASSERTF(OBD_CONNECT_ACL == 0x80ULL, "found 0x%.16llxULL\n",
1236                  OBD_CONNECT_ACL);
1237         LASSERTF(OBD_CONNECT_XATTR == 0x100ULL, "found 0x%.16llxULL\n",
1238                  OBD_CONNECT_XATTR);
1239         LASSERTF(OBD_CONNECT_LARGE_ACL == 0x200ULL, "found 0x%.16llxULL\n",
1240                  OBD_CONNECT_LARGE_ACL);
1241         LASSERTF(OBD_CONNECT_TRUNCLOCK == 0x400ULL, "found 0x%.16llxULL\n",
1242                  OBD_CONNECT_TRUNCLOCK);
1243         LASSERTF(OBD_CONNECT_TRANSNO == 0x800ULL, "found 0x%.16llxULL\n",
1244                  OBD_CONNECT_TRANSNO);
1245         LASSERTF(OBD_CONNECT_IBITS == 0x1000ULL, "found 0x%.16llxULL\n",
1246                  OBD_CONNECT_IBITS);
1247         LASSERTF(OBD_CONNECT_BARRIER == 0x2000ULL, "found 0x%.16llxULL\n",
1248                  OBD_CONNECT_BARRIER);
1249         LASSERTF(OBD_CONNECT_ATTRFID == 0x4000ULL, "found 0x%.16llxULL\n",
1250                  OBD_CONNECT_ATTRFID);
1251         LASSERTF(OBD_CONNECT_NODEVOH == 0x8000ULL, "found 0x%.16llxULL\n",
1252                  OBD_CONNECT_NODEVOH);
1253         LASSERTF(OBD_CONNECT_RMT_CLIENT == 0x10000ULL, "found 0x%.16llxULL\n",
1254                  OBD_CONNECT_RMT_CLIENT);
1255         LASSERTF(OBD_CONNECT_RMT_CLIENT_FORCE == 0x20000ULL, "found 0x%.16llxULL\n",
1256                  OBD_CONNECT_RMT_CLIENT_FORCE);
1257         LASSERTF(OBD_CONNECT_BRW_SIZE == 0x40000ULL, "found 0x%.16llxULL\n",
1258                  OBD_CONNECT_BRW_SIZE);
1259         LASSERTF(OBD_CONNECT_QUOTA64 == 0x80000ULL, "found 0x%.16llxULL\n",
1260                  OBD_CONNECT_QUOTA64);
1261         LASSERTF(OBD_CONNECT_MDS_CAPA == 0x100000ULL, "found 0x%.16llxULL\n",
1262                  OBD_CONNECT_MDS_CAPA);
1263         LASSERTF(OBD_CONNECT_OSS_CAPA == 0x200000ULL, "found 0x%.16llxULL\n",
1264                  OBD_CONNECT_OSS_CAPA);
1265         LASSERTF(OBD_CONNECT_CANCELSET == 0x400000ULL, "found 0x%.16llxULL\n",
1266                  OBD_CONNECT_CANCELSET);
1267         LASSERTF(OBD_CONNECT_SOM == 0x800000ULL, "found 0x%.16llxULL\n",
1268                  OBD_CONNECT_SOM);
1269         LASSERTF(OBD_CONNECT_AT == 0x1000000ULL, "found 0x%.16llxULL\n",
1270                  OBD_CONNECT_AT);
1271         LASSERTF(OBD_CONNECT_LRU_RESIZE == 0x2000000ULL, "found 0x%.16llxULL\n",
1272                  OBD_CONNECT_LRU_RESIZE);
1273         LASSERTF(OBD_CONNECT_MDS_MDS == 0x4000000ULL, "found 0x%.16llxULL\n",
1274                  OBD_CONNECT_MDS_MDS);
1275         LASSERTF(OBD_CONNECT_REAL == 0x8000000ULL, "found 0x%.16llxULL\n",
1276                  OBD_CONNECT_REAL);
1277         LASSERTF(OBD_CONNECT_CHANGE_QS == 0x10000000ULL, "found 0x%.16llxULL\n",
1278                  OBD_CONNECT_CHANGE_QS);
1279         LASSERTF(OBD_CONNECT_CKSUM == 0x20000000ULL, "found 0x%.16llxULL\n",
1280                  OBD_CONNECT_CKSUM);
1281         LASSERTF(OBD_CONNECT_FID == 0x40000000ULL, "found 0x%.16llxULL\n",
1282                  OBD_CONNECT_FID);
1283         LASSERTF(OBD_CONNECT_VBR == 0x80000000ULL, "found 0x%.16llxULL\n",
1284                  OBD_CONNECT_VBR);
1285         LASSERTF(OBD_CONNECT_LOV_V3 == 0x100000000ULL, "found 0x%.16llxULL\n",
1286                  OBD_CONNECT_LOV_V3);
1287         LASSERTF(OBD_CONNECT_GRANT_SHRINK == 0x200000000ULL, "found 0x%.16llxULL\n",
1288                  OBD_CONNECT_GRANT_SHRINK);
1289         LASSERTF(OBD_CONNECT_SKIP_ORPHAN == 0x400000000ULL, "found 0x%.16llxULL\n",
1290                  OBD_CONNECT_SKIP_ORPHAN);
1291         LASSERTF(OBD_CONNECT_MAX_EASIZE == 0x800000000ULL, "found 0x%.16llxULL\n",
1292                  OBD_CONNECT_MAX_EASIZE);
1293         LASSERTF(OBD_CONNECT_FULL20 == 0x1000000000ULL, "found 0x%.16llxULL\n",
1294                  OBD_CONNECT_FULL20);
1295         LASSERTF(OBD_CONNECT_LAYOUTLOCK == 0x2000000000ULL, "found 0x%.16llxULL\n",
1296                  OBD_CONNECT_LAYOUTLOCK);
1297         LASSERTF(OBD_CONNECT_64BITHASH == 0x4000000000ULL, "found 0x%.16llxULL\n",
1298                  OBD_CONNECT_64BITHASH);
1299         LASSERTF(OBD_CONNECT_MAXBYTES == 0x8000000000ULL, "found 0x%.16llxULL\n",
1300                  OBD_CONNECT_MAXBYTES);
1301         LASSERTF(OBD_CONNECT_IMP_RECOV == 0x10000000000ULL, "found 0x%.16llxULL\n",
1302                  OBD_CONNECT_IMP_RECOV);
1303         LASSERTF(OBD_CONNECT_JOBSTATS == 0x20000000000ULL, "found 0x%.16llxULL\n",
1304                  OBD_CONNECT_JOBSTATS);
1305         LASSERTF(OBD_CONNECT_UMASK == 0x40000000000ULL, "found 0x%.16llxULL\n",
1306                  OBD_CONNECT_UMASK);
1307         LASSERTF(OBD_CONNECT_EINPROGRESS == 0x80000000000ULL, "found 0x%.16llxULL\n",
1308                  OBD_CONNECT_EINPROGRESS);
1309         LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n",
1310                  OBD_CONNECT_GRANT_PARAM);
1311         LASSERTF(OBD_CONNECT_FLOCK_OWNER == 0x200000000000ULL, "found 0x%.16llxULL\n",
1312                  OBD_CONNECT_FLOCK_OWNER);
1313         LASSERTF(OBD_CONNECT_LVB_TYPE == 0x400000000000ULL, "found 0x%.16llxULL\n",
1314                  OBD_CONNECT_LVB_TYPE);
1315         LASSERTF(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL, "found 0x%.16llxULL\n",
1316                  OBD_CONNECT_NANOSEC_TIME);
1317         LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n",
1318                  OBD_CONNECT_LIGHTWEIGHT);
1319         LASSERTF(OBD_CONNECT_SHORTIO == 0x2000000000000ULL, "found 0x%.16llxULL\n",
1320                  OBD_CONNECT_SHORTIO);
1321         LASSERTF(OBD_CONNECT_PINGLESS == 0x4000000000000ULL, "found 0x%.16llxULL\n",
1322                  OBD_CONNECT_PINGLESS);
1323         LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL, "found 0x%.16llxULL\n",
1324                  OBD_CONNECT_FLOCK_DEAD);
1325         LASSERTF(OBD_CONNECT_DISP_STRIPE == 0x10000000000000ULL, "found 0x%.16llxULL\n",
1326                  OBD_CONNECT_DISP_STRIPE);
1327         LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20000000000000ULL, "found 0x%.16llxULL\n",
1328                  OBD_CONNECT_OPEN_BY_FID);
1329         LASSERTF(OBD_CONNECT_LFSCK == 0x40000000000000ULL, "found 0x%.16llxULL\n",
1330                  OBD_CONNECT_LFSCK);
1331         LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
1332                  OBD_CONNECT_UNLINK_CLOSE);
1333         LASSERTF(OBD_CONNECT_MULTIMODRPCS == 0x200000000000000ULL, "found 0x%.16llxULL\n",
1334                  OBD_CONNECT_MULTIMODRPCS);
1335         LASSERTF(OBD_CONNECT_DIR_STRIPE == 0x400000000000000ULL, "found 0x%.16llxULL\n",
1336                  OBD_CONNECT_DIR_STRIPE);
1337         LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
1338                  OBD_CONNECT_SUBTREE);
1339         LASSERTF(OBD_CONNECT_BULK_MBITS == 0x2000000000000000ULL, "found 0x%.16llxULL\n",
1340                  OBD_CONNECT_BULK_MBITS);
1341         LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
1342                  OBD_CONNECT_OBDOPACK);
1343         LASSERTF(OBD_CONNECT_FLAGS2 == 0x8000000000000000ULL, "found 0x%.16llxULL\n",
1344                  OBD_CONNECT_FLAGS2);
1345         LASSERTF(OBD_CONNECT2_FILE_SECCTX == 0x1ULL, "found 0x%.16llxULL\n",
1346                  OBD_CONNECT2_FILE_SECCTX);
1347         LASSERTF(OBD_CONNECT2_LOCKAHEAD == 0x2ULL, "found 0x%.16llxULL\n",
1348                  OBD_CONNECT2_LOCKAHEAD);
1349         LASSERTF(OBD_CONNECT2_DIR_MIGRATE == 0x4ULL, "found 0x%.16llxULL\n",
1350                  OBD_CONNECT2_DIR_MIGRATE);
1351         LASSERTF(OBD_CONNECT2_SUM_STATFS == 0x8ULL, "found 0x%.16llxULL\n",
1352                  OBD_CONNECT2_SUM_STATFS);
1353         LASSERTF(OBD_CONNECT2_OVERSTRIPING == 0x10ULL, "found 0x%.16llxULL\n",
1354                  OBD_CONNECT2_OVERSTRIPING);
1355         LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n",
1356                  OBD_CONNECT2_FLR);
1357         LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n",
1358                  OBD_CONNECT2_WBC_INTENTS);
1359         LASSERTF(OBD_CONNECT2_LOCK_CONVERT == 0x80ULL, "found 0x%.16llxULL\n",
1360                  OBD_CONNECT2_LOCK_CONVERT);
1361         LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n",
1362                  OBD_CONNECT2_ARCHIVE_ID_ARRAY);
1363         LASSERTF(OBD_CONNECT2_INC_XID == 0x200ULL, "found 0x%.16llxULL\n",
1364                  OBD_CONNECT2_INC_XID);
1365         LASSERTF(OBD_CONNECT2_SELINUX_POLICY == 0x400ULL, "found 0x%.16llxULL\n",
1366                  OBD_CONNECT2_SELINUX_POLICY);
1367         LASSERTF(OBD_CONNECT2_LSOM == 0x800ULL, "found 0x%.16llxULL\n",
1368                  OBD_CONNECT2_LSOM);
1369         LASSERTF(OBD_CONNECT2_PCC == 0x1000ULL, "found 0x%.16llxULL\n",
1370                  OBD_CONNECT2_PCC);
1371         LASSERTF(OBD_CONNECT2_CRUSH == 0x2000ULL, "found 0x%.16llxULL\n",
1372                  OBD_CONNECT2_CRUSH);
1373         LASSERTF(OBD_CONNECT2_ASYNC_DISCARD == 0x4000ULL, "found 0x%.16llxULL\n",
1374                  OBD_CONNECT2_ASYNC_DISCARD);
1375         LASSERTF(OBD_CONNECT2_ENCRYPT == 0x8000ULL, "found 0x%.16llxULL\n",
1376                  OBD_CONNECT2_ENCRYPT);
1377         LASSERTF(OBD_CONNECT2_FIDMAP == 0x10000ULL, "found 0x%.16llxULL\n",
1378                  OBD_CONNECT2_FIDMAP);
1379         LASSERTF(OBD_CONNECT2_GETATTR_PFID == 0x20000ULL, "found 0x%.16llxULL\n",
1380                  OBD_CONNECT2_GETATTR_PFID);
1381         LASSERTF(OBD_CONNECT2_LSEEK == 0x40000ULL, "found 0x%.16llxULL\n",
1382                  OBD_CONNECT2_LSEEK);
1383         LASSERTF(OBD_CONNECT2_DOM_LVB == 0x80000ULL, "found 0x%.16llxULL\n",
1384                  OBD_CONNECT2_DOM_LVB);
1385         LASSERTF(OBD_CONNECT2_REP_MBITS == 0x100000ULL, "found 0x%.16llxULL\n",
1386                  OBD_CONNECT2_REP_MBITS);
1387         LASSERTF(OBD_CONNECT2_ATOMIC_OPEN_LOCK == 0x4000000ULL, "found 0x%.16llxULL\n",
1388                  OBD_CONNECT2_ATOMIC_OPEN_LOCK);
1389         LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
1390                 (unsigned)OBD_CKSUM_CRC32);
1391         LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
1392                 (unsigned)OBD_CKSUM_ADLER);
1393         LASSERTF(OBD_CKSUM_CRC32C == 0x00000004UL, "found 0x%.8xUL\n",
1394                 (unsigned)OBD_CKSUM_CRC32C);
1395         LASSERTF(OBD_CKSUM_RESERVED == 0x00000008UL, "found 0x%.8xUL\n",
1396                 (unsigned)OBD_CKSUM_RESERVED);
1397         LASSERTF(OBD_CKSUM_T10IP512 == 0x00000010UL, "found 0x%.8xUL\n",
1398                 (unsigned)OBD_CKSUM_T10IP512);
1399         LASSERTF(OBD_CKSUM_T10IP4K == 0x00000020UL, "found 0x%.8xUL\n",
1400                 (unsigned)OBD_CKSUM_T10IP4K);
1401         LASSERTF(OBD_CKSUM_T10CRC512 == 0x00000040UL, "found 0x%.8xUL\n",
1402                 (unsigned)OBD_CKSUM_T10CRC512);
1403         LASSERTF(OBD_CKSUM_T10CRC4K == 0x00000080UL, "found 0x%.8xUL\n",
1404                 (unsigned)OBD_CKSUM_T10CRC4K);
1405         LASSERTF(OBD_CKSUM_T10_TOP == 0x00000002UL, "found 0x%.8xUL\n",
1406                 (unsigned)OBD_CKSUM_T10_TOP);
1407
1408         /* Checks for struct ost_layout */
1409         LASSERTF((int)sizeof(struct ost_layout) == 28, "found %lld\n",
1410                  (long long)(int)sizeof(struct ost_layout));
1411         LASSERTF((int)offsetof(struct ost_layout, ol_stripe_size) == 0, "found %lld\n",
1412                  (long long)(int)offsetof(struct ost_layout, ol_stripe_size));
1413         LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_stripe_size) == 4, "found %lld\n",
1414                  (long long)(int)sizeof(((struct ost_layout *)0)->ol_stripe_size));
1415         LASSERTF((int)offsetof(struct ost_layout, ol_stripe_count) == 4, "found %lld\n",
1416                  (long long)(int)offsetof(struct ost_layout, ol_stripe_count));
1417         LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_stripe_count) == 4, "found %lld\n",
1418                  (long long)(int)sizeof(((struct ost_layout *)0)->ol_stripe_count));
1419         LASSERTF((int)offsetof(struct ost_layout, ol_comp_start) == 8, "found %lld\n",
1420                  (long long)(int)offsetof(struct ost_layout, ol_comp_start));
1421         LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_start) == 8, "found %lld\n",
1422                  (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_start));
1423         LASSERTF((int)offsetof(struct ost_layout, ol_comp_end) == 16, "found %lld\n",
1424                  (long long)(int)offsetof(struct ost_layout, ol_comp_end));
1425         LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_end) == 8, "found %lld\n",
1426                  (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_end));
1427         LASSERTF((int)offsetof(struct ost_layout, ol_comp_id) == 24, "found %lld\n",
1428                  (long long)(int)offsetof(struct ost_layout, ol_comp_id));
1429         LASSERTF((int)sizeof(((struct ost_layout *)0)->ol_comp_id) == 4, "found %lld\n",
1430                  (long long)(int)sizeof(((struct ost_layout *)0)->ol_comp_id));
1431
1432         /* Checks for struct obdo */
1433         LASSERTF((int)sizeof(struct obdo) == 208, "found %lld\n",
1434                  (long long)(int)sizeof(struct obdo));
1435         LASSERTF((int)offsetof(struct obdo, o_valid) == 0, "found %lld\n",
1436                  (long long)(int)offsetof(struct obdo, o_valid));
1437         LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, "found %lld\n",
1438                  (long long)(int)sizeof(((struct obdo *)0)->o_valid));
1439         LASSERTF((int)offsetof(struct obdo, o_oi) == 8, "found %lld\n",
1440                  (long long)(int)offsetof(struct obdo, o_oi));
1441         LASSERTF((int)sizeof(((struct obdo *)0)->o_oi) == 16, "found %lld\n",
1442                  (long long)(int)sizeof(((struct obdo *)0)->o_oi));
1443         LASSERTF((int)offsetof(struct obdo, o_parent_seq) == 24, "found %lld\n",
1444                  (long long)(int)offsetof(struct obdo, o_parent_seq));
1445         LASSERTF((int)sizeof(((struct obdo *)0)->o_parent_seq) == 8, "found %lld\n",
1446                  (long long)(int)sizeof(((struct obdo *)0)->o_parent_seq));
1447         LASSERTF((int)offsetof(struct obdo, o_size) == 32, "found %lld\n",
1448                  (long long)(int)offsetof(struct obdo, o_size));
1449         LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, "found %lld\n",
1450                  (long long)(int)sizeof(((struct obdo *)0)->o_size));
1451         LASSERTF((int)offsetof(struct obdo, o_mtime) == 40, "found %lld\n",
1452                  (long long)(int)offsetof(struct obdo, o_mtime));
1453         LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, "found %lld\n",
1454                  (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
1455         LASSERTF((int)offsetof(struct obdo, o_atime) == 48, "found %lld\n",
1456                  (long long)(int)offsetof(struct obdo, o_atime));
1457         LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, "found %lld\n",
1458                  (long long)(int)sizeof(((struct obdo *)0)->o_atime));
1459         LASSERTF((int)offsetof(struct obdo, o_ctime) == 56, "found %lld\n",
1460                  (long long)(int)offsetof(struct obdo, o_ctime));
1461         LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, "found %lld\n",
1462                  (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
1463         LASSERTF((int)offsetof(struct obdo, o_blocks) == 64, "found %lld\n",
1464                  (long long)(int)offsetof(struct obdo, o_blocks));
1465         LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, "found %lld\n",
1466                  (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
1467         LASSERTF((int)offsetof(struct obdo, o_grant) == 72, "found %lld\n",
1468                  (long long)(int)offsetof(struct obdo, o_grant));
1469         LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, "found %lld\n",
1470                  (long long)(int)sizeof(((struct obdo *)0)->o_grant));
1471         LASSERTF((int)offsetof(struct obdo, o_blksize) == 80, "found %lld\n",
1472                  (long long)(int)offsetof(struct obdo, o_blksize));
1473         LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, "found %lld\n",
1474                  (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
1475         LASSERTF((int)offsetof(struct obdo, o_mode) == 84, "found %lld\n",
1476                  (long long)(int)offsetof(struct obdo, o_mode));
1477         LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, "found %lld\n",
1478                  (long long)(int)sizeof(((struct obdo *)0)->o_mode));
1479         LASSERTF((int)offsetof(struct obdo, o_uid) == 88, "found %lld\n",
1480                  (long long)(int)offsetof(struct obdo, o_uid));
1481         LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, "found %lld\n",
1482                  (long long)(int)sizeof(((struct obdo *)0)->o_uid));
1483         LASSERTF((int)offsetof(struct obdo, o_gid) == 92, "found %lld\n",
1484                  (long long)(int)offsetof(struct obdo, o_gid));
1485         LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, "found %lld\n",
1486                  (long long)(int)sizeof(((struct obdo *)0)->o_gid));
1487         LASSERTF((int)offsetof(struct obdo, o_flags) == 96, "found %lld\n",
1488                  (long long)(int)offsetof(struct obdo, o_flags));
1489         LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, "found %lld\n",
1490                  (long long)(int)sizeof(((struct obdo *)0)->o_flags));
1491         LASSERTF((int)offsetof(struct obdo, o_nlink) == 100, "found %lld\n",
1492                  (long long)(int)offsetof(struct obdo, o_nlink));
1493         LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, "found %lld\n",
1494                  (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
1495         LASSERTF((int)offsetof(struct obdo, o_parent_oid) == 104, "found %lld\n",
1496                  (long long)(int)offsetof(struct obdo, o_parent_oid));
1497         LASSERTF((int)sizeof(((struct obdo *)0)->o_parent_oid) == 4, "found %lld\n",
1498                  (long long)(int)sizeof(((struct obdo *)0)->o_parent_oid));
1499         LASSERTF((int)offsetof(struct obdo, o_misc) == 108, "found %lld\n",
1500                  (long long)(int)offsetof(struct obdo, o_misc));
1501         LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, "found %lld\n",
1502                  (long long)(int)sizeof(((struct obdo *)0)->o_misc));
1503         LASSERTF((int)offsetof(struct obdo, o_ioepoch) == 112, "found %lld\n",
1504                  (long long)(int)offsetof(struct obdo, o_ioepoch));
1505         LASSERTF((int)sizeof(((struct obdo *)0)->o_ioepoch) == 8, "found %lld\n",
1506                  (long long)(int)sizeof(((struct obdo *)0)->o_ioepoch));
1507         LASSERTF((int)offsetof(struct obdo, o_stripe_idx) == 120, "found %lld\n",
1508                  (long long)(int)offsetof(struct obdo, o_stripe_idx));
1509         LASSERTF((int)sizeof(((struct obdo *)0)->o_stripe_idx) == 4, "found %lld\n",
1510                  (long long)(int)sizeof(((struct obdo *)0)->o_stripe_idx));
1511         LASSERTF((int)offsetof(struct obdo, o_parent_ver) == 124, "found %lld\n",
1512                  (long long)(int)offsetof(struct obdo, o_parent_ver));
1513         LASSERTF((int)sizeof(((struct obdo *)0)->o_parent_ver) == 4, "found %lld\n",
1514                  (long long)(int)sizeof(((struct obdo *)0)->o_parent_ver));
1515         LASSERTF((int)offsetof(struct obdo, o_handle) == 128, "found %lld\n",
1516                  (long long)(int)offsetof(struct obdo, o_handle));
1517         LASSERTF((int)sizeof(((struct obdo *)0)->o_handle) == 8, "found %lld\n",
1518                  (long long)(int)sizeof(((struct obdo *)0)->o_handle));
1519         LASSERTF((int)offsetof(struct obdo, o_layout) == 136, "found %lld\n",
1520                  (long long)(int)offsetof(struct obdo, o_layout));
1521         LASSERTF((int)sizeof(((struct obdo *)0)->o_layout) == 28, "found %lld\n",
1522                  (long long)(int)sizeof(((struct obdo *)0)->o_layout));
1523         LASSERTF((int)offsetof(struct obdo, o_layout_version) == 164, "found %lld\n",
1524                  (long long)(int)offsetof(struct obdo, o_layout_version));
1525         LASSERTF((int)sizeof(((struct obdo *)0)->o_layout_version) == 4, "found %lld\n",
1526                  (long long)(int)sizeof(((struct obdo *)0)->o_layout_version));
1527         LASSERTF((int)offsetof(struct obdo, o_uid_h) == 168, "found %lld\n",
1528                  (long long)(int)offsetof(struct obdo, o_uid_h));
1529         LASSERTF((int)sizeof(((struct obdo *)0)->o_uid_h) == 4, "found %lld\n",
1530                  (long long)(int)sizeof(((struct obdo *)0)->o_uid_h));
1531         LASSERTF((int)offsetof(struct obdo, o_gid_h) == 172, "found %lld\n",
1532                  (long long)(int)offsetof(struct obdo, o_gid_h));
1533         LASSERTF((int)sizeof(((struct obdo *)0)->o_gid_h) == 4, "found %lld\n",
1534                  (long long)(int)sizeof(((struct obdo *)0)->o_gid_h));
1535         LASSERTF((int)offsetof(struct obdo, o_data_version) == 176, "found %lld\n",
1536                  (long long)(int)offsetof(struct obdo, o_data_version));
1537         LASSERTF((int)sizeof(((struct obdo *)0)->o_data_version) == 8, "found %lld\n",
1538                  (long long)(int)sizeof(((struct obdo *)0)->o_data_version));
1539         LASSERTF((int)offsetof(struct obdo, o_projid) == 184, "found %lld\n",
1540                  (long long)(int)offsetof(struct obdo, o_projid));
1541         LASSERTF((int)sizeof(((struct obdo *)0)->o_projid) == 4, "found %lld\n",
1542                  (long long)(int)sizeof(((struct obdo *)0)->o_projid));
1543         LASSERTF((int)offsetof(struct obdo, o_padding_4) == 188, "found %lld\n",
1544                  (long long)(int)offsetof(struct obdo, o_padding_4));
1545         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 4, "found %lld\n",
1546                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_4));
1547         LASSERTF((int)offsetof(struct obdo, o_padding_5) == 192, "found %lld\n",
1548                  (long long)(int)offsetof(struct obdo, o_padding_5));
1549         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, "found %lld\n",
1550                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_5));
1551         LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, "found %lld\n",
1552                  (long long)(int)offsetof(struct obdo, o_padding_6));
1553         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, "found %lld\n",
1554                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_6));
1555         LASSERTF(OBD_MD_FLID == (0x00000001ULL), "found 0x%.16llxULL\n",
1556                  OBD_MD_FLID);
1557         LASSERTF(OBD_MD_FLATIME == (0x00000002ULL), "found 0x%.16llxULL\n",
1558                  OBD_MD_FLATIME);
1559         LASSERTF(OBD_MD_FLMTIME == (0x00000004ULL), "found 0x%.16llxULL\n",
1560                  OBD_MD_FLMTIME);
1561         LASSERTF(OBD_MD_FLCTIME == (0x00000008ULL), "found 0x%.16llxULL\n",
1562                  OBD_MD_FLCTIME);
1563         LASSERTF(OBD_MD_FLSIZE == (0x00000010ULL), "found 0x%.16llxULL\n",
1564                  OBD_MD_FLSIZE);
1565         LASSERTF(OBD_MD_FLBLOCKS == (0x00000020ULL), "found 0x%.16llxULL\n",
1566                  OBD_MD_FLBLOCKS);
1567         LASSERTF(OBD_MD_FLBLKSZ == (0x00000040ULL), "found 0x%.16llxULL\n",
1568                  OBD_MD_FLBLKSZ);
1569         LASSERTF(OBD_MD_FLMODE == (0x00000080ULL), "found 0x%.16llxULL\n",
1570                  OBD_MD_FLMODE);
1571         LASSERTF(OBD_MD_FLTYPE == (0x00000100ULL), "found 0x%.16llxULL\n",
1572                  OBD_MD_FLTYPE);
1573         LASSERTF(OBD_MD_FLUID == (0x00000200ULL), "found 0x%.16llxULL\n",
1574                  OBD_MD_FLUID);
1575         LASSERTF(OBD_MD_FLGID == (0x00000400ULL), "found 0x%.16llxULL\n",
1576                  OBD_MD_FLGID);
1577         LASSERTF(OBD_MD_FLFLAGS == (0x00000800ULL), "found 0x%.16llxULL\n",
1578                  OBD_MD_FLFLAGS);
1579         LASSERTF(OBD_MD_DOM_SIZE == (0X00001000ULL), "found 0x%.16llxULL\n",
1580                  OBD_MD_DOM_SIZE);
1581         LASSERTF(OBD_MD_FLNLINK == (0x00002000ULL), "found 0x%.16llxULL\n",
1582                  OBD_MD_FLNLINK);
1583         LASSERTF(OBD_MD_FLPARENT == (0x00004000ULL), "found 0x%.16llxULL\n",
1584                  OBD_MD_FLPARENT);
1585         LASSERTF(OBD_MD_FLRDEV == (0x00010000ULL), "found 0x%.16llxULL\n",
1586                  OBD_MD_FLRDEV);
1587         LASSERTF(OBD_MD_FLEASIZE == (0x00020000ULL), "found 0x%.16llxULL\n",
1588                  OBD_MD_FLEASIZE);
1589         LASSERTF(OBD_MD_LINKNAME == (0x00040000ULL), "found 0x%.16llxULL\n",
1590                  OBD_MD_LINKNAME);
1591         LASSERTF(OBD_MD_FLHANDLE == (0x00080000ULL), "found 0x%.16llxULL\n",
1592                  OBD_MD_FLHANDLE);
1593         LASSERTF(OBD_MD_FLCKSUM == (0x00100000ULL), "found 0x%.16llxULL\n",
1594                  OBD_MD_FLCKSUM);
1595         LASSERTF(OBD_MD_FLPRJQUOTA == (0x00400000ULL), "found 0x%.16llxULL\n",
1596                  OBD_MD_FLPRJQUOTA);
1597         LASSERTF(OBD_MD_FLGROUP == (0x01000000ULL), "found 0x%.16llxULL\n",
1598                  OBD_MD_FLGROUP);
1599         LASSERTF(OBD_MD_FLFID == (0x02000000ULL), "found 0x%.16llxULL\n",
1600                  OBD_MD_FLFID);
1601         LASSERTF(OBD_MD_FLGRANT == (0x08000000ULL), "found 0x%.16llxULL\n",
1602                  OBD_MD_FLGRANT);
1603         LASSERTF(OBD_MD_FLDIREA == (0x10000000ULL), "found 0x%.16llxULL\n",
1604                  OBD_MD_FLDIREA);
1605         LASSERTF(OBD_MD_FLUSRQUOTA == (0x20000000ULL), "found 0x%.16llxULL\n",
1606                  OBD_MD_FLUSRQUOTA);
1607         LASSERTF(OBD_MD_FLGRPQUOTA == (0x40000000ULL), "found 0x%.16llxULL\n",
1608                  OBD_MD_FLGRPQUOTA);
1609         LASSERTF(OBD_MD_FLMODEASIZE == (0x80000000ULL), "found 0x%.16llxULL\n",
1610                  OBD_MD_FLMODEASIZE);
1611         LASSERTF(OBD_MD_MDS == (0x0000000100000000ULL), "found 0x%.16llxULL\n",
1612                  OBD_MD_MDS);
1613         LASSERTF(OBD_MD_MEA == (0x0000000400000000ULL), "found 0x%.16llxULL\n",
1614                  OBD_MD_MEA);
1615         LASSERTF(OBD_MD_TSTATE == (0x0000000800000000ULL), "found 0x%.16llxULL\n",
1616                  OBD_MD_TSTATE);
1617         LASSERTF(OBD_MD_FLXATTR == (0x0000001000000000ULL), "found 0x%.16llxULL\n",
1618                  OBD_MD_FLXATTR);
1619         LASSERTF(OBD_MD_FLXATTRLS == (0x0000002000000000ULL), "found 0x%.16llxULL\n",
1620                  OBD_MD_FLXATTRLS);
1621         LASSERTF(OBD_MD_FLXATTRRM == (0x0000004000000000ULL), "found 0x%.16llxULL\n",
1622                  OBD_MD_FLXATTRRM);
1623         LASSERTF(OBD_MD_FLACL == (0x0000008000000000ULL), "found 0x%.16llxULL\n",
1624                  OBD_MD_FLACL);
1625         LASSERTF(OBD_MD_FLAGSTATFS == (0x0000010000000000ULL), "found 0x%.16llxULL\n",
1626                  OBD_MD_FLAGSTATFS);
1627         LASSERTF(OBD_MD_FLCROSSREF == (0x0000100000000000ULL), "found 0x%.16llxULL\n",
1628                  OBD_MD_FLCROSSREF);
1629         LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n",
1630                  OBD_MD_FLGETATTRLOCK);
1631         LASSERTF(OBD_MD_FLOBJCOUNT == (0x0000400000000000ULL), "found 0x%.16llxULL\n",
1632                  OBD_MD_FLOBJCOUNT);
1633         LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n",
1634                  OBD_MD_FLDATAVERSION);
1635         LASSERTF(OBD_MD_CLOSE_INTENT_EXECED == (0x0020000000000000ULL), "found 0x%.16llxULL\n",
1636                  OBD_MD_CLOSE_INTENT_EXECED);
1637         LASSERTF(OBD_MD_DEFAULT_MEA == (0x0040000000000000ULL), "found 0x%.16llxULL\n",
1638                  OBD_MD_DEFAULT_MEA);
1639         LASSERTF(OBD_MD_FLOSTLAYOUT == (0x0080000000000000ULL), "found 0x%.16llxULL\n",
1640                  OBD_MD_FLOSTLAYOUT);
1641         LASSERTF(OBD_MD_FLPROJID == (0x0100000000000000ULL), "found 0x%.16llxULL\n",
1642                  OBD_MD_FLPROJID);
1643         LASSERTF(OBD_MD_SECCTX == (0x0200000000000000ULL), "found 0x%.16llxULL\n",
1644                  OBD_MD_SECCTX);
1645         LASSERTF(OBD_MD_FLLAZYSIZE == (0x0400000000000000ULL), "found 0x%.16llxULL\n",
1646                  OBD_MD_FLLAZYSIZE);
1647         LASSERTF(OBD_MD_FLLAZYBLOCKS == (0x0800000000000000ULL), "found 0x%.16llxULL\n",
1648                  OBD_MD_FLLAZYBLOCKS);
1649         LASSERTF(OBD_MD_ENCCTX == (0x2000000000000000ULL), "found 0x%.16llxULL\n",
1650                  OBD_MD_ENCCTX);
1651         BUILD_BUG_ON(OBD_FL_INLINEDATA != 0x00000001);
1652         BUILD_BUG_ON(OBD_FL_OBDMDEXISTS != 0x00000002);
1653         BUILD_BUG_ON(OBD_FL_DELORPHAN != 0x00000004);
1654         BUILD_BUG_ON(OBD_FL_NORPC != 0x00000008);
1655         BUILD_BUG_ON(OBD_FL_IDONLY != 0x00000010);
1656         BUILD_BUG_ON(OBD_FL_RECREATE_OBJS != 0x00000020);
1657         BUILD_BUG_ON(OBD_FL_DEBUG_CHECK != 0x00000040);
1658         BUILD_BUG_ON(OBD_FL_NO_PRJQUOTA != 0x00000080);
1659         BUILD_BUG_ON(OBD_FL_NO_USRQUOTA != 0x00000100);
1660         BUILD_BUG_ON(OBD_FL_NO_GRPQUOTA != 0x00000200);
1661         BUILD_BUG_ON(OBD_FL_CREATE_CROW != 0x00000400);
1662         BUILD_BUG_ON(OBD_FL_SRVLOCK != 0x00000800);
1663         BUILD_BUG_ON(OBD_FL_CKSUM_CRC32 != 0x00001000);
1664         BUILD_BUG_ON(OBD_FL_CKSUM_ADLER != 0x00002000);
1665         BUILD_BUG_ON(OBD_FL_CKSUM_CRC32C != 0x00004000);
1666         BUILD_BUG_ON(OBD_FL_CKSUM_T10IP512 != 0x00005000);
1667         BUILD_BUG_ON(OBD_FL_CKSUM_T10IP4K != 0x00006000);
1668         BUILD_BUG_ON(OBD_FL_CKSUM_T10CRC512 != 0x00007000);
1669         BUILD_BUG_ON(OBD_FL_CKSUM_T10CRC4K != 0x00008000);
1670         BUILD_BUG_ON(OBD_FL_CKSUM_RSVD3 != 0x00010000);
1671         BUILD_BUG_ON(OBD_FL_SHRINK_GRANT != 0x00020000);
1672         BUILD_BUG_ON(OBD_FL_MMAP != 0x00040000);
1673         BUILD_BUG_ON(OBD_FL_RECOV_RESEND != 0x00080000);
1674         BUILD_BUG_ON(OBD_FL_NOSPC_BLK != 0x00100000);
1675         BUILD_BUG_ON(OBD_FL_FLUSH != 0x00200000);
1676         BUILD_BUG_ON(OBD_FL_SHORT_IO != 0x00400000);
1677
1678         /* Checks for struct lov_ost_data_v1 */
1679         LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, "found %lld\n",
1680                  (long long)(int)sizeof(struct lov_ost_data_v1));
1681         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_oi) == 0, "found %lld\n",
1682                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_oi));
1683         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi) == 16, "found %lld\n",
1684                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_oi));
1685         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, "found %lld\n",
1686                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
1687         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, "found %lld\n",
1688                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
1689         LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, "found %lld\n",
1690                  (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
1691         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, "found %lld\n",
1692                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
1693
1694         /* Checks for struct lov_mds_md_v1 */
1695         LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, "found %lld\n",
1696                  (long long)(int)sizeof(struct lov_mds_md_v1));
1697         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, "found %lld\n",
1698                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
1699         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, "found %lld\n",
1700                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
1701         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, "found %lld\n",
1702                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
1703         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, "found %lld\n",
1704                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
1705         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_oi) == 8, "found %lld\n",
1706                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_oi));
1707         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi) == 16, "found %lld\n",
1708                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_oi));
1709         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, "found %lld\n",
1710                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
1711         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, "found %lld\n",
1712                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
1713         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, "found %lld\n",
1714                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
1715         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 2, "found %lld\n",
1716                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
1717         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_layout_gen) == 30, "found %lld\n",
1718                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_layout_gen));
1719         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_layout_gen) == 2, "found %lld\n",
1720                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_layout_gen));
1721         LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects[0]) == 32, "found %lld\n",
1722                  (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects[0]));
1723         LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]) == 24, "found %lld\n",
1724                  (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]));
1725         BUILD_BUG_ON(LOV_MAGIC_V1 != (0x0BD10000 | 0x0BD0));
1726
1727         /* Checks for struct lov_mds_md_v3 */
1728         LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, "found %lld\n",
1729                  (long long)(int)sizeof(struct lov_mds_md_v3));
1730         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_magic) == 0, "found %lld\n",
1731                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_magic));
1732         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_magic) == 4, "found %lld\n",
1733                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_magic));
1734         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pattern) == 4, "found %lld\n",
1735                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_pattern));
1736         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern) == 4, "found %lld\n",
1737                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pattern));
1738         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_oi) == 8, "found %lld\n",
1739                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_oi));
1740         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi) == 16, "found %lld\n",
1741                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_oi));
1742         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_size) == 24, "found %lld\n",
1743                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_size));
1744         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size) == 4, "found %lld\n",
1745                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_size));
1746         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_stripe_count) == 28, "found %lld\n",
1747                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_stripe_count));
1748         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_count) == 2, "found %lld\n",
1749                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_stripe_count));
1750         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_layout_gen) == 30, "found %lld\n",
1751                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_layout_gen));
1752         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen) == 2, "found %lld\n",
1753                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen));
1754         BUILD_BUG_ON(LOV_MAXPOOLNAME != 15);
1755         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pool_name[15 + 1]) == 48, "found %lld\n",
1756                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_pool_name[15 + 1]));
1757         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name[15 + 1]) == 1, "found %lld\n",
1758                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name[15 + 1]));
1759         LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_objects[0]) == 48, "found %lld\n",
1760                  (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects[0]));
1761         LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]) == 24, "found %lld\n",
1762                  (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]));
1763         BUILD_BUG_ON(LOV_MAGIC_V3 != (0x0BD30000 | 0x0BD0));
1764         LASSERTF(LOV_PATTERN_RAID0 == 0x00000001UL, "found 0x%.8xUL\n",
1765                 (unsigned)LOV_PATTERN_RAID0);
1766         LASSERTF(LOV_PATTERN_RAID1 == 0x00000002UL, "found 0x%.8xUL\n",
1767                 (unsigned)LOV_PATTERN_RAID1);
1768         LASSERTF(LOV_PATTERN_MDT == 0x00000100UL, "found 0x%.8xUL\n",
1769                 (unsigned)LOV_PATTERN_MDT);
1770         LASSERTF(LOV_PATTERN_OVERSTRIPING == 0x00000200UL, "found 0x%.8xUL\n",
1771                 (unsigned)LOV_PATTERN_OVERSTRIPING);
1772
1773         /* Checks for struct lov_comp_md_entry_v1 */
1774         LASSERTF((int)sizeof(struct lov_comp_md_entry_v1) == 48, "found %lld\n",
1775                  (long long)(int)sizeof(struct lov_comp_md_entry_v1));
1776         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_id) == 0, "found %lld\n",
1777                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_id));
1778         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_id) == 4, "found %lld\n",
1779                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_id));
1780         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_flags) == 4, "found %lld\n",
1781                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_flags));
1782         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_flags) == 4, "found %lld\n",
1783                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_flags));
1784         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_extent) == 8, "found %lld\n",
1785                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_extent));
1786         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_extent) == 16, "found %lld\n",
1787                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_extent));
1788         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_offset) == 24, "found %lld\n",
1789                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_offset));
1790         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_offset) == 4, "found %lld\n",
1791                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_offset));
1792         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_size) == 28, "found %lld\n",
1793                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_size));
1794         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size) == 4, "found %lld\n",
1795                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size));
1796         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen) == 32, "found %lld\n",
1797                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen));
1798         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen) == 4, "found %lld\n",
1799                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen));
1800         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp) == 36, "found %lld\n",
1801                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_timestamp));
1802         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp) == 8, "found %lld\n",
1803                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_timestamp));
1804         LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 44, "found %lld\n",
1805                  (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1));
1806         LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1) == 4, "found %lld\n",
1807                  (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1));
1808         BUILD_BUG_ON(LCME_FL_STALE != 0x00000001);
1809         BUILD_BUG_ON(LCME_FL_PREF_RD != 0x00000002);
1810         BUILD_BUG_ON(LCME_FL_PREF_WR != 0x00000004);
1811         BUILD_BUG_ON(LCME_FL_PREF_RW != 0x00000006);
1812         BUILD_BUG_ON(LCME_FL_OFFLINE != 0x00000008);
1813         BUILD_BUG_ON(LCME_FL_INIT != 0x00000010);
1814         BUILD_BUG_ON(LCME_FL_NOSYNC != 0x00000020);
1815         BUILD_BUG_ON(LCME_FL_EXTENSION != 0x00000040);
1816         BUILD_BUG_ON(LCME_FL_NEG != 0x80000000);
1817
1818         /* Checks for struct lov_comp_md_v1 */
1819         LASSERTF((int)sizeof(struct lov_comp_md_v1) == 32, "found %lld\n",
1820                  (long long)(int)sizeof(struct lov_comp_md_v1));
1821         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_magic) == 0, "found %lld\n",
1822                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_magic));
1823         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_magic) == 4, "found %lld\n",
1824                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_magic));
1825         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_size) == 4, "found %lld\n",
1826                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_size));
1827         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_size) == 4, "found %lld\n",
1828                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_size));
1829         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_layout_gen) == 8, "found %lld\n",
1830                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_layout_gen));
1831         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_layout_gen) == 4, "found %lld\n",
1832                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_layout_gen));
1833         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_flags) == 12, "found %lld\n",
1834                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_flags));
1835         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_flags) == 2, "found %lld\n",
1836                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_flags));
1837         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_entry_count) == 14, "found %lld\n",
1838                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_entry_count));
1839         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entry_count) == 2, "found %lld\n",
1840                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entry_count));
1841         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_mirror_count) == 16, "found %lld\n",
1842                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_mirror_count));
1843         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_mirror_count) == 2, "found %lld\n",
1844                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_mirror_count));
1845         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_padding1) == 18, "found %lld\n",
1846                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_padding1));
1847         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding1) == 6, "found %lld\n",
1848                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding1));
1849         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_padding2) == 24, "found %lld\n",
1850                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_padding2));
1851         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding2) == 8, "found %lld\n",
1852                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_padding2));
1853         LASSERTF((int)offsetof(struct lov_comp_md_v1, lcm_entries[0]) == 32, "found %lld\n",
1854                  (long long)(int)offsetof(struct lov_comp_md_v1, lcm_entries[0]));
1855         LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]) == 48, "found %lld\n",
1856                  (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]));
1857         BUILD_BUG_ON(LOV_MAGIC_COMP_V1 != (0x0BD60000 | 0x0BD0));
1858         LASSERTF(LCM_FL_NONE == 0, "found %lld\n",
1859                  (long long)LCM_FL_NONE);
1860         LASSERTF(LCM_FL_RDONLY == 1, "found %lld\n",
1861                  (long long)LCM_FL_RDONLY);
1862         LASSERTF(LCM_FL_WRITE_PENDING == 2, "found %lld\n",
1863                  (long long)LCM_FL_WRITE_PENDING);
1864         LASSERTF(LCM_FL_SYNC_PENDING == 3, "found %lld\n",
1865                  (long long)LCM_FL_SYNC_PENDING);
1866
1867         /* Checks for struct lmv_mds_md_v1 */
1868         LASSERTF((int)sizeof(struct lmv_mds_md_v1) == 56, "found %lld\n",
1869                  (long long)(int)sizeof(struct lmv_mds_md_v1));
1870         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_magic) == 0, "found %lld\n",
1871                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_magic));
1872         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_magic) == 4, "found %lld\n",
1873                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_magic));
1874         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_stripe_count) == 4, "found %lld\n",
1875                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_stripe_count));
1876         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_count) == 4, "found %lld\n",
1877                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_count));
1878         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_master_mdt_index) == 8, "found %lld\n",
1879                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_master_mdt_index));
1880         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_master_mdt_index) == 4, "found %lld\n",
1881                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_master_mdt_index));
1882         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_hash_type) == 12, "found %lld\n",
1883                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_hash_type));
1884         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_hash_type) == 4, "found %lld\n",
1885                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_hash_type));
1886         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_layout_version) == 16, "found %lld\n",
1887                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_layout_version));
1888         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_layout_version) == 4, "found %lld\n",
1889                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_layout_version));
1890         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_migrate_offset) == 20, "found %lld\n",
1891                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_migrate_offset));
1892         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_migrate_offset) == 4, "found %lld\n",
1893                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_migrate_offset));
1894         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_migrate_hash) == 24, "found %lld\n",
1895                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_migrate_hash));
1896         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_migrate_hash) == 4, "found %lld\n",
1897                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_migrate_hash));
1898         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_padding2) == 28, "found %lld\n",
1899                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_padding2));
1900         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding2) == 4, "found %lld\n",
1901                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding2));
1902         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_padding3) == 32, "found %lld\n",
1903                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_padding3));
1904         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3) == 8, "found %lld\n",
1905                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3));
1906         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]) == 55, "found %lld\n",
1907                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]));
1908         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]) == 1, "found %lld\n",
1909                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]));
1910         LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]) == 56, "found %lld\n",
1911                  (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]));
1912         LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_fids[0]) == 16, "found %lld\n",
1913                  (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_fids[0]));
1914         BUILD_BUG_ON(LMV_MAGIC_V1 != 0x0CD20CD0);
1915         BUILD_BUG_ON(LMV_MAGIC_STRIPE != 0x0CD40CD0);
1916         BUILD_BUG_ON(LMV_HASH_TYPE_MASK != 0x0000ffff);
1917         BUILD_BUG_ON(LMV_HASH_FLAG_FIXED != 0x02000000);
1918         BUILD_BUG_ON(LMV_HASH_FLAG_MERGE != 0x04000000);
1919         BUILD_BUG_ON(LMV_HASH_FLAG_SPLIT != 0x08000000);
1920         BUILD_BUG_ON(LMV_HASH_FLAG_LOST_LMV != 0x10000000);
1921         BUILD_BUG_ON(LMV_HASH_FLAG_BAD_TYPE != 0x20000000);
1922         BUILD_BUG_ON(LMV_HASH_FLAG_MIGRATION != 0x80000000);
1923         BUILD_BUG_ON(LMV_HASH_FLAG_MIGRATION != 0x80000000);
1924         BUILD_BUG_ON(LMV_CRUSH_PG_COUNT != 4096);
1925
1926         /* Checks for struct obd_statfs */
1927         LASSERTF((int)sizeof(struct obd_statfs) == 144, "found %lld\n",
1928                  (long long)(int)sizeof(struct obd_statfs));
1929         LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, "found %lld\n",
1930                  (long long)(int)offsetof(struct obd_statfs, os_type));
1931         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, "found %lld\n",
1932                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
1933         LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, "found %lld\n",
1934                  (long long)(int)offsetof(struct obd_statfs, os_blocks));
1935         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, "found %lld\n",
1936                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
1937         LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, "found %lld\n",
1938                  (long long)(int)offsetof(struct obd_statfs, os_bfree));
1939         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, "found %lld\n",
1940                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
1941         LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, "found %lld\n",
1942                  (long long)(int)offsetof(struct obd_statfs, os_bavail));
1943         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, "found %lld\n",
1944                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
1945         LASSERTF((int)offsetof(struct obd_statfs, os_files) == 32, "found %lld\n",
1946                  (long long)(int)offsetof(struct obd_statfs, os_files));
1947         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_files) == 8, "found %lld\n",
1948                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_files));
1949         LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, "found %lld\n",
1950                  (long long)(int)offsetof(struct obd_statfs, os_ffree));
1951         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, "found %lld\n",
1952                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
1953         LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, "found %lld\n",
1954                  (long long)(int)offsetof(struct obd_statfs, os_fsid));
1955         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, "found %lld\n",
1956                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
1957         LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, "found %lld\n",
1958                  (long long)(int)offsetof(struct obd_statfs, os_bsize));
1959         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, "found %lld\n",
1960                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
1961         LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, "found %lld\n",
1962                  (long long)(int)offsetof(struct obd_statfs, os_namelen));
1963         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, "found %lld\n",
1964                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
1965         LASSERTF((int)offsetof(struct obd_statfs, os_maxbytes) == 96, "found %lld\n",
1966                  (long long)(int)offsetof(struct obd_statfs, os_maxbytes));
1967         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_maxbytes) == 8, "found %lld\n",
1968                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_maxbytes));
1969         LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, "found %lld\n",
1970                  (long long)(int)offsetof(struct obd_statfs, os_state));
1971         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, "found %lld\n",
1972                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_state));
1973         LASSERTF((int)offsetof(struct obd_statfs, os_fprecreated) == 108, "found %lld\n",
1974                  (long long)(int)offsetof(struct obd_statfs, os_fprecreated));
1975         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fprecreated) == 4, "found %lld\n",
1976                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_fprecreated));
1977         LASSERTF((int)offsetof(struct obd_statfs, os_granted) == 112, "found %lld\n",
1978                  (long long)(int)offsetof(struct obd_statfs, os_granted));
1979         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_granted) == 4, "found %lld\n",
1980                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_granted));
1981         LASSERTF((int)offsetof(struct obd_statfs, os_spare3) == 116, "found %lld\n",
1982                  (long long)(int)offsetof(struct obd_statfs, os_spare3));
1983         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare3) == 4, "found %lld\n",
1984                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare3));
1985         LASSERTF((int)offsetof(struct obd_statfs, os_spare4) == 120, "found %lld\n",
1986                  (long long)(int)offsetof(struct obd_statfs, os_spare4));
1987         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare4) == 4, "found %lld\n",
1988                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare4));
1989         LASSERTF((int)offsetof(struct obd_statfs, os_spare5) == 124, "found %lld\n",
1990                  (long long)(int)offsetof(struct obd_statfs, os_spare5));
1991         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare5) == 4, "found %lld\n",
1992                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare5));
1993         LASSERTF((int)offsetof(struct obd_statfs, os_spare6) == 128, "found %lld\n",
1994                  (long long)(int)offsetof(struct obd_statfs, os_spare6));
1995         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare6) == 4, "found %lld\n",
1996                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare6));
1997         LASSERTF((int)offsetof(struct obd_statfs, os_spare7) == 132, "found %lld\n",
1998                  (long long)(int)offsetof(struct obd_statfs, os_spare7));
1999         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare7) == 4, "found %lld\n",
2000                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare7));
2001         LASSERTF((int)offsetof(struct obd_statfs, os_spare8) == 136, "found %lld\n",
2002                  (long long)(int)offsetof(struct obd_statfs, os_spare8));
2003         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare8) == 4, "found %lld\n",
2004                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare8));
2005         LASSERTF((int)offsetof(struct obd_statfs, os_spare9) == 140, "found %lld\n",
2006                  (long long)(int)offsetof(struct obd_statfs, os_spare9));
2007         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare9) == 4, "found %lld\n",
2008                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare9));
2009         LASSERTF(OS_STATFS_DEGRADED == 0x00000001UL, "found 0x%.8xUL\n",
2010                 (unsigned)OS_STATFS_DEGRADED);
2011         LASSERTF(OS_STATFS_READONLY == 0x00000002UL, "found 0x%.8xUL\n",
2012                 (unsigned)OS_STATFS_READONLY);
2013         LASSERTF(OS_STATFS_NOPRECREATE == 0x00000004UL, "found 0x%.8xUL\n",
2014                 (unsigned)OS_STATFS_NOPRECREATE);
2015         LASSERTF(OS_STATFS_ENOSPC == 0x00000020UL, "found 0x%.8xUL\n",
2016                 (unsigned)OS_STATFS_ENOSPC);
2017         LASSERTF(OS_STATFS_ENOINO == 0x00000040UL, "found 0x%.8xUL\n",
2018                 (unsigned)OS_STATFS_ENOINO);
2019         LASSERTF(OS_STATFS_SUM == 0x00000100UL, "found 0x%.8xUL\n",
2020                 (unsigned)OS_STATFS_SUM);
2021         LASSERTF(OS_STATFS_NONROT == 0x00000200UL, "found 0x%.8xUL\n",
2022                 (unsigned)OS_STATFS_NONROT);
2023
2024         /* Checks for struct obd_ioobj */
2025         LASSERTF((int)sizeof(struct obd_ioobj) == 24, "found %lld\n",
2026                  (long long)(int)sizeof(struct obd_ioobj));
2027         LASSERTF((int)offsetof(struct obd_ioobj, ioo_oid) == 0, "found %lld\n",
2028                  (long long)(int)offsetof(struct obd_ioobj, ioo_oid));
2029         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_oid) == 16, "found %lld\n",
2030                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_oid));
2031         LASSERTF((int)offsetof(struct obd_ioobj, ioo_max_brw) == 16, "found %lld\n",
2032                  (long long)(int)offsetof(struct obd_ioobj, ioo_max_brw));
2033         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_max_brw) == 4, "found %lld\n",
2034                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_max_brw));
2035         LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, "found %lld\n",
2036                  (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
2037         LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, "found %lld\n",
2038                  (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
2039         LASSERTF(IOOBJ_MAX_BRW_BITS == 16, "found %lld\n",
2040                  (long long)IOOBJ_MAX_BRW_BITS);
2041
2042         /* Checks for union lquota_id */
2043         LASSERTF((int)sizeof(union lquota_id) == 16, "found %lld\n",
2044                  (long long)(int)sizeof(union lquota_id));
2045
2046         LASSERTF(QUOTABLOCK_BITS == 10, "found %lld\n",
2047                  (long long)QUOTABLOCK_BITS);
2048         LASSERTF(QUOTABLOCK_SIZE == 1024, "found %lld\n",
2049                  (long long)QUOTABLOCK_SIZE);
2050
2051         /* Checks for struct obd_quotactl */
2052         LASSERTF((int)sizeof(struct obd_quotactl) == 112, "found %lld\n",
2053                  (long long)(int)sizeof(struct obd_quotactl));
2054         LASSERTF((int)offsetof(struct obd_quotactl, qc_cmd) == 0, "found %lld\n",
2055                  (long long)(int)offsetof(struct obd_quotactl, qc_cmd));
2056         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_cmd) == 4, "found %lld\n",
2057                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_cmd));
2058         LASSERTF((int)offsetof(struct obd_quotactl, qc_type) == 4, "found %lld\n",
2059                  (long long)(int)offsetof(struct obd_quotactl, qc_type));
2060         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_type) == 4, "found %lld\n",
2061                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_type));
2062         LASSERTF((int)offsetof(struct obd_quotactl, qc_id) == 8, "found %lld\n",
2063                  (long long)(int)offsetof(struct obd_quotactl, qc_id));
2064         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_id) == 4, "found %lld\n",
2065                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_id));
2066         LASSERTF((int)offsetof(struct obd_quotactl, qc_stat) == 12, "found %lld\n",
2067                  (long long)(int)offsetof(struct obd_quotactl, qc_stat));
2068         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_stat) == 4, "found %lld\n",
2069                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_stat));
2070         LASSERTF((int)offsetof(struct obd_quotactl, qc_dqinfo) == 16, "found %lld\n",
2071                  (long long)(int)offsetof(struct obd_quotactl, qc_dqinfo));
2072         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo) == 24, "found %lld\n",
2073                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo));
2074         LASSERTF((int)offsetof(struct obd_quotactl, qc_dqblk) == 40, "found %lld\n",
2075                  (long long)(int)offsetof(struct obd_quotactl, qc_dqblk));
2076         LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqblk) == 72, "found %lld\n",
2077                  (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqblk));
2078
2079         /* Checks for struct obd_dqinfo */
2080         LASSERTF((int)sizeof(struct obd_dqinfo) == 24, "found %lld\n",
2081                  (long long)(int)sizeof(struct obd_dqinfo));
2082         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_bgrace) == 0, "found %lld\n",
2083                  (long long)(int)offsetof(struct obd_dqinfo, dqi_bgrace));
2084         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace) == 8, "found %lld\n",
2085                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace));
2086         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_igrace) == 8, "found %lld\n",
2087                  (long long)(int)offsetof(struct obd_dqinfo, dqi_igrace));
2088         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace) == 8, "found %lld\n",
2089                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace));
2090         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_flags) == 16, "found %lld\n",
2091                  (long long)(int)offsetof(struct obd_dqinfo, dqi_flags));
2092         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_flags) == 4, "found %lld\n",
2093                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_flags));
2094         LASSERTF((int)offsetof(struct obd_dqinfo, dqi_valid) == 20, "found %lld\n",
2095                  (long long)(int)offsetof(struct obd_dqinfo, dqi_valid));
2096         LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_valid) == 4, "found %lld\n",
2097                  (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_valid));
2098
2099         /* Checks for struct obd_dqblk */
2100         LASSERTF((int)sizeof(struct obd_dqblk) == 72, "found %lld\n",
2101                  (long long)(int)sizeof(struct obd_dqblk));
2102         LASSERTF((int)offsetof(struct obd_dqblk, dqb_bhardlimit) == 0, "found %lld\n",
2103                  (long long)(int)offsetof(struct obd_dqblk, dqb_bhardlimit));
2104         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit) == 8, "found %lld\n",
2105                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit));
2106         LASSERTF((int)offsetof(struct obd_dqblk, dqb_bsoftlimit) == 8, "found %lld\n",
2107                  (long long)(int)offsetof(struct obd_dqblk, dqb_bsoftlimit));
2108         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit) == 8, "found %lld\n",
2109                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit));
2110         LASSERTF((int)offsetof(struct obd_dqblk, dqb_curspace) == 16, "found %lld\n",
2111                  (long long)(int)offsetof(struct obd_dqblk, dqb_curspace));
2112         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curspace) == 8, "found %lld\n",
2113                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curspace));
2114         LASSERTF((int)offsetof(struct obd_dqblk, dqb_ihardlimit) == 24, "found %lld\n",
2115                  (long long)(int)offsetof(struct obd_dqblk, dqb_ihardlimit));
2116         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit) == 8, "found %lld\n",
2117                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit));
2118         LASSERTF((int)offsetof(struct obd_dqblk, dqb_isoftlimit) == 32, "found %lld\n",
2119                  (long long)(int)offsetof(struct obd_dqblk, dqb_isoftlimit));
2120         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit) == 8, "found %lld\n",
2121                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit));
2122         LASSERTF((int)offsetof(struct obd_dqblk, dqb_curinodes) == 40, "found %lld\n",
2123                  (long long)(int)offsetof(struct obd_dqblk, dqb_curinodes));
2124         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes) == 8, "found %lld\n",
2125                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes));
2126         LASSERTF((int)offsetof(struct obd_dqblk, dqb_btime) == 48, "found %lld\n",
2127                  (long long)(int)offsetof(struct obd_dqblk, dqb_btime));
2128         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_btime) == 8, "found %lld\n",
2129                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_btime));
2130         LASSERTF((int)offsetof(struct obd_dqblk, dqb_itime) == 56, "found %lld\n",
2131                  (long long)(int)offsetof(struct obd_dqblk, dqb_itime));
2132         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_itime) == 8, "found %lld\n",
2133                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_itime));
2134         LASSERTF((int)offsetof(struct obd_dqblk, dqb_valid) == 64, "found %lld\n",
2135                  (long long)(int)offsetof(struct obd_dqblk, dqb_valid));
2136         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_valid) == 4, "found %lld\n",
2137                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_valid));
2138         LASSERTF((int)offsetof(struct obd_dqblk, dqb_padding) == 68, "found %lld\n",
2139                  (long long)(int)offsetof(struct obd_dqblk, dqb_padding));
2140         LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_padding) == 4, "found %lld\n",
2141                  (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_padding));
2142         LASSERTF(Q_QUOTACHECK == 0x800100, "found 0x%.8x\n",
2143                 Q_QUOTACHECK);
2144         LASSERTF(Q_INITQUOTA == 0x800101, "found 0x%.8x\n",
2145                 Q_INITQUOTA);
2146         LASSERTF(Q_GETOINFO == 0x800102, "found 0x%.8x\n",
2147                 Q_GETOINFO);
2148         LASSERTF(Q_GETOQUOTA == 0x800103, "found 0x%.8x\n",
2149                 Q_GETOQUOTA);
2150         LASSERTF(Q_FINVALIDATE == 0x800104, "found 0x%.8x\n",
2151                 Q_FINVALIDATE);
2152
2153         /* Checks for struct lquota_acct_rec */
2154         LASSERTF((int)sizeof(struct lquota_acct_rec) == 16, "found %lld\n",
2155                  (long long)(int)sizeof(struct lquota_acct_rec));
2156         LASSERTF((int)offsetof(struct lquota_acct_rec, bspace) == 0, "found %lld\n",
2157                  (long long)(int)offsetof(struct lquota_acct_rec, bspace));
2158         LASSERTF((int)sizeof(((struct lquota_acct_rec *)0)->bspace) == 8, "found %lld\n",
2159                  (long long)(int)sizeof(((struct lquota_acct_rec *)0)->bspace));
2160         LASSERTF((int)offsetof(struct lquota_acct_rec, ispace) == 8, "found %lld\n",
2161                  (long long)(int)offsetof(struct lquota_acct_rec, ispace));
2162         LASSERTF((int)sizeof(((struct lquota_acct_rec *)0)->ispace) == 8, "found %lld\n",
2163                  (long long)(int)sizeof(((struct lquota_acct_rec *)0)->ispace));
2164
2165         /* Checks for struct lquota_glb_rec */
2166         LASSERTF((int)sizeof(struct lquota_glb_rec) == 32, "found %lld\n",
2167                  (long long)(int)sizeof(struct lquota_glb_rec));
2168         LASSERTF((int)offsetof(struct lquota_glb_rec, qbr_hardlimit) == 0, "found %lld\n",
2169                  (long long)(int)offsetof(struct lquota_glb_rec, qbr_hardlimit));
2170         LASSERTF((int)sizeof(((struct lquota_glb_rec *)0)->qbr_hardlimit) == 8, "found %lld\n",
2171                  (long long)(int)sizeof(((struct lquota_glb_rec *)0)->qbr_hardlimit));
2172         LASSERTF((int)offsetof(struct lquota_glb_rec, qbr_softlimit) == 8, "found %lld\n",
2173                  (long long)(int)offsetof(struct lquota_glb_rec, qbr_softlimit));
2174         LASSERTF((int)sizeof(((struct lquota_glb_rec *)0)->qbr_softlimit) == 8, "found %lld\n",
2175                  (long long)(int)sizeof(((struct lquota_glb_rec *)0)->qbr_softlimit));
2176         LASSERTF((int)offsetof(struct lquota_glb_rec, qbr_time) == 16, "found %lld\n",
2177                  (long long)(int)offsetof(struct lquota_glb_rec, qbr_time));
2178         LASSERTF((int)sizeof(((struct lquota_glb_rec *)0)->qbr_time) == 8, "found %lld\n",
2179                  (long long)(int)sizeof(((struct lquota_glb_rec *)0)->qbr_time));
2180         LASSERTF((int)offsetof(struct lquota_glb_rec, qbr_granted) == 24, "found %lld\n",
2181                  (long long)(int)offsetof(struct lquota_glb_rec, qbr_granted));
2182         LASSERTF((int)sizeof(((struct lquota_glb_rec *)0)->qbr_granted) == 8, "found %lld\n",
2183                  (long long)(int)sizeof(((struct lquota_glb_rec *)0)->qbr_granted));
2184
2185         /* Checks for struct lquota_slv_rec */
2186         LASSERTF((int)sizeof(struct lquota_slv_rec) == 8, "found %lld\n",
2187                  (long long)(int)sizeof(struct lquota_slv_rec));
2188         LASSERTF((int)offsetof(struct lquota_slv_rec, qsr_granted) == 0, "found %lld\n",
2189                  (long long)(int)offsetof(struct lquota_slv_rec, qsr_granted));
2190         LASSERTF((int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted) == 8, "found %lld\n",
2191                  (long long)(int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted));
2192
2193         /* Checks for struct idx_info */
2194         LASSERTF((int)sizeof(struct idx_info) == 80, "found %lld\n",
2195                  (long long)(int)sizeof(struct idx_info));
2196         LASSERTF((int)offsetof(struct idx_info, ii_magic) == 0, "found %lld\n",
2197                  (long long)(int)offsetof(struct idx_info, ii_magic));
2198         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_magic) == 4, "found %lld\n",
2199                  (long long)(int)sizeof(((struct idx_info *)0)->ii_magic));
2200         LASSERTF((int)offsetof(struct idx_info, ii_flags) == 4, "found %lld\n",
2201                  (long long)(int)offsetof(struct idx_info, ii_flags));
2202         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_flags) == 4, "found %lld\n",
2203                  (long long)(int)sizeof(((struct idx_info *)0)->ii_flags));
2204         LASSERTF((int)offsetof(struct idx_info, ii_count) == 8, "found %lld\n",
2205                  (long long)(int)offsetof(struct idx_info, ii_count));
2206         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_count) == 2, "found %lld\n",
2207                  (long long)(int)sizeof(((struct idx_info *)0)->ii_count));
2208         LASSERTF((int)offsetof(struct idx_info, ii_pad0) == 10, "found %lld\n",
2209                  (long long)(int)offsetof(struct idx_info, ii_pad0));
2210         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_pad0) == 2, "found %lld\n",
2211                  (long long)(int)sizeof(((struct idx_info *)0)->ii_pad0));
2212         LASSERTF((int)offsetof(struct idx_info, ii_attrs) == 12, "found %lld\n",
2213                  (long long)(int)offsetof(struct idx_info, ii_attrs));
2214         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_attrs) == 4, "found %lld\n",
2215                  (long long)(int)sizeof(((struct idx_info *)0)->ii_attrs));
2216         LASSERTF((int)offsetof(struct idx_info, ii_fid) == 16, "found %lld\n",
2217                  (long long)(int)offsetof(struct idx_info, ii_fid));
2218         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_fid) == 16, "found %lld\n",
2219                  (long long)(int)sizeof(((struct idx_info *)0)->ii_fid));
2220         LASSERTF((int)offsetof(struct idx_info, ii_version) == 32, "found %lld\n",
2221                  (long long)(int)offsetof(struct idx_info, ii_version));
2222         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_version) == 8, "found %lld\n",
2223                  (long long)(int)sizeof(((struct idx_info *)0)->ii_version));
2224         LASSERTF((int)offsetof(struct idx_info, ii_hash_start) == 40, "found %lld\n",
2225                  (long long)(int)offsetof(struct idx_info, ii_hash_start));
2226         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_hash_start) == 8, "found %lld\n",
2227                  (long long)(int)sizeof(((struct idx_info *)0)->ii_hash_start));
2228         LASSERTF((int)offsetof(struct idx_info, ii_hash_end) == 48, "found %lld\n",
2229                  (long long)(int)offsetof(struct idx_info, ii_hash_end));
2230         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_hash_end) == 8, "found %lld\n",
2231                  (long long)(int)sizeof(((struct idx_info *)0)->ii_hash_end));
2232         LASSERTF((int)offsetof(struct idx_info, ii_keysize) == 56, "found %lld\n",
2233                  (long long)(int)offsetof(struct idx_info, ii_keysize));
2234         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_keysize) == 2, "found %lld\n",
2235                  (long long)(int)sizeof(((struct idx_info *)0)->ii_keysize));
2236         LASSERTF((int)offsetof(struct idx_info, ii_recsize) == 58, "found %lld\n",
2237                  (long long)(int)offsetof(struct idx_info, ii_recsize));
2238         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_recsize) == 2, "found %lld\n",
2239                  (long long)(int)sizeof(((struct idx_info *)0)->ii_recsize));
2240         LASSERTF((int)offsetof(struct idx_info, ii_pad1) == 60, "found %lld\n",
2241                  (long long)(int)offsetof(struct idx_info, ii_pad1));
2242         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_pad1) == 4, "found %lld\n",
2243                  (long long)(int)sizeof(((struct idx_info *)0)->ii_pad1));
2244         LASSERTF((int)offsetof(struct idx_info, ii_pad2) == 64, "found %lld\n",
2245                  (long long)(int)offsetof(struct idx_info, ii_pad2));
2246         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_pad2) == 8, "found %lld\n",
2247                  (long long)(int)sizeof(((struct idx_info *)0)->ii_pad2));
2248         LASSERTF((int)offsetof(struct idx_info, ii_pad3) == 72, "found %lld\n",
2249                  (long long)(int)offsetof(struct idx_info, ii_pad3));
2250         LASSERTF((int)sizeof(((struct idx_info *)0)->ii_pad3) == 8, "found %lld\n",
2251                  (long long)(int)sizeof(((struct idx_info *)0)->ii_pad3));
2252         BUILD_BUG_ON(IDX_INFO_MAGIC != 0x3D37CC37);
2253
2254         /* Checks for struct lu_idxpage */
2255         LASSERTF((int)sizeof(struct lu_idxpage) == 16, "found %lld\n",
2256                  (long long)(int)sizeof(struct lu_idxpage));
2257         LASSERTF((int)offsetof(struct lu_idxpage, lip_magic) == 0, "found %lld\n",
2258                  (long long)(int)offsetof(struct lu_idxpage, lip_magic));
2259         LASSERTF((int)sizeof(((struct lu_idxpage *)0)->lip_magic) == 4, "found %lld\n",
2260                  (long long)(int)sizeof(((struct lu_idxpage *)0)->lip_magic));
2261         LASSERTF((int)offsetof(struct lu_idxpage, lip_flags) == 4, "found %lld\n",
2262                  (long long)(int)offsetof(struct lu_idxpage, lip_flags));
2263         LASSERTF((int)sizeof(((struct lu_idxpage *)0)->lip_flags) == 2, "found %lld\n",
2264                  (long long)(int)sizeof(((struct lu_idxpage *)0)->lip_flags));
2265         LASSERTF((int)offsetof(struct lu_idxpage, lip_nr) == 6, "found %lld\n",
2266                  (long long)(int)offsetof(struct lu_idxpage, lip_nr));
2267         LASSERTF((int)sizeof(((struct lu_idxpage *)0)->lip_nr) == 2, "found %lld\n",
2268                  (long long)(int)sizeof(((struct lu_idxpage *)0)->lip_nr));
2269         LASSERTF((int)offsetof(struct lu_idxpage, lip_pad0) == 8, "found %lld\n",
2270                  (long long)(int)offsetof(struct lu_idxpage, lip_pad0));
2271         LASSERTF((int)sizeof(((struct lu_idxpage *)0)->lip_pad0) == 8, "found %lld\n",
2272                  (long long)(int)sizeof(((struct lu_idxpage *)0)->lip_pad0));
2273         BUILD_BUG_ON(LIP_MAGIC != 0x8A6D6B6C);
2274         BUILD_BUG_ON(LIP_HDR_SIZE != (__builtin_offsetof (struct lu_idxpage, lip_entries)));
2275         BUILD_BUG_ON(II_FL_NOHASH != 0x00000001);
2276         BUILD_BUG_ON(II_FL_VARKEY != 0x00000002);
2277         BUILD_BUG_ON(II_FL_VARREC != 0x00000004);
2278         BUILD_BUG_ON(II_FL_NONUNQ != 0x00000008);
2279         BUILD_BUG_ON(II_FL_NOKEY != 0x00000010);
2280
2281         /* Checks for struct niobuf_remote */
2282         LASSERTF((int)sizeof(struct niobuf_remote) == 16, "found %lld\n",
2283                  (long long)(int)sizeof(struct niobuf_remote));
2284         LASSERTF((int)offsetof(struct niobuf_remote, rnb_offset) == 0, "found %lld\n",
2285                  (long long)(int)offsetof(struct niobuf_remote, rnb_offset));
2286         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->rnb_offset) == 8, "found %lld\n",
2287                  (long long)(int)sizeof(((struct niobuf_remote *)0)->rnb_offset));
2288         LASSERTF((int)offsetof(struct niobuf_remote, rnb_len) == 8, "found %lld\n",
2289                  (long long)(int)offsetof(struct niobuf_remote, rnb_len));
2290         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->rnb_len) == 4, "found %lld\n",
2291                  (long long)(int)sizeof(((struct niobuf_remote *)0)->rnb_len));
2292         LASSERTF((int)offsetof(struct niobuf_remote, rnb_flags) == 12, "found %lld\n",
2293                  (long long)(int)offsetof(struct niobuf_remote, rnb_flags));
2294         LASSERTF((int)sizeof(((struct niobuf_remote *)0)->rnb_flags) == 4, "found %lld\n",
2295                  (long long)(int)sizeof(((struct niobuf_remote *)0)->rnb_flags));
2296         LASSERTF(OBD_BRW_READ == 0x01, "found 0x%.8x\n",
2297                 OBD_BRW_READ);
2298         LASSERTF(OBD_BRW_WRITE == 0x02, "found 0x%.8x\n",
2299                 OBD_BRW_WRITE);
2300         LASSERTF(OBD_BRW_NDELAY == 0x04, "found 0x%.8x\n",
2301                 OBD_BRW_NDELAY);
2302         LASSERTF(OBD_BRW_SYNC == 0x08, "found 0x%.8x\n",
2303                 OBD_BRW_SYNC);
2304         LASSERTF(OBD_BRW_CHECK == 0x10, "found 0x%.8x\n",
2305                 OBD_BRW_CHECK);
2306         LASSERTF(OBD_BRW_FROM_GRANT == 0x20, "found 0x%.8x\n",
2307                 OBD_BRW_FROM_GRANT);
2308         LASSERTF(OBD_BRW_GRANTED == 0x40, "found 0x%.8x\n",
2309                 OBD_BRW_GRANTED);
2310         LASSERTF(OBD_BRW_NOCACHE == 0x80, "found 0x%.8x\n",
2311                 OBD_BRW_NOCACHE);
2312         LASSERTF(OBD_BRW_NOQUOTA == 0x100, "found 0x%.8x\n",
2313                 OBD_BRW_NOQUOTA);
2314         LASSERTF(OBD_BRW_SRVLOCK == 0x200, "found 0x%.8x\n",
2315                 OBD_BRW_SRVLOCK);
2316         LASSERTF(OBD_BRW_ASYNC == 0x400, "found 0x%.8x\n",
2317                 OBD_BRW_ASYNC);
2318         LASSERTF(OBD_BRW_MEMALLOC == 0x800, "found 0x%.8x\n",
2319                 OBD_BRW_MEMALLOC);
2320         LASSERTF(OBD_BRW_OVER_USRQUOTA == 0x1000, "found 0x%.8x\n",
2321                 OBD_BRW_OVER_USRQUOTA);
2322         LASSERTF(OBD_BRW_OVER_GRPQUOTA == 0x2000, "found 0x%.8x\n",
2323                 OBD_BRW_OVER_GRPQUOTA);
2324         LASSERTF(OBD_BRW_SOFT_SYNC == 0x4000, "found 0x%.8x\n",
2325                 OBD_BRW_SOFT_SYNC);
2326         LASSERTF(OBD_BRW_OVER_PRJQUOTA == 0x8000, "found 0x%.8x\n",
2327                 OBD_BRW_OVER_PRJQUOTA);
2328         LASSERTF(OBD_BRW_RDMA_ONLY == 0x20000, "found 0x%.8x\n",
2329                 OBD_BRW_RDMA_ONLY);
2330
2331         /* Checks for struct ost_body */
2332         LASSERTF((int)sizeof(struct ost_body) == 208, "found %lld\n",
2333                  (long long)(int)sizeof(struct ost_body));
2334         LASSERTF((int)offsetof(struct ost_body, oa) == 0, "found %lld\n",
2335                  (long long)(int)offsetof(struct ost_body, oa));
2336         LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, "found %lld\n",
2337                  (long long)(int)sizeof(((struct ost_body *)0)->oa));
2338
2339         /* Checks for struct ll_fid */
2340         LASSERTF((int)sizeof(struct ll_fid) == 16, "found %lld\n",
2341                  (long long)(int)sizeof(struct ll_fid));
2342         LASSERTF((int)offsetof(struct ll_fid, id) == 0, "found %lld\n",
2343                  (long long)(int)offsetof(struct ll_fid, id));
2344         LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, "found %lld\n",
2345                  (long long)(int)sizeof(((struct ll_fid *)0)->id));
2346         LASSERTF((int)offsetof(struct ll_fid, generation) == 8, "found %lld\n",
2347                  (long long)(int)offsetof(struct ll_fid, generation));
2348         LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, "found %lld\n",
2349                  (long long)(int)sizeof(((struct ll_fid *)0)->generation));
2350         LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, "found %lld\n",
2351                  (long long)(int)offsetof(struct ll_fid, f_type));
2352         LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, "found %lld\n",
2353                  (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
2354
2355         LASSERTF(MDS_CROSS_REF == 0x00000002UL, "found 0x%.8xUL\n",
2356                 (unsigned)MDS_CROSS_REF);
2357         LASSERTF(MDS_PERM_BYPASS == 0x00000008UL, "found 0x%.8xUL\n",
2358                 (unsigned)MDS_PERM_BYPASS);
2359         LASSERTF(MDS_QUOTA_IGNORE == 0x00000020UL, "found 0x%.8xUL\n",
2360                 (unsigned)MDS_QUOTA_IGNORE);
2361         LASSERTF(MDS_KEEP_ORPHAN == 0x00000080UL, "found 0x%.8xUL\n",
2362                 (unsigned)MDS_KEEP_ORPHAN);
2363         LASSERTF(MDS_RECOV_OPEN == 0x00000100UL, "found 0x%.8xUL\n",
2364                 (unsigned)MDS_RECOV_OPEN);
2365         LASSERTF(MDS_DATA_MODIFIED == 0x00000200UL, "found 0x%.8xUL\n",
2366                 (unsigned)MDS_DATA_MODIFIED);
2367         LASSERTF(MDS_CREATE_VOLATILE == 0x00000400UL, "found 0x%.8xUL\n",
2368                 (unsigned)MDS_CREATE_VOLATILE);
2369         LASSERTF(MDS_OWNEROVERRIDE == 0x00000800UL, "found 0x%.8xUL\n",
2370                 (unsigned)MDS_OWNEROVERRIDE);
2371         LASSERTF(MDS_HSM_RELEASE == 0x00001000UL, "found 0x%.8xUL\n",
2372                 (unsigned)MDS_HSM_RELEASE);
2373         LASSERTF(MDS_CLOSE_MIGRATE == 0x00002000UL, "found 0x%.8xUL\n",
2374                 (unsigned)MDS_CLOSE_MIGRATE);
2375         LASSERTF(MDS_CLOSE_LAYOUT_SWAP == 0x00004000UL, "found 0x%.8xUL\n",
2376                 (unsigned)MDS_CLOSE_LAYOUT_SWAP);
2377         LASSERTF(MDS_CLOSE_LAYOUT_MERGE == 0x00008000UL, "found 0x%.8xUL\n",
2378                 (unsigned)MDS_CLOSE_LAYOUT_MERGE);
2379         LASSERTF(MDS_CLOSE_RESYNC_DONE == 0x00010000UL, "found 0x%.8xUL\n",
2380                 (unsigned)MDS_CLOSE_RESYNC_DONE);
2381         LASSERTF(MDS_CLOSE_LAYOUT_SPLIT == 0x00020000UL, "found 0x%.8xUL\n",
2382                 (unsigned)MDS_CLOSE_LAYOUT_SPLIT);
2383         LASSERTF(MDS_TRUNC_KEEP_LEASE == 0x00040000UL, "found 0x%.8xUL\n",
2384                 (unsigned)MDS_TRUNC_KEEP_LEASE);
2385         LASSERTF(MDS_PCC_ATTACH == 0x00080000UL, "found 0x%.8xUL\n",
2386                 (unsigned)MDS_PCC_ATTACH);
2387         LASSERTF(MDS_CLOSE_UPDATE_TIMES == 0x00100000UL, "found 0x%.8xUL\n",
2388                 (unsigned)MDS_CLOSE_UPDATE_TIMES);
2389
2390         /* Checks for struct mdt_body */
2391         LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
2392                  (long long)(int)sizeof(struct mdt_body));
2393         LASSERTF((int)offsetof(struct mdt_body, mbo_fid1) == 0, "found %lld\n",
2394                  (long long)(int)offsetof(struct mdt_body, mbo_fid1));
2395         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid1) == 16, "found %lld\n",
2396                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid1));
2397         LASSERTF((int)offsetof(struct mdt_body, mbo_fid2) == 16, "found %lld\n",
2398                  (long long)(int)offsetof(struct mdt_body, mbo_fid2));
2399         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid2) == 16, "found %lld\n",
2400                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid2));
2401         LASSERTF((int)offsetof(struct mdt_body, mbo_open_handle) == 32, "found %lld\n",
2402                  (long long)(int)offsetof(struct mdt_body, mbo_open_handle));
2403         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_open_handle) == 8, "found %lld\n",
2404                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_open_handle));
2405         LASSERTF((int)offsetof(struct mdt_body, mbo_valid) == 40, "found %lld\n",
2406                  (long long)(int)offsetof(struct mdt_body, mbo_valid));
2407         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_valid) == 8, "found %lld\n",
2408                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_valid));
2409         LASSERTF((int)offsetof(struct mdt_body, mbo_size) == 48, "found %lld\n",
2410                  (long long)(int)offsetof(struct mdt_body, mbo_size));
2411         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_size) == 8, "found %lld\n",
2412                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_size));
2413         LASSERTF((int)offsetof(struct mdt_body, mbo_mtime) == 56, "found %lld\n",
2414                  (long long)(int)offsetof(struct mdt_body, mbo_mtime));
2415         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mtime) == 8, "found %lld\n",
2416                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mtime));
2417         LASSERTF((int)offsetof(struct mdt_body, mbo_atime) == 64, "found %lld\n",
2418                  (long long)(int)offsetof(struct mdt_body, mbo_atime));
2419         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_atime) == 8, "found %lld\n",
2420                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_atime));
2421         LASSERTF((int)offsetof(struct mdt_body, mbo_ctime) == 72, "found %lld\n",
2422                  (long long)(int)offsetof(struct mdt_body, mbo_ctime));
2423         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_ctime) == 8, "found %lld\n",
2424                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_ctime));
2425         LASSERTF((int)offsetof(struct mdt_body, mbo_blocks) == 80, "found %lld\n",
2426                  (long long)(int)offsetof(struct mdt_body, mbo_blocks));
2427         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_blocks) == 8, "found %lld\n",
2428                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_blocks));
2429         LASSERTF((int)offsetof(struct mdt_body, mbo_version) == 88, "found %lld\n",
2430                  (long long)(int)offsetof(struct mdt_body, mbo_version));
2431         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_version) == 8, "found %lld\n",
2432                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_version));
2433         LASSERTF((int)offsetof(struct mdt_body, mbo_t_state) == 96, "found %lld\n",
2434                  (long long)(int)offsetof(struct mdt_body, mbo_t_state));
2435         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_t_state) == 8, "found %lld\n",
2436                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_t_state));
2437         LASSERTF((int)offsetof(struct mdt_body, mbo_fsuid) == 104, "found %lld\n",
2438                  (long long)(int)offsetof(struct mdt_body, mbo_fsuid));
2439         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsuid) == 4, "found %lld\n",
2440                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsuid));
2441         LASSERTF((int)offsetof(struct mdt_body, mbo_fsgid) == 108, "found %lld\n",
2442                  (long long)(int)offsetof(struct mdt_body, mbo_fsgid));
2443         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsgid) == 4, "found %lld\n",
2444                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsgid));
2445         LASSERTF((int)offsetof(struct mdt_body, mbo_capability) == 112, "found %lld\n",
2446                  (long long)(int)offsetof(struct mdt_body, mbo_capability));
2447         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_capability) == 4, "found %lld\n",
2448                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_capability));
2449         LASSERTF((int)offsetof(struct mdt_body, mbo_mode) == 116, "found %lld\n",
2450                  (long long)(int)offsetof(struct mdt_body, mbo_mode));
2451         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mode) == 4, "found %lld\n",
2452                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mode));
2453         LASSERTF((int)offsetof(struct mdt_body, mbo_uid) == 120, "found %lld\n",
2454                  (long long)(int)offsetof(struct mdt_body, mbo_uid));
2455         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid) == 4, "found %lld\n",
2456                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid));
2457         LASSERTF((int)offsetof(struct mdt_body, mbo_gid) == 124, "found %lld\n",
2458                  (long long)(int)offsetof(struct mdt_body, mbo_gid));
2459         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid) == 4, "found %lld\n",
2460                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid));
2461         LASSERTF((int)offsetof(struct mdt_body, mbo_flags) == 128, "found %lld\n",
2462                  (long long)(int)offsetof(struct mdt_body, mbo_flags));
2463         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_flags) == 4, "found %lld\n",
2464                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_flags));
2465         LASSERTF((int)offsetof(struct mdt_body, mbo_rdev) == 132, "found %lld\n",
2466                  (long long)(int)offsetof(struct mdt_body, mbo_rdev));
2467         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_rdev) == 4, "found %lld\n",
2468                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_rdev));
2469         LASSERTF((int)offsetof(struct mdt_body, mbo_nlink) == 136, "found %lld\n",
2470                  (long long)(int)offsetof(struct mdt_body, mbo_nlink));
2471         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_nlink) == 4, "found %lld\n",
2472                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_nlink));
2473         LASSERTF((int)offsetof(struct mdt_body, mbo_layout_gen) == 140, "found %lld\n",
2474                  (long long)(int)offsetof(struct mdt_body, mbo_layout_gen));
2475         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_layout_gen) == 4, "found %lld\n",
2476                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_layout_gen));
2477         LASSERTF((int)offsetof(struct mdt_body, mbo_suppgid) == 144, "found %lld\n",
2478                  (long long)(int)offsetof(struct mdt_body, mbo_suppgid));
2479         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_suppgid) == 4, "found %lld\n",
2480                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_suppgid));
2481         LASSERTF((int)offsetof(struct mdt_body, mbo_eadatasize) == 148, "found %lld\n",
2482                  (long long)(int)offsetof(struct mdt_body, mbo_eadatasize));
2483         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_eadatasize) == 4, "found %lld\n",
2484                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_eadatasize));
2485         LASSERTF((int)offsetof(struct mdt_body, mbo_aclsize) == 152, "found %lld\n",
2486                  (long long)(int)offsetof(struct mdt_body, mbo_aclsize));
2487         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_aclsize) == 4, "found %lld\n",
2488                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_aclsize));
2489         LASSERTF((int)offsetof(struct mdt_body, mbo_max_mdsize) == 156, "found %lld\n",
2490                  (long long)(int)offsetof(struct mdt_body, mbo_max_mdsize));
2491         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize) == 4, "found %lld\n",
2492                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize));
2493         LASSERTF((int)offsetof(struct mdt_body, mbo_unused3) == 160, "found %lld\n",
2494                  (long long)(int)offsetof(struct mdt_body, mbo_unused3));
2495         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused3) == 4, "found %lld\n",
2496                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused3));
2497         LASSERTF((int)offsetof(struct mdt_body, mbo_uid_h) == 164, "found %lld\n",
2498                  (long long)(int)offsetof(struct mdt_body, mbo_uid_h));
2499         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid_h) == 4, "found %lld\n",
2500                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid_h));
2501         LASSERTF((int)offsetof(struct mdt_body, mbo_gid_h) == 168, "found %lld\n",
2502                  (long long)(int)offsetof(struct mdt_body, mbo_gid_h));
2503         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid_h) == 4, "found %lld\n",
2504                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid_h));
2505         LASSERTF((int)offsetof(struct mdt_body, mbo_projid) == 172, "found %lld\n",
2506                  (long long)(int)offsetof(struct mdt_body, mbo_projid));
2507         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_projid) == 4, "found %lld\n",
2508                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_projid));
2509         LASSERTF((int)offsetof(struct mdt_body, mbo_dom_size) == 176, "found %lld\n",
2510                  (long long)(int)offsetof(struct mdt_body, mbo_dom_size));
2511         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_dom_size) == 8, "found %lld\n",
2512                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_dom_size));
2513         LASSERTF((int)offsetof(struct mdt_body, mbo_dom_blocks) == 184, "found %lld\n",
2514                  (long long)(int)offsetof(struct mdt_body, mbo_dom_blocks));
2515         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_dom_blocks) == 8, "found %lld\n",
2516                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_dom_blocks));
2517         LASSERTF((int)offsetof(struct mdt_body, mbo_btime) == 192, "found %lld\n",
2518                  (long long)(int)offsetof(struct mdt_body, mbo_btime));
2519         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_btime) == 8, "found %lld\n",
2520                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_btime));
2521         LASSERTF((int)offsetof(struct mdt_body, mbo_padding_9) == 200, "found %lld\n",
2522                  (long long)(int)offsetof(struct mdt_body, mbo_padding_9));
2523         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_9) == 8, "found %lld\n",
2524                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_9));
2525         LASSERTF((int)offsetof(struct mdt_body, mbo_padding_10) == 208, "found %lld\n",
2526                  (long long)(int)offsetof(struct mdt_body, mbo_padding_10));
2527         LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_10) == 8, "found %lld\n",
2528                  (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_10));
2529         LASSERTF(MDS_FMODE_CLOSED == 000000000000UL, "found 0%.11oUL\n",
2530                 MDS_FMODE_CLOSED);
2531         LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n",
2532                 MDS_FMODE_EXEC);
2533         LASSERTF(MDS_OPEN_CREATED == 000000000010UL, "found 0%.11oUL\n",
2534                 MDS_OPEN_CREATED);
2535         LASSERTF(MDS_OPEN_CREAT == 000000000100UL, "found 0%.11oUL\n",
2536                 MDS_OPEN_CREAT);
2537         LASSERTF(MDS_OPEN_EXCL == 000000000200UL, "found 0%.11oUL\n",
2538                 MDS_OPEN_EXCL);
2539         LASSERTF(MDS_OPEN_TRUNC == 000000001000UL, "found 0%.11oUL\n",
2540                 MDS_OPEN_TRUNC);
2541         LASSERTF(MDS_OPEN_APPEND == 000000002000UL, "found 0%.11oUL\n",
2542                 MDS_OPEN_APPEND);
2543         LASSERTF(MDS_OPEN_SYNC == 000000010000UL, "found 0%.11oUL\n",
2544                 MDS_OPEN_SYNC);
2545         LASSERTF(MDS_OPEN_DIRECTORY == 000000200000UL, "found 0%.11oUL\n",
2546                 MDS_OPEN_DIRECTORY);
2547         LASSERTF(MDS_OPEN_BY_FID == 000040000000UL, "found 0%.11oUL\n",
2548                 MDS_OPEN_BY_FID);
2549         LASSERTF(MDS_OPEN_DELAY_CREATE == 000100000000UL, "found 0%.11oUL\n",
2550                 MDS_OPEN_DELAY_CREATE);
2551         LASSERTF(MDS_OPEN_OWNEROVERRIDE == 000200000000UL, "found 0%.11oUL\n",
2552                 MDS_OPEN_OWNEROVERRIDE);
2553         LASSERTF(MDS_OPEN_JOIN_FILE == 000400000000UL, "found 0%.11oUL\n",
2554                 MDS_OPEN_JOIN_FILE);
2555         LASSERTF(MDS_OPEN_LOCK == 004000000000UL, "found 0%.11oUL\n",
2556                 MDS_OPEN_LOCK);
2557         LASSERTF(MDS_OPEN_HAS_EA == 010000000000UL, "found 0%.11oUL\n",
2558                 MDS_OPEN_HAS_EA);
2559         LASSERTF(MDS_OPEN_HAS_OBJS == 020000000000UL, "found 0%.11oUL\n",
2560                 MDS_OPEN_HAS_OBJS);
2561         LASSERTF(MDS_OPEN_NORESTORE == 00000000000100000000000ULL, "found 0%.22lloULL\n",
2562                         (long long)MDS_OPEN_NORESTORE);
2563         LASSERTF(MDS_OPEN_NEWSTRIPE == 00000000000200000000000ULL, "found 0%.22lloULL\n",
2564                         (long long)MDS_OPEN_NEWSTRIPE);
2565         LASSERTF(MDS_OPEN_VOLATILE == 00000000000400000000000ULL, "found 0%.22lloULL\n",
2566                         (long long)MDS_OPEN_VOLATILE);
2567         LASSERTF(MDS_OPEN_LEASE == 00000000001000000000000ULL, "found 0%.22lloULL\n",
2568                         (long long)MDS_OPEN_LEASE);
2569         LASSERTF(MDS_OPEN_RESYNC == 00000000004000000000000ULL, "found 0%.22lloULL\n",
2570                         (long long)MDS_OPEN_RESYNC);
2571         LASSERTF(MDS_OPEN_PCC == 00000000010000000000000ULL, "found 0%.22lloULL\n",
2572                         (long long)MDS_OPEN_PCC);
2573         LASSERTF(LUSTRE_SYNC_FL == 0x00000008UL, "found 0x%.8xUL\n",
2574                 (unsigned)LUSTRE_SYNC_FL);
2575         LASSERTF(LUSTRE_IMMUTABLE_FL == 0x00000010UL, "found 0x%.8xUL\n",
2576                 (unsigned)LUSTRE_IMMUTABLE_FL);
2577         LASSERTF(LUSTRE_APPEND_FL == 0x00000020UL, "found 0x%.8xUL\n",
2578                 (unsigned)LUSTRE_APPEND_FL);
2579         LASSERTF(LUSTRE_NODUMP_FL == 0x00000040UL, "found 0x%.8xUL\n",
2580                 (unsigned)LUSTRE_NODUMP_FL);
2581         LASSERTF(LUSTRE_NOATIME_FL == 0x00000080UL, "found 0x%.8xUL\n",
2582                 (unsigned)LUSTRE_NOATIME_FL);
2583         LASSERTF(LUSTRE_INDEX_FL == 0x00001000UL, "found 0x%.8xUL\n",
2584                 (unsigned)LUSTRE_INDEX_FL);
2585         LASSERTF(LUSTRE_ORPHAN_FL == 0x00002000UL, "found 0x%.8xUL\n",
2586                 (unsigned)LUSTRE_ORPHAN_FL);
2587         LASSERTF(LUSTRE_DIRSYNC_FL == 0x00010000UL, "found 0x%.8xUL\n",
2588                 (unsigned)LUSTRE_DIRSYNC_FL);
2589         LASSERTF(LUSTRE_TOPDIR_FL == 0x00020000UL, "found 0x%.8xUL\n",
2590                 (unsigned)LUSTRE_TOPDIR_FL);
2591         LASSERTF(LUSTRE_INLINE_DATA_FL == 0x10000000UL, "found 0x%.8xUL\n",
2592                 (unsigned)LUSTRE_INLINE_DATA_FL);
2593         LASSERTF(LUSTRE_SET_SYNC_FL == 0x00040000UL, "found 0x%.8xUL\n",
2594                 (unsigned)LUSTRE_SET_SYNC_FL);
2595         LASSERTF(LUSTRE_ENCRYPT_FL == 0x00800000UL, "found 0x%.8xUL\n",
2596                 (unsigned)LUSTRE_ENCRYPT_FL);
2597         LASSERTF(MDS_INODELOCK_LOOKUP == 0x00000001UL, "found 0x%.8xUL\n",
2598                 (unsigned)MDS_INODELOCK_LOOKUP);
2599         LASSERTF(MDS_INODELOCK_UPDATE == 0x00000002UL, "found 0x%.8xUL\n",
2600                 (unsigned)MDS_INODELOCK_UPDATE);
2601         LASSERTF(MDS_INODELOCK_OPEN == 0x00000004UL, "found 0x%.8xUL\n",
2602                 (unsigned)MDS_INODELOCK_OPEN);
2603         LASSERTF(MDS_INODELOCK_LAYOUT == 0x00000008UL, "found 0x%.8xUL\n",
2604                 (unsigned)MDS_INODELOCK_LAYOUT);
2605         LASSERTF(MDS_INODELOCK_PERM == 0x00000010UL, "found 0x%.8xUL\n",
2606                 (unsigned)MDS_INODELOCK_PERM);
2607         LASSERTF(MDS_INODELOCK_XATTR == 0x00000020UL, "found 0x%.8xUL\n",
2608                 (unsigned)MDS_INODELOCK_XATTR);
2609         LASSERTF(MDS_INODELOCK_DOM == 0x00000040UL, "found 0x%.8xUL\n",
2610                 (unsigned)MDS_INODELOCK_DOM);
2611
2612         /* Checks for struct mdt_ioepoch */
2613         LASSERTF((int)sizeof(struct mdt_ioepoch) == 24, "found %lld\n",
2614                  (long long)(int)sizeof(struct mdt_ioepoch));
2615         LASSERTF((int)offsetof(struct mdt_ioepoch, mio_open_handle) == 0, "found %lld\n",
2616                  (long long)(int)offsetof(struct mdt_ioepoch, mio_open_handle));
2617         LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle) == 8, "found %lld\n",
2618                  (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle));
2619         LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused1) == 8, "found %lld\n",
2620                  (long long)(int)offsetof(struct mdt_ioepoch, mio_unused1));
2621         LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1) == 8, "found %lld\n",
2622                  (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1));
2623         LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused2) == 16, "found %lld\n",
2624                  (long long)(int)offsetof(struct mdt_ioepoch, mio_unused2));
2625         LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2) == 4, "found %lld\n",
2626                  (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_unused2));
2627         LASSERTF((int)offsetof(struct mdt_ioepoch, mio_padding) == 20, "found %lld\n",
2628                  (long long)(int)offsetof(struct mdt_ioepoch, mio_padding));
2629         LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_padding) == 4, "found %lld\n",
2630                  (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_padding));
2631
2632         /* Checks for struct mdt_rec_setattr */
2633         LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, "found %lld\n",
2634                  (long long)(int)sizeof(struct mdt_rec_setattr));
2635         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_opcode) == 0, "found %lld\n",
2636                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_opcode));
2637         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode) == 4, "found %lld\n",
2638                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode));
2639         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_cap) == 4, "found %lld\n",
2640                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_cap));
2641         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap) == 4, "found %lld\n",
2642                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap));
2643         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid) == 8, "found %lld\n",
2644                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid));
2645         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid) == 4, "found %lld\n",
2646                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid));
2647         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid_h) == 12, "found %lld\n",
2648                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid_h));
2649         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h) == 4, "found %lld\n",
2650                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h));
2651         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid) == 16, "found %lld\n",
2652                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid));
2653         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid) == 4, "found %lld\n",
2654                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid));
2655         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid_h) == 20, "found %lld\n",
2656                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid_h));
2657         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h) == 4, "found %lld\n",
2658                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h));
2659         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid) == 24, "found %lld\n",
2660                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid));
2661         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid) == 4, "found %lld\n",
2662                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid));
2663         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid_h) == 28, "found %lld\n",
2664                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid_h));
2665         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h) == 4, "found %lld\n",
2666                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h));
2667         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1) == 32, "found %lld\n",
2668                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1));
2669         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1) == 4, "found %lld\n",
2670                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1));
2671         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1_h) == 36, "found %lld\n",
2672                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1_h));
2673         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h) == 4, "found %lld\n",
2674                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h));
2675         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fid) == 40, "found %lld\n",
2676                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_fid));
2677         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid) == 16, "found %lld\n",
2678                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid));
2679         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_valid) == 56, "found %lld\n",
2680                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_valid));
2681         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid) == 8, "found %lld\n",
2682                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid));
2683         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_uid) == 64, "found %lld\n",
2684                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_uid));
2685         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid) == 4, "found %lld\n",
2686                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid));
2687         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_gid) == 68, "found %lld\n",
2688                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_gid));
2689         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid) == 4, "found %lld\n",
2690                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid));
2691         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_size) == 72, "found %lld\n",
2692                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_size));
2693         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_size) == 8, "found %lld\n",
2694                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_size));
2695         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_blocks) == 80, "found %lld\n",
2696                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_blocks));
2697         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks) == 8, "found %lld\n",
2698                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks));
2699         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mtime) == 88, "found %lld\n",
2700                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_mtime));
2701         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime) == 8, "found %lld\n",
2702                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime));
2703         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_atime) == 96, "found %lld\n",
2704                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_atime));
2705         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime) == 8, "found %lld\n",
2706                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime));
2707         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_ctime) == 104, "found %lld\n",
2708                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_ctime));
2709         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime) == 8, "found %lld\n",
2710                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime));
2711         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_attr_flags) == 112, "found %lld\n",
2712                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_attr_flags));
2713         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags) == 4, "found %lld\n",
2714                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags));
2715         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mode) == 116, "found %lld\n",
2716                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_mode));
2717         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode) == 4, "found %lld\n",
2718                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode));
2719         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_bias) == 120, "found %lld\n",
2720                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_bias));
2721         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_bias) == 4, "found %lld\n",
2722                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_bias));
2723         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_projid) == 124, "found %lld\n",
2724                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_projid));
2725         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_projid) == 4, "found %lld\n",
2726                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_projid));
2727         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_4) == 128, "found %lld\n",
2728                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_4));
2729         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4) == 4, "found %lld\n",
2730                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4));
2731         LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_5) == 132, "found %lld\n",
2732                  (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_5));
2733         LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5) == 4, "found %lld\n",
2734                  (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5));
2735
2736         /* Checks for struct mdt_rec_create */
2737         LASSERTF((int)sizeof(struct mdt_rec_create) == 136, "found %lld\n",
2738                  (long long)(int)sizeof(struct mdt_rec_create));
2739         LASSERTF((int)offsetof(struct mdt_rec_create, cr_opcode) == 0, "found %lld\n",
2740                  (long long)(int)offsetof(struct mdt_rec_create, cr_opcode));
2741         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_opcode) == 4, "found %lld\n",
2742                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_opcode));
2743         LASSERTF((int)offsetof(struct mdt_rec_create, cr_cap) == 4, "found %lld\n",
2744                  (long long)(int)offsetof(struct mdt_rec_create, cr_cap));
2745         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_cap) == 4, "found %lld\n",
2746                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_cap));
2747         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid) == 8, "found %lld\n",
2748                  (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid));
2749         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid) == 4, "found %lld\n",
2750                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid));
2751         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid_h) == 12, "found %lld\n",
2752                  (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid_h));
2753         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h) == 4, "found %lld\n",
2754                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h));
2755         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid) == 16, "found %lld\n",
2756                  (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid));
2757         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid) == 4, "found %lld\n",
2758                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid));
2759         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid_h) == 20, "found %lld\n",
2760                  (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid_h));
2761         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h) == 4, "found %lld\n",
2762                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h));
2763         LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1) == 24, "found %lld\n",
2764                  (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1));
2765         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1) == 4, "found %lld\n",
2766                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1));
2767         LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1_h) == 28, "found %lld\n",
2768                  (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1_h));
2769         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h) == 4, "found %lld\n",
2770                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h));
2771         LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2) == 32, "found %lld\n",
2772                  (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2));
2773         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2) == 4, "found %lld\n",
2774                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2));
2775         LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2_h) == 36, "found %lld\n",
2776                  (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2_h));
2777         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h) == 4, "found %lld\n",
2778                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h));
2779         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid1) == 40, "found %lld\n",
2780                  (long long)(int)offsetof(struct mdt_rec_create, cr_fid1));
2781         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid1) == 16, "found %lld\n",
2782                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid1));
2783         LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid2) == 56, "found %lld\n",
2784                  (long long)(int)offsetof(struct mdt_rec_create, cr_fid2));
2785         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid2) == 16, "found %lld\n",
2786                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid2));
2787         LASSERTF((int)offsetof(struct mdt_rec_create, cr_open_handle_old) == 72, "found %lld\n",
2788                  (long long)(int)offsetof(struct mdt_rec_create, cr_open_handle_old));
2789         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_open_handle_old) == 8, "found %lld\n",