Whamcloud - gitweb
3ae1c4dae597fbcf860914c65c94b5bfe6cdd079
[fs/lustre-release.git] / lustre / utils / wirecheck.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) 2003, 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  * Lustre is a trademark of Sun Microsystems, Inc.
31  */
32
33 #include <stdio.h>
34 #include <errno.h>
35 #include <string.h>
36 #include <unistd.h>
37 #include <limits.h>
38 #include <stdlib.h>
39 #include <sys/types.h>
40 #include <sys/wait.h>
41 #include <linux/lustre/lustre_idl.h>
42 #include <linux/lustre/lustre_lfsck_user.h>
43 #include <linux/lustre/lustre_disk.h>
44
45 #define BLANK_LINE()                                            \
46 do {                                                            \
47         printf("\n");                                           \
48 } while(0)
49
50 #define COMMENT(c)                                              \
51 do {                                                            \
52         printf("        /* "c" */\n");                          \
53 } while(0)
54
55 #define STRINGIFY(a) #a
56
57 #define CHECK_CDEFINE(a)                                        \
58         printf("        CLASSERT("#a" == "STRINGIFY(a) ");\n")
59
60 #define CHECK_CVALUE(a)                                  \
61         printf("        CLASSERT("#a" == %lld);\n", (long long)a)
62
63 #define CHECK_CVALUE_X(a)                                       \
64         printf("        CLASSERT("#a" == 0x%.8x);\n", a)
65
66 #define CHECK_DEFINE(a)                                         \
67 do {                                                            \
68         printf("        LASSERTF("#a" == "STRINGIFY(a)          \
69                 ", \"found %%lld\\n\",\n                        "\
70                 "(long long)"#a");\n");                         \
71 } while(0)
72
73 #define CHECK_DEFINE_X(a)                                       \
74 do {                                                            \
75         printf("        LASSERTF("#a" == "STRINGIFY(a)          \
76                 ", \"found 0x%%.8x\\n\",\n              "#a     \
77                 ");\n");                                        \
78 } while(0)
79
80 #define CHECK_DEFINE_64X(a)                                     \
81 do {                                                            \
82         printf("        LASSERTF("#a" == "STRINGIFY(a)          \
83                 ", \"found 0x%%.16llxULL\\n\",\n                "\
84                 " "#a");\n");                                   \
85 } while(0)
86
87 #define CHECK_VALUE(a)                                          \
88 do {                                                            \
89         printf("        LASSERTF("#a                            \
90                 " == %lld, \"found %%lld\\n\",\n                "\
91                 " (long long)"#a");\n", (long long)a);          \
92 } while(0)
93
94 #define CHECK_VALUE_X(a)                                        \
95 do {                                                            \
96         printf("        LASSERTF("#a                            \
97                 " == 0x%.8xUL, \"found 0x%%.8xUL\\n\",\n        "\
98                 "       (unsigned)"#a");\n", (unsigned)a);      \
99 } while(0)
100
101 #define CHECK_VALUE_O(a)                                        \
102 do {                                                            \
103         printf("        LASSERTF("#a                            \
104                 " == 0%.11oUL, \"found 0%%.11oUL\\n\",\n        "\
105                 "       "#a");\n", a);                          \
106 } while(0)
107
108 #define CHECK_VALUE_64X(a)                                      \
109 do {                                                            \
110         printf("        LASSERTF("#a" == 0x%.16llxULL, "        \
111                 "\"found 0x%%.16llxULL\\n\",\n                  "\
112                 "(long long)"#a");\n", (long long)a);           \
113 } while(0)
114
115 #define CHECK_VALUE_64O(a)                                      \
116 do {                                                            \
117         printf("        LASSERTF("#a" == 0%.22lloULL, "         \
118                 "\"found 0%%.22lloULL\\n\",\n                   "\
119                 "(long long)"#a");\n", (long long)a);           \
120 } while(0)
121
122 #define CHECK_MEMBER_OFFSET(s, m)                               \
123 do {                                                            \
124         CHECK_VALUE((int)offsetof(struct s, m));                \
125 } while(0)
126
127 #define CHECK_MEMBER_OFFSET_TYPEDEF(s, m)                       \
128 do {                                                            \
129         CHECK_VALUE((int)offsetof(s, m));                       \
130 } while(0)
131
132 #define CHECK_MEMBER_SIZEOF(s, m)                               \
133 do {                                                            \
134         CHECK_VALUE((int)sizeof(((struct s *)0)->m));           \
135 } while(0)
136
137 #define CHECK_MEMBER_SIZEOF_TYPEDEF(s, m)                       \
138 do {                                                            \
139         CHECK_VALUE((int)sizeof(((s *)0)->m));                  \
140 } while(0)
141
142 #define CHECK_MEMBER(s, m)                                      \
143 do {                                                            \
144         CHECK_MEMBER_OFFSET(s, m);                              \
145         CHECK_MEMBER_SIZEOF(s, m);                              \
146 } while(0)
147
148 #define CHECK_MEMBER_TYPEDEF(s, m)                              \
149 do {                                                            \
150         CHECK_MEMBER_OFFSET_TYPEDEF(s, m);                      \
151         CHECK_MEMBER_SIZEOF_TYPEDEF(s, m);                      \
152 } while(0)
153
154 #define CHECK_STRUCT(s)                                         \
155 do {                                                            \
156         COMMENT("Checks for struct "#s);                        \
157                 CHECK_VALUE((int)sizeof(struct s));             \
158 } while(0)
159
160 #define CHECK_STRUCT_TYPEDEF(s)                                 \
161 do {                                                            \
162         COMMENT("Checks for type "#s);                          \
163                 CHECK_VALUE((int)sizeof(s));                    \
164 } while(0)
165
166 #define CHECK_UNION(s)                                          \
167 do {                                                            \
168         COMMENT("Checks for union "#s);                         \
169         CHECK_VALUE((int)sizeof(union s));                      \
170 } while(0)
171
172 #define CHECK_VALUE_SAME(v1, v2)                                \
173 do {                                                            \
174         printf("\tLASSERTF("#v1" == "#v2", "                    \
175                 "\"%%d != %%d\\n\",\n"                          \
176                 "\t\t "#v1", "#v2");\n");                       \
177 } while (0)
178
179 #define CHECK_MEMBER_SAME(s1, s2, m)                            \
180 do {                                                            \
181         CHECK_VALUE_SAME((int)offsetof(struct s1, m),           \
182                          (int)offsetof(struct s2, m));          \
183         CHECK_VALUE_SAME((int)sizeof(((struct s1 *)0)->m),      \
184                          (int)sizeof(((struct s2 *)0)->m));     \
185 } while (0)
186
187 static void
188 check_lu_seq_range(void)
189 {
190         BLANK_LINE();
191         CHECK_STRUCT(lu_seq_range);
192         CHECK_MEMBER(lu_seq_range, lsr_start);
193         CHECK_MEMBER(lu_seq_range, lsr_end);
194         CHECK_MEMBER(lu_seq_range, lsr_index);
195         CHECK_MEMBER(lu_seq_range, lsr_flags);
196
197         CHECK_VALUE(LU_SEQ_RANGE_MDT);
198         CHECK_VALUE(LU_SEQ_RANGE_OST);
199 }
200
201 static void
202 check_lustre_mdt_attrs(void)
203 {
204         BLANK_LINE();
205         CHECK_STRUCT(lustre_mdt_attrs);
206         CHECK_MEMBER(lustre_mdt_attrs, lma_compat);
207         CHECK_MEMBER(lustre_mdt_attrs, lma_incompat);
208         CHECK_MEMBER(lustre_mdt_attrs, lma_self_fid);
209
210         CHECK_VALUE_X(LMAC_HSM);
211         CHECK_VALUE_X(LMAC_NOT_IN_OI);
212         CHECK_VALUE_X(LMAC_FID_ON_OST);
213         CHECK_VALUE_X(LMAC_STRIPE_INFO);
214         CHECK_VALUE_X(LMAC_COMP_INFO);
215
216         CHECK_VALUE_X(LMAI_RELEASED);
217         CHECK_VALUE_X(LMAI_AGENT);
218         CHECK_VALUE_X(LMAI_REMOTE_PARENT);
219         CHECK_VALUE_X(LMAI_STRIPED);
220         CHECK_VALUE_X(LMAI_ORPHAN);
221 }
222
223 static void
224 check_lustre_ost_attrs(void)
225 {
226         BLANK_LINE();
227         CHECK_STRUCT(lustre_ost_attrs);
228         CHECK_MEMBER(lustre_ost_attrs, loa_lma);
229         CHECK_MEMBER(lustre_ost_attrs, loa_parent_fid);
230         CHECK_MEMBER(lustre_ost_attrs, loa_stripe_size);
231         CHECK_MEMBER(lustre_ost_attrs, loa_comp_id);
232         CHECK_MEMBER(lustre_ost_attrs, loa_comp_start);
233         CHECK_MEMBER(lustre_ost_attrs, loa_comp_end);
234 }
235
236
237 static void
238 check_som_attrs(void)
239 {
240         BLANK_LINE();
241         CHECK_STRUCT(lustre_som_attrs);
242         CHECK_MEMBER(lustre_som_attrs, lsa_valid);
243         CHECK_MEMBER(lustre_som_attrs, lsa_reserved);
244         CHECK_MEMBER(lustre_som_attrs, lsa_size);
245         CHECK_MEMBER(lustre_som_attrs, lsa_blocks);
246 }
247
248 static void
249 check_hsm_attrs(void)
250 {
251         BLANK_LINE();
252         CHECK_STRUCT(hsm_attrs);
253         CHECK_MEMBER(hsm_attrs, hsm_compat);
254         CHECK_MEMBER(hsm_attrs, hsm_flags);
255         CHECK_MEMBER(hsm_attrs, hsm_arch_id);
256         CHECK_MEMBER(hsm_attrs, hsm_arch_ver);
257 }
258
259 static void
260 check_ost_id(void)
261 {
262         BLANK_LINE();
263         CHECK_STRUCT(ost_id);
264         CHECK_MEMBER(ost_id, oi);
265
266         CHECK_VALUE(LUSTRE_FID_INIT_OID);
267
268         CHECK_VALUE(FID_SEQ_OST_MDT0);
269         CHECK_VALUE(FID_SEQ_LLOG);
270         CHECK_VALUE(FID_SEQ_ECHO);
271         CHECK_VALUE(FID_SEQ_UNUSED_START);
272         CHECK_VALUE(FID_SEQ_UNUSED_END);
273         CHECK_VALUE(FID_SEQ_RSVD);
274         CHECK_VALUE(FID_SEQ_IGIF);
275         CHECK_VALUE_64X(FID_SEQ_IGIF_MAX);
276         CHECK_VALUE_64X(FID_SEQ_IDIF);
277         CHECK_VALUE_64X(FID_SEQ_IDIF_MAX);
278         CHECK_VALUE_64X(FID_SEQ_START);
279         CHECK_VALUE_64X(FID_SEQ_LOCAL_FILE);
280         CHECK_VALUE_64X(FID_SEQ_DOT_LUSTRE);
281         CHECK_VALUE_64X(FID_SEQ_SPECIAL);
282         CHECK_VALUE_64X(FID_SEQ_QUOTA);
283         CHECK_VALUE_64X(FID_SEQ_QUOTA_GLB);
284         CHECK_VALUE_64X(FID_SEQ_ROOT);
285         CHECK_VALUE_64X(FID_SEQ_LAYOUT_RBTREE);
286         CHECK_VALUE_64X(FID_SEQ_UPDATE_LOG);
287         CHECK_VALUE_64X(FID_SEQ_UPDATE_LOG_DIR);
288         CHECK_VALUE_64X(FID_SEQ_NORMAL);
289         CHECK_VALUE_64X(FID_SEQ_LOV_DEFAULT);
290
291         CHECK_VALUE_X(FID_OID_SPECIAL_BFL);
292         CHECK_VALUE_X(FID_OID_DOT_LUSTRE);
293         CHECK_VALUE_X(FID_OID_DOT_LUSTRE_OBF);
294 }
295
296 static void
297 check_lu_dirent(void)
298 {
299         BLANK_LINE();
300         CHECK_STRUCT(lu_dirent);
301         CHECK_MEMBER(lu_dirent, lde_fid);
302         CHECK_MEMBER(lu_dirent, lde_hash);
303         CHECK_MEMBER(lu_dirent, lde_reclen);
304         CHECK_MEMBER(lu_dirent, lde_namelen);
305         CHECK_MEMBER(lu_dirent, lde_attrs);
306         CHECK_MEMBER(lu_dirent, lde_name[0]);
307
308         CHECK_VALUE_X(LUDA_FID);
309         CHECK_VALUE_X(LUDA_TYPE);
310         CHECK_VALUE_X(LUDA_64BITHASH);
311 }
312
313 static void
314 check_luda_type(void)
315 {
316         BLANK_LINE();
317         CHECK_STRUCT(luda_type);
318         CHECK_MEMBER(luda_type, lt_type);
319 }
320
321 static void
322 check_lu_dirpage(void)
323 {
324         BLANK_LINE();
325         CHECK_STRUCT(lu_dirpage);
326         CHECK_MEMBER(lu_dirpage, ldp_hash_start);
327         CHECK_MEMBER(lu_dirpage, ldp_hash_end);
328         CHECK_MEMBER(lu_dirpage, ldp_flags);
329         CHECK_MEMBER(lu_dirpage, ldp_pad0);
330         CHECK_MEMBER(lu_dirpage, ldp_entries[0]);
331
332         CHECK_VALUE(LDF_EMPTY);
333         CHECK_VALUE(LDF_COLLIDE);
334         CHECK_VALUE(LU_PAGE_SIZE);
335         CHECK_UNION(lu_page);
336 }
337
338 static void
339 check_lu_ladvise(void)
340 {
341         BLANK_LINE();
342         CHECK_STRUCT(lu_ladvise);
343         CHECK_MEMBER(lu_ladvise, lla_advice);
344         CHECK_MEMBER(lu_ladvise, lla_value1);
345         CHECK_MEMBER(lu_ladvise, lla_value2);
346         CHECK_MEMBER(lu_ladvise, lla_start);
347         CHECK_MEMBER(lu_ladvise, lla_end);
348         CHECK_MEMBER(lu_ladvise, lla_value3);
349         CHECK_MEMBER(lu_ladvise, lla_value4);
350         CHECK_VALUE(LU_LADVISE_WILLREAD);
351         CHECK_VALUE(LU_LADVISE_DONTNEED);
352 }
353
354 static void
355 check_ladvise_hdr(void)
356 {
357         BLANK_LINE();
358         CHECK_STRUCT(ladvise_hdr);
359         CHECK_MEMBER(ladvise_hdr, lah_magic);
360         CHECK_MEMBER(ladvise_hdr, lah_count);
361         CHECK_MEMBER(ladvise_hdr, lah_flags);
362         CHECK_MEMBER(ladvise_hdr, lah_value1);
363         CHECK_MEMBER(ladvise_hdr, lah_value2);
364         CHECK_MEMBER(ladvise_hdr, lah_value3);
365         CHECK_MEMBER(ladvise_hdr, lah_advise);
366
367         CHECK_VALUE(LF_ASYNC);
368         CHECK_VALUE(LADVISE_MAGIC);
369 }
370
371 static void
372 check_lustre_handle(void)
373 {
374         BLANK_LINE();
375         CHECK_STRUCT(lustre_handle);
376         CHECK_MEMBER(lustre_handle, cookie);
377 }
378
379 static void
380 check_lustre_msg_v2(void)
381 {
382         BLANK_LINE();
383         CHECK_STRUCT(lustre_msg_v2);
384         CHECK_MEMBER(lustre_msg_v2, lm_bufcount);
385         CHECK_MEMBER(lustre_msg_v2, lm_secflvr);
386         CHECK_MEMBER(lustre_msg_v2, lm_magic);
387         CHECK_MEMBER(lustre_msg_v2, lm_repsize);
388         CHECK_MEMBER(lustre_msg_v2, lm_cksum);
389         CHECK_MEMBER(lustre_msg_v2, lm_flags);
390         CHECK_MEMBER(lustre_msg_v2, lm_padding_2);
391         CHECK_MEMBER(lustre_msg_v2, lm_padding_3);
392         CHECK_MEMBER(lustre_msg_v2, lm_buflens[0]);
393
394         CHECK_VALUE_X(LUSTRE_MSG_MAGIC_V2);
395         CHECK_VALUE_X(LUSTRE_MSG_MAGIC_V2_SWABBED);
396 }
397
398 static void
399 check_ptlrpc_body(void)
400 {
401         BLANK_LINE();
402         CHECK_STRUCT(ptlrpc_body);
403         CHECK_MEMBER(ptlrpc_body, pb_handle);
404         CHECK_MEMBER(ptlrpc_body, pb_type);
405         CHECK_MEMBER(ptlrpc_body, pb_version);
406         CHECK_MEMBER(ptlrpc_body, pb_opc);
407         CHECK_MEMBER(ptlrpc_body, pb_status);
408         CHECK_MEMBER(ptlrpc_body, pb_last_xid);
409         CHECK_MEMBER(ptlrpc_body, pb_tag);
410         CHECK_MEMBER(ptlrpc_body, pb_padding0);
411         CHECK_MEMBER(ptlrpc_body, pb_padding1);
412         CHECK_MEMBER(ptlrpc_body, pb_last_committed);
413         CHECK_MEMBER(ptlrpc_body, pb_transno);
414         CHECK_MEMBER(ptlrpc_body, pb_flags);
415         CHECK_MEMBER(ptlrpc_body, pb_op_flags);
416         CHECK_MEMBER(ptlrpc_body, pb_conn_cnt);
417         CHECK_MEMBER(ptlrpc_body, pb_timeout);
418         CHECK_MEMBER(ptlrpc_body, pb_service_time);
419         CHECK_MEMBER(ptlrpc_body, pb_limit);
420         CHECK_MEMBER(ptlrpc_body, pb_slv);
421         CHECK_CVALUE(PTLRPC_NUM_VERSIONS);
422         CHECK_MEMBER(ptlrpc_body, pb_pre_versions);
423         CHECK_MEMBER(ptlrpc_body, pb_mbits);
424         CHECK_MEMBER(ptlrpc_body, pb_padding64_0);
425         CHECK_MEMBER(ptlrpc_body, pb_padding64_1);
426         CHECK_MEMBER(ptlrpc_body, pb_padding64_2);
427         CHECK_CVALUE(LUSTRE_JOBID_SIZE);
428         CHECK_MEMBER(ptlrpc_body, pb_jobid);
429
430         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_handle);
431         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_type);
432         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_version);
433         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_opc);
434         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_status);
435         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_last_xid);
436         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_tag);
437         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_padding0);
438         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_padding1);
439         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_last_committed);
440         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_transno);
441         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_flags);
442         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_op_flags);
443         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_conn_cnt);
444         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_timeout);
445         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_service_time);
446         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_limit);
447         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_slv);
448         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_pre_versions);
449         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_mbits);
450         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_padding64_0);
451         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_padding64_1);
452         CHECK_MEMBER_SAME(ptlrpc_body_v3, ptlrpc_body_v2, pb_padding64_2);
453
454         CHECK_VALUE(MSG_PTLRPC_BODY_OFF);
455         CHECK_VALUE(REQ_REC_OFF);
456         CHECK_VALUE(REPLY_REC_OFF);
457         CHECK_VALUE(DLM_LOCKREQ_OFF);
458         CHECK_VALUE(DLM_REQ_REC_OFF);
459         CHECK_VALUE(DLM_INTENT_IT_OFF);
460         CHECK_VALUE(DLM_INTENT_REC_OFF);
461         CHECK_VALUE(DLM_LOCKREPLY_OFF);
462         CHECK_VALUE(DLM_REPLY_REC_OFF);
463         CHECK_VALUE(MSG_PTLRPC_HEADER_OFF);
464
465         CHECK_VALUE_X(PTLRPC_MSG_VERSION);
466         CHECK_VALUE_X(LUSTRE_VERSION_MASK);
467         CHECK_VALUE_X(LUSTRE_OBD_VERSION);
468         CHECK_VALUE_X(LUSTRE_MDS_VERSION);
469         CHECK_VALUE_X(LUSTRE_OST_VERSION);
470         CHECK_VALUE_X(LUSTRE_DLM_VERSION);
471         CHECK_VALUE_X(LUSTRE_LOG_VERSION);
472         CHECK_VALUE_X(LUSTRE_MGS_VERSION);
473
474         CHECK_VALUE(MSGHDR_AT_SUPPORT);
475         CHECK_VALUE(MSGHDR_CKSUM_INCOMPAT18);
476
477         CHECK_VALUE_X(MSG_RESENT);
478         CHECK_VALUE_X(MSG_REPLAY);
479         CHECK_VALUE_X(MSG_REQ_REPLAY_DONE);
480         CHECK_VALUE_X(MSG_LOCK_REPLAY_DONE);
481
482         CHECK_VALUE_X(MSG_CONNECT_RECOVERING);
483         CHECK_VALUE_X(MSG_CONNECT_RECONNECT);
484         CHECK_VALUE_X(MSG_CONNECT_REPLAYABLE);
485         CHECK_VALUE_X(MSG_CONNECT_LIBCLIENT);
486         CHECK_VALUE_X(MSG_CONNECT_INITIAL);
487         CHECK_VALUE_X(MSG_CONNECT_NEXT_VER);
488         CHECK_VALUE_X(MSG_CONNECT_TRANSNO);
489 }
490
491 /* XXX README XXX:
492  * Please DO NOT add flag values here before first ensuring that this same
493  * flag value is not in use on some other branch.  Please clear any such
494  * changes with senior engineers before starting to use a new flag.  Then,
495  * submit a small patch against EVERY branch that ONLY adds the new flag,
496  * updates obd_connect_names[] for lprocfs_rd_connect_flags(), adds the
497  * flag to check_obd_connect_data(), and updates wiretests accordingly, so it
498  * can be approved and landed easily to reserve the flag for future use. */
499 static void
500 check_obd_connect_data(void)
501 {
502         BLANK_LINE();
503         CHECK_STRUCT(obd_connect_data);
504         CHECK_MEMBER(obd_connect_data, ocd_connect_flags);
505         CHECK_MEMBER(obd_connect_data, ocd_version);
506         CHECK_MEMBER(obd_connect_data, ocd_grant);
507         CHECK_MEMBER(obd_connect_data, ocd_index);
508         CHECK_MEMBER(obd_connect_data, ocd_brw_size);
509         CHECK_MEMBER(obd_connect_data, ocd_ibits_known);
510         CHECK_MEMBER(obd_connect_data, ocd_grant_blkbits);
511         CHECK_MEMBER(obd_connect_data, ocd_grant_inobits);
512         CHECK_MEMBER(obd_connect_data, ocd_grant_tax_kb);
513         CHECK_MEMBER(obd_connect_data, ocd_grant_max_blks);
514         CHECK_MEMBER(obd_connect_data, ocd_transno);
515         CHECK_MEMBER(obd_connect_data, ocd_group);
516         CHECK_MEMBER(obd_connect_data, ocd_cksum_types);
517         CHECK_MEMBER(obd_connect_data, ocd_max_easize);
518         CHECK_MEMBER(obd_connect_data, ocd_instance);
519         CHECK_MEMBER(obd_connect_data, ocd_maxbytes);
520         CHECK_MEMBER(obd_connect_data, ocd_maxmodrpcs);
521         CHECK_MEMBER(obd_connect_data, padding0);
522         CHECK_MEMBER(obd_connect_data, padding1);
523         CHECK_MEMBER(obd_connect_data, ocd_connect_flags2);
524         CHECK_MEMBER(obd_connect_data, padding3);
525         CHECK_MEMBER(obd_connect_data, padding4);
526         CHECK_MEMBER(obd_connect_data, padding5);
527         CHECK_MEMBER(obd_connect_data, padding6);
528         CHECK_MEMBER(obd_connect_data, padding7);
529         CHECK_MEMBER(obd_connect_data, padding8);
530         CHECK_MEMBER(obd_connect_data, padding9);
531         CHECK_MEMBER(obd_connect_data, paddingA);
532         CHECK_MEMBER(obd_connect_data, paddingB);
533         CHECK_MEMBER(obd_connect_data, paddingC);
534         CHECK_MEMBER(obd_connect_data, paddingD);
535         CHECK_MEMBER(obd_connect_data, paddingE);
536         CHECK_MEMBER(obd_connect_data, paddingF);
537
538         CHECK_DEFINE_64X(OBD_CONNECT_RDONLY);
539         CHECK_DEFINE_64X(OBD_CONNECT_INDEX);
540         CHECK_DEFINE_64X(OBD_CONNECT_MDS);
541         CHECK_DEFINE_64X(OBD_CONNECT_GRANT);
542         CHECK_DEFINE_64X(OBD_CONNECT_SRVLOCK);
543         CHECK_DEFINE_64X(OBD_CONNECT_VERSION);
544         CHECK_DEFINE_64X(OBD_CONNECT_REQPORTAL);
545         CHECK_DEFINE_64X(OBD_CONNECT_ACL);
546         CHECK_DEFINE_64X(OBD_CONNECT_XATTR);
547         CHECK_DEFINE_64X(OBD_CONNECT_LARGE_ACL);
548         CHECK_DEFINE_64X(OBD_CONNECT_TRUNCLOCK);
549         CHECK_DEFINE_64X(OBD_CONNECT_TRANSNO);
550         CHECK_DEFINE_64X(OBD_CONNECT_IBITS);
551         CHECK_DEFINE_64X(OBD_CONNECT_BARRIER);
552         CHECK_DEFINE_64X(OBD_CONNECT_ATTRFID);
553         CHECK_DEFINE_64X(OBD_CONNECT_NODEVOH);
554         CHECK_DEFINE_64X(OBD_CONNECT_RMT_CLIENT);
555         CHECK_DEFINE_64X(OBD_CONNECT_RMT_CLIENT_FORCE);
556         CHECK_DEFINE_64X(OBD_CONNECT_BRW_SIZE);
557         CHECK_DEFINE_64X(OBD_CONNECT_QUOTA64);
558         CHECK_DEFINE_64X(OBD_CONNECT_MDS_CAPA);
559         CHECK_DEFINE_64X(OBD_CONNECT_OSS_CAPA);
560         CHECK_DEFINE_64X(OBD_CONNECT_CANCELSET);
561         CHECK_DEFINE_64X(OBD_CONNECT_SOM);
562         CHECK_DEFINE_64X(OBD_CONNECT_AT);
563         CHECK_DEFINE_64X(OBD_CONNECT_LRU_RESIZE);
564         CHECK_DEFINE_64X(OBD_CONNECT_MDS_MDS);
565         CHECK_DEFINE_64X(OBD_CONNECT_REAL);
566         CHECK_DEFINE_64X(OBD_CONNECT_CHANGE_QS);
567         CHECK_DEFINE_64X(OBD_CONNECT_CKSUM);
568         CHECK_DEFINE_64X(OBD_CONNECT_FID);
569         CHECK_DEFINE_64X(OBD_CONNECT_VBR);
570         CHECK_DEFINE_64X(OBD_CONNECT_LOV_V3);
571         CHECK_DEFINE_64X(OBD_CONNECT_GRANT_SHRINK);
572         CHECK_DEFINE_64X(OBD_CONNECT_SKIP_ORPHAN);
573         CHECK_DEFINE_64X(OBD_CONNECT_MAX_EASIZE);
574         CHECK_DEFINE_64X(OBD_CONNECT_FULL20);
575         CHECK_DEFINE_64X(OBD_CONNECT_LAYOUTLOCK);
576         CHECK_DEFINE_64X(OBD_CONNECT_64BITHASH);
577         CHECK_DEFINE_64X(OBD_CONNECT_MAXBYTES);
578         CHECK_DEFINE_64X(OBD_CONNECT_IMP_RECOV);
579         CHECK_DEFINE_64X(OBD_CONNECT_JOBSTATS);
580         CHECK_DEFINE_64X(OBD_CONNECT_UMASK);
581         CHECK_DEFINE_64X(OBD_CONNECT_EINPROGRESS);
582         CHECK_DEFINE_64X(OBD_CONNECT_GRANT_PARAM);
583         CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_OWNER);
584         CHECK_DEFINE_64X(OBD_CONNECT_LVB_TYPE);
585         CHECK_DEFINE_64X(OBD_CONNECT_NANOSEC_TIME);
586         CHECK_DEFINE_64X(OBD_CONNECT_LIGHTWEIGHT);
587         CHECK_DEFINE_64X(OBD_CONNECT_SHORTIO);
588         CHECK_DEFINE_64X(OBD_CONNECT_PINGLESS);
589         CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_DEAD);
590         CHECK_DEFINE_64X(OBD_CONNECT_OPEN_BY_FID);
591         CHECK_DEFINE_64X(OBD_CONNECT_LFSCK);
592         CHECK_DEFINE_64X(OBD_CONNECT_UNLINK_CLOSE);
593         CHECK_DEFINE_64X(OBD_CONNECT_MULTIMODRPCS);
594         CHECK_DEFINE_64X(OBD_CONNECT_DIR_STRIPE);
595         CHECK_DEFINE_64X(OBD_CONNECT_SUBTREE);
596         CHECK_DEFINE_64X(OBD_CONNECT_LOCKAHEAD_OLD);
597         CHECK_DEFINE_64X(OBD_CONNECT_BULK_MBITS);
598         CHECK_DEFINE_64X(OBD_CONNECT_OBDOPACK);
599         CHECK_DEFINE_64X(OBD_CONNECT_FLAGS2);
600         CHECK_DEFINE_64X(OBD_CONNECT2_FILE_SECCTX);
601         CHECK_DEFINE_64X(OBD_CONNECT2_LOCKAHEAD);
602         CHECK_DEFINE_64X(OBD_CONNECT2_DIR_MIGRATE);
603         CHECK_DEFINE_64X(OBD_CONNECT2_FLR);
604         CHECK_DEFINE_64X(OBD_CONNECT2_WBC_INTENTS);
605         CHECK_DEFINE_64X(OBD_CONNECT2_LOCK_CONVERT);
606         CHECK_DEFINE_64X(OBD_CONNECT2_ARCHIVE_ID_ARRAY);
607
608         CHECK_VALUE_X(OBD_CKSUM_CRC32);
609         CHECK_VALUE_X(OBD_CKSUM_ADLER);
610         CHECK_VALUE_X(OBD_CKSUM_CRC32C);
611         CHECK_VALUE_X(OBD_CKSUM_RESERVED);
612         CHECK_VALUE_X(OBD_CKSUM_T10IP512);
613         CHECK_VALUE_X(OBD_CKSUM_T10IP4K);
614         CHECK_VALUE_X(OBD_CKSUM_T10CRC512);
615         CHECK_VALUE_X(OBD_CKSUM_T10CRC4K);
616         CHECK_VALUE_X(OBD_CKSUM_T10_TOP);
617 }
618
619 static void
620 check_ost_layout(void)
621 {
622         BLANK_LINE();
623         CHECK_STRUCT(ost_layout);
624         CHECK_MEMBER(ost_layout, ol_stripe_size);
625         CHECK_MEMBER(ost_layout, ol_stripe_count);
626         CHECK_MEMBER(ost_layout, ol_comp_start);
627         CHECK_MEMBER(ost_layout, ol_comp_end);
628         CHECK_MEMBER(ost_layout, ol_comp_id);
629 }
630
631 static void
632 check_obdo(void)
633 {
634         BLANK_LINE();
635         CHECK_STRUCT(obdo);
636         CHECK_MEMBER(obdo, o_valid);
637         CHECK_MEMBER(obdo, o_oi);
638         CHECK_MEMBER(obdo, o_parent_seq);
639         CHECK_MEMBER(obdo, o_size);
640         CHECK_MEMBER(obdo, o_mtime);
641         CHECK_MEMBER(obdo, o_atime);
642         CHECK_MEMBER(obdo, o_ctime);
643         CHECK_MEMBER(obdo, o_blocks);
644         CHECK_MEMBER(obdo, o_grant);
645         CHECK_MEMBER(obdo, o_blksize);
646         CHECK_MEMBER(obdo, o_mode);
647         CHECK_MEMBER(obdo, o_uid);
648         CHECK_MEMBER(obdo, o_gid);
649         CHECK_MEMBER(obdo, o_flags);
650         CHECK_MEMBER(obdo, o_nlink);
651         CHECK_MEMBER(obdo, o_parent_oid);
652         CHECK_MEMBER(obdo, o_misc);
653         CHECK_MEMBER(obdo, o_ioepoch);
654         CHECK_MEMBER(obdo, o_stripe_idx);
655         CHECK_MEMBER(obdo, o_parent_ver);
656         CHECK_MEMBER(obdo, o_handle);
657         CHECK_MEMBER(obdo, o_layout);
658         CHECK_MEMBER(obdo, o_layout_version);
659         CHECK_MEMBER(obdo, o_uid_h);
660         CHECK_MEMBER(obdo, o_gid_h);
661         CHECK_MEMBER(obdo, o_data_version);
662         CHECK_MEMBER(obdo, o_projid);
663         CHECK_MEMBER(obdo, o_padding_4);
664         CHECK_MEMBER(obdo, o_padding_5);
665         CHECK_MEMBER(obdo, o_padding_6);
666
667         CHECK_DEFINE_64X(OBD_MD_FLID);
668         CHECK_DEFINE_64X(OBD_MD_FLATIME);
669         CHECK_DEFINE_64X(OBD_MD_FLMTIME);
670         CHECK_DEFINE_64X(OBD_MD_FLCTIME);
671         CHECK_DEFINE_64X(OBD_MD_FLSIZE);
672         CHECK_DEFINE_64X(OBD_MD_FLBLOCKS);
673         CHECK_DEFINE_64X(OBD_MD_FLBLKSZ);
674         CHECK_DEFINE_64X(OBD_MD_FLMODE);
675         CHECK_DEFINE_64X(OBD_MD_FLTYPE);
676         CHECK_DEFINE_64X(OBD_MD_FLUID);
677         CHECK_DEFINE_64X(OBD_MD_FLGID);
678         CHECK_DEFINE_64X(OBD_MD_FLFLAGS);
679         CHECK_DEFINE_64X(OBD_MD_FLNLINK);
680         CHECK_DEFINE_64X(OBD_MD_FLPARENT);
681         CHECK_DEFINE_64X(OBD_MD_FLRDEV);
682         CHECK_DEFINE_64X(OBD_MD_FLEASIZE);
683         CHECK_DEFINE_64X(OBD_MD_LINKNAME);
684         CHECK_DEFINE_64X(OBD_MD_FLHANDLE);
685         CHECK_DEFINE_64X(OBD_MD_FLCKSUM);
686         CHECK_DEFINE_64X(OBD_MD_FLGROUP);
687         CHECK_DEFINE_64X(OBD_MD_FLFID);
688         CHECK_DEFINE_64X(OBD_MD_FLGRANT);
689         CHECK_DEFINE_64X(OBD_MD_FLDIREA);
690         CHECK_DEFINE_64X(OBD_MD_FLUSRQUOTA);
691         CHECK_DEFINE_64X(OBD_MD_FLGRPQUOTA);
692         CHECK_DEFINE_64X(OBD_MD_FLMODEASIZE);
693         CHECK_DEFINE_64X(OBD_MD_MDS);
694         CHECK_DEFINE_64X(OBD_MD_MEA);
695         CHECK_DEFINE_64X(OBD_MD_TSTATE);
696         CHECK_DEFINE_64X(OBD_MD_FLXATTR);
697         CHECK_DEFINE_64X(OBD_MD_FLXATTRLS);
698         CHECK_DEFINE_64X(OBD_MD_FLXATTRRM);
699         CHECK_DEFINE_64X(OBD_MD_FLACL);
700         CHECK_DEFINE_64X(OBD_MD_FLCROSSREF);
701         CHECK_DEFINE_64X(OBD_MD_FLGETATTRLOCK);
702         CHECK_DEFINE_64X(OBD_MD_FLDATAVERSION);
703         CHECK_DEFINE_64X(OBD_MD_CLOSE_INTENT_EXECED);
704         CHECK_DEFINE_64X(OBD_MD_DEFAULT_MEA);
705         CHECK_DEFINE_64X(OBD_MD_FLOSTLAYOUT);
706         CHECK_DEFINE_64X(OBD_MD_FLPROJID);
707
708         CHECK_CVALUE_X(OBD_FL_INLINEDATA);
709         CHECK_CVALUE_X(OBD_FL_OBDMDEXISTS);
710         CHECK_CVALUE_X(OBD_FL_DELORPHAN);
711         CHECK_CVALUE_X(OBD_FL_NORPC);
712         CHECK_CVALUE_X(OBD_FL_IDONLY);
713         CHECK_CVALUE_X(OBD_FL_RECREATE_OBJS);
714         CHECK_CVALUE_X(OBD_FL_DEBUG_CHECK);
715         CHECK_CVALUE_X(OBD_FL_NO_USRQUOTA);
716         CHECK_CVALUE_X(OBD_FL_NO_GRPQUOTA);
717         CHECK_CVALUE_X(OBD_FL_CREATE_CROW);
718         CHECK_CVALUE_X(OBD_FL_SRVLOCK);
719         CHECK_CVALUE_X(OBD_FL_CKSUM_CRC32);
720         CHECK_CVALUE_X(OBD_FL_CKSUM_ADLER);
721         CHECK_CVALUE_X(OBD_FL_CKSUM_CRC32C);
722         CHECK_CVALUE_X(OBD_FL_CKSUM_T10IP512);
723         CHECK_CVALUE_X(OBD_FL_CKSUM_T10IP4K);
724         CHECK_CVALUE_X(OBD_FL_CKSUM_T10CRC512);
725         CHECK_CVALUE_X(OBD_FL_CKSUM_T10CRC4K);
726         CHECK_CVALUE_X(OBD_FL_CKSUM_RSVD3);
727         CHECK_CVALUE_X(OBD_FL_SHRINK_GRANT);
728         CHECK_CVALUE_X(OBD_FL_MMAP);
729         CHECK_CVALUE_X(OBD_FL_RECOV_RESEND);
730         CHECK_CVALUE_X(OBD_FL_NOSPC_BLK);
731         CHECK_CVALUE_X(OBD_FL_FLUSH);
732         CHECK_CVALUE_X(OBD_FL_SHORT_IO);
733 }
734
735 static void
736 check_lov_ost_data_v1(void)
737 {
738         BLANK_LINE();
739         CHECK_STRUCT(lov_ost_data_v1);
740         CHECK_MEMBER(lov_ost_data_v1, l_ost_oi);
741         CHECK_MEMBER(lov_ost_data_v1, l_ost_gen);
742         CHECK_MEMBER(lov_ost_data_v1, l_ost_idx);
743 }
744
745 static void
746 check_lov_mds_md_v1(void)
747 {
748         BLANK_LINE();
749         CHECK_STRUCT(lov_mds_md_v1);
750         CHECK_MEMBER(lov_mds_md_v1, lmm_magic);
751         CHECK_MEMBER(lov_mds_md_v1, lmm_pattern);
752         CHECK_MEMBER(lov_mds_md_v1, lmm_oi);
753         CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_size);
754         CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_count);
755         CHECK_MEMBER(lov_mds_md_v1, lmm_layout_gen);
756         CHECK_MEMBER(lov_mds_md_v1, lmm_objects[0]);
757
758         CHECK_CDEFINE(LOV_MAGIC_V1);
759 }
760
761 static void
762 check_lov_mds_md_v3(void)
763 {
764         BLANK_LINE();
765         CHECK_STRUCT(lov_mds_md_v3);
766         CHECK_MEMBER(lov_mds_md_v3, lmm_magic);
767         CHECK_MEMBER(lov_mds_md_v3, lmm_pattern);
768         CHECK_MEMBER(lov_mds_md_v3, lmm_oi);
769         CHECK_MEMBER(lov_mds_md_v3, lmm_stripe_size);
770         CHECK_MEMBER(lov_mds_md_v3, lmm_stripe_count);
771         CHECK_MEMBER(lov_mds_md_v3, lmm_layout_gen);
772         CHECK_CVALUE(LOV_MAXPOOLNAME);
773         CHECK_MEMBER(lov_mds_md_v3, lmm_pool_name[LOV_MAXPOOLNAME + 1]);
774         CHECK_MEMBER(lov_mds_md_v3, lmm_objects[0]);
775
776         CHECK_CDEFINE(LOV_MAGIC_V3);
777
778         CHECK_VALUE_X(LOV_PATTERN_RAID0);
779         CHECK_VALUE_X(LOV_PATTERN_RAID1);
780         CHECK_VALUE_X(LOV_PATTERN_MDT);
781         CHECK_VALUE_X(LOV_PATTERN_CMOBD);
782 }
783
784 static void
785 check_lov_comp_md_entry_v1(void)
786 {
787         BLANK_LINE();
788         CHECK_STRUCT(lov_comp_md_entry_v1);
789         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_id);
790         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_flags);
791         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_extent);
792         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_offset);
793         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_size);
794         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_layout_gen);
795         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_timestamp);
796         CHECK_MEMBER(lov_comp_md_entry_v1, lcme_padding_1);
797
798         CHECK_VALUE_X(LCME_FL_INIT);
799         CHECK_VALUE_X(LCME_FL_NEG);
800 }
801
802 static void
803 check_lov_comp_md_v1(void)
804 {
805         BLANK_LINE();
806         CHECK_STRUCT(lov_comp_md_v1);
807         CHECK_MEMBER(lov_comp_md_v1, lcm_magic);
808         CHECK_MEMBER(lov_comp_md_v1, lcm_size);
809         CHECK_MEMBER(lov_comp_md_v1, lcm_layout_gen);
810         CHECK_MEMBER(lov_comp_md_v1, lcm_flags);
811         CHECK_MEMBER(lov_comp_md_v1, lcm_entry_count);
812         CHECK_MEMBER(lov_comp_md_v1, lcm_mirror_count);
813         CHECK_MEMBER(lov_comp_md_v1, lcm_padding1);
814         CHECK_MEMBER(lov_comp_md_v1, lcm_padding2);
815         CHECK_MEMBER(lov_comp_md_v1, lcm_entries[0]);
816
817         CHECK_CDEFINE(LOV_MAGIC_COMP_V1);
818
819         CHECK_VALUE(LCM_FL_NONE);
820         CHECK_VALUE(LCM_FL_RDONLY);
821         CHECK_VALUE(LCM_FL_WRITE_PENDING);
822         CHECK_VALUE(LCM_FL_SYNC_PENDING);
823 }
824
825 static void
826 check_lmv_mds_md_v1(void)
827 {
828         BLANK_LINE();
829         CHECK_STRUCT(lmv_mds_md_v1);
830         CHECK_MEMBER(lmv_mds_md_v1, lmv_magic);
831         CHECK_MEMBER(lmv_mds_md_v1, lmv_stripe_count);
832         CHECK_MEMBER(lmv_mds_md_v1, lmv_master_mdt_index);
833         CHECK_MEMBER(lmv_mds_md_v1, lmv_hash_type);
834         CHECK_MEMBER(lmv_mds_md_v1, lmv_layout_version);
835         CHECK_MEMBER(lmv_mds_md_v1, lmv_migrate_offset);
836         CHECK_MEMBER(lmv_mds_md_v1, lmv_migrate_hash);
837         CHECK_MEMBER(lmv_mds_md_v1, lmv_padding2);
838         CHECK_MEMBER(lmv_mds_md_v1, lmv_padding3);
839         CHECK_MEMBER(lmv_mds_md_v1, lmv_pool_name[LOV_MAXPOOLNAME]);
840         CHECK_MEMBER(lmv_mds_md_v1, lmv_stripe_fids[0]);
841
842         CHECK_CDEFINE(LMV_MAGIC_V1);
843         CHECK_CDEFINE(LMV_MAGIC_STRIPE);
844         CHECK_CDEFINE(LMV_HASH_TYPE_MASK);
845         CHECK_CDEFINE(LMV_HASH_FLAG_MIGRATION);
846         CHECK_CDEFINE(LMV_HASH_FLAG_DEAD);
847         CHECK_CDEFINE(LMV_HASH_FLAG_BAD_TYPE);
848         CHECK_CDEFINE(LMV_HASH_FLAG_LOST_LMV);
849 }
850
851 static void
852 check_obd_statfs(void)
853 {
854         BLANK_LINE();
855         CHECK_STRUCT(obd_statfs);
856         CHECK_MEMBER(obd_statfs, os_type);
857         CHECK_MEMBER(obd_statfs, os_blocks);
858         CHECK_MEMBER(obd_statfs, os_bfree);
859         CHECK_MEMBER(obd_statfs, os_bavail);
860         CHECK_MEMBER(obd_statfs, os_files);
861         CHECK_MEMBER(obd_statfs, os_ffree);
862         CHECK_MEMBER(obd_statfs, os_fsid);
863         CHECK_MEMBER(obd_statfs, os_bsize);
864         CHECK_MEMBER(obd_statfs, os_namelen);
865         CHECK_MEMBER(obd_statfs, os_maxbytes);
866         CHECK_MEMBER(obd_statfs, os_state);
867         CHECK_MEMBER(obd_statfs, os_fprecreated);
868         CHECK_MEMBER(obd_statfs, os_granted);
869         CHECK_MEMBER(obd_statfs, os_spare3);
870         CHECK_MEMBER(obd_statfs, os_spare4);
871         CHECK_MEMBER(obd_statfs, os_spare5);
872         CHECK_MEMBER(obd_statfs, os_spare6);
873         CHECK_MEMBER(obd_statfs, os_spare7);
874         CHECK_MEMBER(obd_statfs, os_spare8);
875         CHECK_MEMBER(obd_statfs, os_spare9);
876 }
877
878 static void
879 check_obd_ioobj(void)
880 {
881         BLANK_LINE();
882         CHECK_STRUCT(obd_ioobj);
883         CHECK_MEMBER(obd_ioobj, ioo_oid);
884         CHECK_MEMBER(obd_ioobj, ioo_max_brw);
885         CHECK_MEMBER(obd_ioobj, ioo_bufcnt);
886         CHECK_VALUE(IOOBJ_MAX_BRW_BITS);
887 }
888
889 static void
890 check_obd_quotactl(void)
891 {
892
893         BLANK_LINE();
894         CHECK_UNION(lquota_id);
895
896         BLANK_LINE();
897         CHECK_VALUE(QUOTABLOCK_BITS);
898         CHECK_VALUE(QUOTABLOCK_SIZE);
899
900         BLANK_LINE();
901         CHECK_STRUCT(obd_quotactl);
902         CHECK_MEMBER(obd_quotactl, qc_cmd);
903         CHECK_MEMBER(obd_quotactl, qc_type);
904         CHECK_MEMBER(obd_quotactl, qc_id);
905         CHECK_MEMBER(obd_quotactl, qc_stat);
906         CHECK_MEMBER(obd_quotactl, qc_dqinfo);
907         CHECK_MEMBER(obd_quotactl, qc_dqblk);
908
909         BLANK_LINE();
910         CHECK_STRUCT(obd_dqinfo);
911         CHECK_MEMBER(obd_dqinfo, dqi_bgrace);
912         CHECK_MEMBER(obd_dqinfo, dqi_igrace);
913         CHECK_MEMBER(obd_dqinfo, dqi_flags);
914         CHECK_MEMBER(obd_dqinfo, dqi_valid);
915
916         BLANK_LINE();
917         CHECK_STRUCT(obd_dqblk);
918         CHECK_MEMBER(obd_dqblk, dqb_bhardlimit);
919         CHECK_MEMBER(obd_dqblk, dqb_bsoftlimit);
920         CHECK_MEMBER(obd_dqblk, dqb_curspace);
921         CHECK_MEMBER(obd_dqblk, dqb_ihardlimit);
922         CHECK_MEMBER(obd_dqblk, dqb_isoftlimit);
923         CHECK_MEMBER(obd_dqblk, dqb_curinodes);
924         CHECK_MEMBER(obd_dqblk, dqb_btime);
925         CHECK_MEMBER(obd_dqblk, dqb_itime);
926         CHECK_MEMBER(obd_dqblk, dqb_valid);
927         CHECK_MEMBER(obd_dqblk, dqb_padding);
928
929         CHECK_DEFINE_X(Q_QUOTACHECK);
930         CHECK_DEFINE_X(Q_INITQUOTA);
931         CHECK_DEFINE_X(Q_GETOINFO);
932         CHECK_DEFINE_X(Q_GETOQUOTA);
933         CHECK_DEFINE_X(Q_FINVALIDATE);
934
935         BLANK_LINE();
936         CHECK_STRUCT(lquota_acct_rec);
937         CHECK_MEMBER(lquota_acct_rec, bspace);
938         CHECK_MEMBER(lquota_acct_rec, ispace);
939
940         BLANK_LINE();
941         CHECK_STRUCT(lquota_glb_rec);
942         CHECK_MEMBER(lquota_glb_rec, qbr_hardlimit);
943         CHECK_MEMBER(lquota_glb_rec, qbr_softlimit);
944         CHECK_MEMBER(lquota_glb_rec, qbr_time);
945         CHECK_MEMBER(lquota_glb_rec, qbr_granted);
946
947         BLANK_LINE();
948         CHECK_STRUCT(lquota_slv_rec);
949         CHECK_MEMBER(lquota_slv_rec, qsr_granted);
950
951 }
952
953 static void
954 check_obd_idx_read(void)
955 {
956         BLANK_LINE();
957         CHECK_STRUCT(idx_info);
958         CHECK_MEMBER(idx_info, ii_magic);
959         CHECK_MEMBER(idx_info, ii_flags);
960         CHECK_MEMBER(idx_info, ii_count);
961         CHECK_MEMBER(idx_info, ii_pad0);
962         CHECK_MEMBER(idx_info, ii_attrs);
963         CHECK_MEMBER(idx_info, ii_fid);
964         CHECK_MEMBER(idx_info, ii_version);
965         CHECK_MEMBER(idx_info, ii_hash_start);
966         CHECK_MEMBER(idx_info, ii_hash_end);
967         CHECK_MEMBER(idx_info, ii_keysize);
968         CHECK_MEMBER(idx_info, ii_recsize);
969         CHECK_MEMBER(idx_info, ii_pad1);
970         CHECK_MEMBER(idx_info, ii_pad2);
971         CHECK_MEMBER(idx_info, ii_pad3);
972         CHECK_CDEFINE(IDX_INFO_MAGIC);
973
974         BLANK_LINE();
975         CHECK_STRUCT(lu_idxpage);
976         CHECK_MEMBER(lu_idxpage, lip_magic);
977         CHECK_MEMBER(lu_idxpage, lip_flags);
978         CHECK_MEMBER(lu_idxpage, lip_nr);
979         CHECK_MEMBER(lu_idxpage, lip_pad0);
980
981         CHECK_CDEFINE(LIP_MAGIC);
982         CHECK_VALUE(LIP_HDR_SIZE);
983
984         CHECK_VALUE(II_FL_NOHASH);
985         CHECK_VALUE(II_FL_VARKEY);
986         CHECK_VALUE(II_FL_VARREC);
987         CHECK_VALUE(II_FL_NONUNQ);
988 }
989
990 static void
991 check_niobuf_remote(void)
992 {
993         BLANK_LINE();
994         CHECK_STRUCT(niobuf_remote);
995         CHECK_MEMBER(niobuf_remote, rnb_offset);
996         CHECK_MEMBER(niobuf_remote, rnb_len);
997         CHECK_MEMBER(niobuf_remote, rnb_flags);
998
999         CHECK_DEFINE_X(OBD_BRW_READ);
1000         CHECK_DEFINE_X(OBD_BRW_WRITE);
1001         CHECK_DEFINE_X(OBD_BRW_SYNC);
1002         CHECK_DEFINE_X(OBD_BRW_CHECK);
1003         CHECK_DEFINE_X(OBD_BRW_FROM_GRANT);
1004         CHECK_DEFINE_X(OBD_BRW_GRANTED);
1005         CHECK_DEFINE_X(OBD_BRW_NOCACHE);
1006         CHECK_DEFINE_X(OBD_BRW_NOQUOTA);
1007         CHECK_DEFINE_X(OBD_BRW_SRVLOCK);
1008         CHECK_DEFINE_X(OBD_BRW_ASYNC);
1009         CHECK_DEFINE_X(OBD_BRW_MEMALLOC);
1010         CHECK_DEFINE_X(OBD_BRW_OVER_USRQUOTA);
1011         CHECK_DEFINE_X(OBD_BRW_OVER_GRPQUOTA);
1012         CHECK_DEFINE_X(OBD_BRW_SOFT_SYNC);
1013 }
1014
1015 static void
1016 check_ost_body(void)
1017 {
1018         BLANK_LINE();
1019         CHECK_STRUCT(ost_body);
1020         CHECK_MEMBER(ost_body, oa);
1021 }
1022
1023 static void
1024 check_ll_fid(void)
1025 {
1026         BLANK_LINE();
1027         CHECK_STRUCT(ll_fid);
1028         CHECK_MEMBER(ll_fid, id);
1029         CHECK_MEMBER(ll_fid, generation);
1030         CHECK_MEMBER(ll_fid, f_type);
1031 }
1032
1033 static void
1034 check_mds_op_bias(void)
1035 {
1036         BLANK_LINE();
1037         CHECK_VALUE_X(MDS_CROSS_REF);
1038         CHECK_VALUE_X(MDS_PERM_BYPASS);
1039         CHECK_VALUE_X(MDS_QUOTA_IGNORE);
1040         CHECK_VALUE_X(MDS_KEEP_ORPHAN);
1041         CHECK_VALUE_X(MDS_RECOV_OPEN);
1042         CHECK_VALUE_X(MDS_DATA_MODIFIED);
1043         CHECK_VALUE_X(MDS_CREATE_VOLATILE);
1044         CHECK_VALUE_X(MDS_OWNEROVERRIDE);
1045         CHECK_VALUE_X(MDS_HSM_RELEASE);
1046         CHECK_VALUE_X(MDS_CLOSE_LAYOUT_SWAP);
1047         CHECK_VALUE_X(MDS_CLOSE_LAYOUT_MERGE);
1048         CHECK_VALUE_X(MDS_CLOSE_RESYNC_DONE);
1049         CHECK_VALUE_X(MDS_CLOSE_LAYOUT_SPLIT);
1050 }
1051
1052 static void
1053 check_mdt_body(void)
1054 {
1055         BLANK_LINE();
1056         CHECK_STRUCT(mdt_body);
1057         CHECK_MEMBER(mdt_body, mbo_fid1);
1058         CHECK_MEMBER(mdt_body, mbo_fid2);
1059         CHECK_MEMBER(mdt_body, mbo_open_handle);
1060         CHECK_MEMBER(mdt_body, mbo_valid);
1061         CHECK_MEMBER(mdt_body, mbo_size);
1062         CHECK_MEMBER(mdt_body, mbo_mtime);
1063         CHECK_MEMBER(mdt_body, mbo_atime);
1064         CHECK_MEMBER(mdt_body, mbo_ctime);
1065         CHECK_MEMBER(mdt_body, mbo_blocks);
1066         CHECK_MEMBER(mdt_body, mbo_version);
1067         CHECK_MEMBER(mdt_body, mbo_t_state);
1068         CHECK_MEMBER(mdt_body, mbo_fsuid);
1069         CHECK_MEMBER(mdt_body, mbo_fsgid);
1070         CHECK_MEMBER(mdt_body, mbo_capability);
1071         CHECK_MEMBER(mdt_body, mbo_mode);
1072         CHECK_MEMBER(mdt_body, mbo_uid);
1073         CHECK_MEMBER(mdt_body, mbo_gid);
1074         CHECK_MEMBER(mdt_body, mbo_flags);
1075         CHECK_MEMBER(mdt_body, mbo_rdev);
1076         CHECK_MEMBER(mdt_body, mbo_nlink);
1077         CHECK_MEMBER(mdt_body, mbo_layout_gen);
1078         CHECK_MEMBER(mdt_body, mbo_suppgid);
1079         CHECK_MEMBER(mdt_body, mbo_eadatasize);
1080         CHECK_MEMBER(mdt_body, mbo_aclsize);
1081         CHECK_MEMBER(mdt_body, mbo_max_mdsize);
1082         CHECK_MEMBER(mdt_body, mbo_unused3);
1083         CHECK_MEMBER(mdt_body, mbo_uid_h);
1084         CHECK_MEMBER(mdt_body, mbo_gid_h);
1085         CHECK_MEMBER(mdt_body, mbo_projid);
1086         CHECK_MEMBER(mdt_body, mbo_dom_size);
1087         CHECK_MEMBER(mdt_body, mbo_dom_blocks);
1088         CHECK_MEMBER(mdt_body, mbo_padding_8);
1089         CHECK_MEMBER(mdt_body, mbo_padding_9);
1090         CHECK_MEMBER(mdt_body, mbo_padding_10);
1091
1092         CHECK_VALUE_O(MDS_FMODE_CLOSED);
1093         CHECK_VALUE_O(MDS_FMODE_EXEC);
1094
1095         CHECK_VALUE_O(MDS_OPEN_CREATED);
1096         CHECK_VALUE_O(MDS_OPEN_CROSS);
1097         CHECK_VALUE_O(MDS_OPEN_CREAT);
1098         CHECK_VALUE_O(MDS_OPEN_EXCL);
1099         CHECK_VALUE_O(MDS_OPEN_TRUNC);
1100         CHECK_VALUE_O(MDS_OPEN_APPEND);
1101         CHECK_VALUE_O(MDS_OPEN_SYNC);
1102         CHECK_VALUE_O(MDS_OPEN_DIRECTORY);
1103         CHECK_VALUE_O(MDS_OPEN_BY_FID);
1104         CHECK_VALUE_O(MDS_OPEN_DELAY_CREATE);
1105         CHECK_VALUE_O(MDS_OPEN_OWNEROVERRIDE);
1106         CHECK_VALUE_O(MDS_OPEN_JOIN_FILE);
1107         CHECK_VALUE_O(MDS_OPEN_LOCK);
1108         CHECK_VALUE_O(MDS_OPEN_HAS_EA);
1109         CHECK_VALUE_O(MDS_OPEN_HAS_OBJS);
1110         CHECK_VALUE_64O(MDS_OPEN_NORESTORE);
1111         CHECK_VALUE_64O(MDS_OPEN_NEWSTRIPE);
1112         CHECK_VALUE_64O(MDS_OPEN_VOLATILE);
1113
1114         /* these should be identical to their EXT3_*_FL counterparts, and
1115          * are redefined only to avoid dragging in ext3_fs.h */
1116         CHECK_VALUE_X(LUSTRE_SYNC_FL);
1117         CHECK_VALUE_X(LUSTRE_IMMUTABLE_FL);
1118         CHECK_VALUE_X(LUSTRE_APPEND_FL);
1119         CHECK_VALUE_X(LUSTRE_NODUMP_FL);
1120         CHECK_VALUE_X(LUSTRE_NOATIME_FL);
1121         CHECK_VALUE_X(LUSTRE_INDEX_FL);
1122         CHECK_VALUE_X(LUSTRE_ORPHAN_FL);
1123         CHECK_VALUE_X(LUSTRE_DIRSYNC_FL);
1124         CHECK_VALUE_X(LUSTRE_TOPDIR_FL);
1125         CHECK_VALUE_X(LUSTRE_DIRECTIO_FL);
1126         CHECK_VALUE_X(LUSTRE_INLINE_DATA_FL);
1127
1128         CHECK_DEFINE_X(MDS_INODELOCK_LOOKUP);
1129         CHECK_DEFINE_X(MDS_INODELOCK_UPDATE);
1130         CHECK_DEFINE_X(MDS_INODELOCK_OPEN);
1131         CHECK_DEFINE_X(MDS_INODELOCK_LAYOUT);
1132 }
1133
1134 static void
1135 check_mdt_ioepoch(void)
1136 {
1137         BLANK_LINE();
1138         CHECK_STRUCT(mdt_ioepoch);
1139         CHECK_MEMBER(mdt_ioepoch, mio_open_handle);
1140         CHECK_MEMBER(mdt_ioepoch, mio_unused1);
1141         CHECK_MEMBER(mdt_ioepoch, mio_unused2);
1142         CHECK_MEMBER(mdt_ioepoch, mio_padding);
1143 }
1144
1145 static void
1146 check_mdt_rec_setattr(void)
1147 {
1148         BLANK_LINE();
1149         CHECK_STRUCT(mdt_rec_setattr);
1150         CHECK_MEMBER(mdt_rec_setattr, sa_opcode);
1151         CHECK_MEMBER(mdt_rec_setattr, sa_cap);
1152         CHECK_MEMBER(mdt_rec_setattr, sa_fsuid);
1153         CHECK_MEMBER(mdt_rec_setattr, sa_fsuid_h);
1154         CHECK_MEMBER(mdt_rec_setattr, sa_fsgid);
1155         CHECK_MEMBER(mdt_rec_setattr, sa_fsgid_h);
1156         CHECK_MEMBER(mdt_rec_setattr, sa_suppgid);
1157         CHECK_MEMBER(mdt_rec_setattr, sa_suppgid_h);
1158         CHECK_MEMBER(mdt_rec_setattr, sa_padding_1);
1159         CHECK_MEMBER(mdt_rec_setattr, sa_padding_1_h);
1160         CHECK_MEMBER(mdt_rec_setattr, sa_fid);
1161         CHECK_MEMBER(mdt_rec_setattr, sa_valid);
1162         CHECK_MEMBER(mdt_rec_setattr, sa_uid);
1163         CHECK_MEMBER(mdt_rec_setattr, sa_gid);
1164         CHECK_MEMBER(mdt_rec_setattr, sa_size);
1165         CHECK_MEMBER(mdt_rec_setattr, sa_blocks);
1166         CHECK_MEMBER(mdt_rec_setattr, sa_mtime);
1167         CHECK_MEMBER(mdt_rec_setattr, sa_atime);
1168         CHECK_MEMBER(mdt_rec_setattr, sa_ctime);
1169         CHECK_MEMBER(mdt_rec_setattr, sa_attr_flags);
1170         CHECK_MEMBER(mdt_rec_setattr, sa_mode);
1171         CHECK_MEMBER(mdt_rec_setattr, sa_bias);
1172         CHECK_MEMBER(mdt_rec_setattr, sa_projid);
1173         CHECK_MEMBER(mdt_rec_setattr, sa_padding_4);
1174         CHECK_MEMBER(mdt_rec_setattr, sa_padding_5);
1175 }
1176
1177 static void
1178 check_mdt_rec_create(void)
1179 {
1180         BLANK_LINE();
1181         CHECK_STRUCT(mdt_rec_create);
1182         CHECK_MEMBER(mdt_rec_create, cr_opcode);
1183         CHECK_MEMBER(mdt_rec_create, cr_cap);
1184         CHECK_MEMBER(mdt_rec_create, cr_fsuid);
1185         CHECK_MEMBER(mdt_rec_create, cr_fsuid_h);
1186         CHECK_MEMBER(mdt_rec_create, cr_fsgid);
1187         CHECK_MEMBER(mdt_rec_create, cr_fsgid_h);
1188         CHECK_MEMBER(mdt_rec_create, cr_suppgid1);
1189         CHECK_MEMBER(mdt_rec_create, cr_suppgid1_h);
1190         CHECK_MEMBER(mdt_rec_create, cr_suppgid2);
1191         CHECK_MEMBER(mdt_rec_create, cr_suppgid2_h);
1192         CHECK_MEMBER(mdt_rec_create, cr_fid1);
1193         CHECK_MEMBER(mdt_rec_create, cr_fid2);
1194         CHECK_MEMBER(mdt_rec_create, cr_open_handle_old);
1195         CHECK_MEMBER(mdt_rec_create, cr_time);
1196         CHECK_MEMBER(mdt_rec_create, cr_rdev);
1197         CHECK_MEMBER(mdt_rec_create, cr_ioepoch);
1198         CHECK_MEMBER(mdt_rec_create, cr_padding_1);
1199         CHECK_MEMBER(mdt_rec_create, cr_mode);
1200         CHECK_MEMBER(mdt_rec_create, cr_bias);
1201         CHECK_MEMBER(mdt_rec_create, cr_flags_l);
1202         CHECK_MEMBER(mdt_rec_create, cr_flags_h);
1203         CHECK_MEMBER(mdt_rec_create, cr_umask);
1204         CHECK_MEMBER(mdt_rec_create, cr_padding_4);
1205 }
1206
1207 static void
1208 check_mdt_rec_link(void)
1209 {
1210         BLANK_LINE();
1211         CHECK_STRUCT(mdt_rec_link);
1212         CHECK_MEMBER(mdt_rec_link, lk_opcode);
1213         CHECK_MEMBER(mdt_rec_link, lk_cap);
1214         CHECK_MEMBER(mdt_rec_link, lk_fsuid);
1215         CHECK_MEMBER(mdt_rec_link, lk_fsuid_h);
1216         CHECK_MEMBER(mdt_rec_link, lk_fsgid);
1217         CHECK_MEMBER(mdt_rec_link, lk_fsgid_h);
1218         CHECK_MEMBER(mdt_rec_link, lk_suppgid1);
1219         CHECK_MEMBER(mdt_rec_link, lk_suppgid1_h);
1220         CHECK_MEMBER(mdt_rec_link, lk_suppgid2);
1221         CHECK_MEMBER(mdt_rec_link, lk_suppgid2_h);
1222         CHECK_MEMBER(mdt_rec_link, lk_fid1);
1223         CHECK_MEMBER(mdt_rec_link, lk_fid2);
1224         CHECK_MEMBER(mdt_rec_link, lk_time);
1225         CHECK_MEMBER(mdt_rec_link, lk_padding_1);
1226         CHECK_MEMBER(mdt_rec_link, lk_padding_2);
1227         CHECK_MEMBER(mdt_rec_link, lk_padding_3);
1228         CHECK_MEMBER(mdt_rec_link, lk_padding_4);
1229         CHECK_MEMBER(mdt_rec_link, lk_bias);
1230         CHECK_MEMBER(mdt_rec_link, lk_padding_5);
1231         CHECK_MEMBER(mdt_rec_link, lk_padding_6);
1232         CHECK_MEMBER(mdt_rec_link, lk_padding_7);
1233         CHECK_MEMBER(mdt_rec_link, lk_padding_8);
1234         CHECK_MEMBER(mdt_rec_link, lk_padding_9);
1235 }
1236
1237 static void
1238 check_mdt_rec_unlink(void)
1239 {
1240         BLANK_LINE();
1241         CHECK_STRUCT(mdt_rec_unlink);
1242         CHECK_MEMBER(mdt_rec_unlink, ul_opcode);
1243         CHECK_MEMBER(mdt_rec_unlink, ul_cap);
1244         CHECK_MEMBER(mdt_rec_unlink, ul_fsuid);
1245         CHECK_MEMBER(mdt_rec_unlink, ul_fsuid_h);
1246         CHECK_MEMBER(mdt_rec_unlink, ul_fsgid);
1247         CHECK_MEMBER(mdt_rec_unlink, ul_fsgid_h);
1248         CHECK_MEMBER(mdt_rec_unlink, ul_suppgid1);
1249         CHECK_MEMBER(mdt_rec_unlink, ul_suppgid1_h);
1250         CHECK_MEMBER(mdt_rec_unlink, ul_suppgid2);
1251         CHECK_MEMBER(mdt_rec_unlink, ul_suppgid2_h);
1252         CHECK_MEMBER(mdt_rec_unlink, ul_fid1);
1253         CHECK_MEMBER(mdt_rec_unlink, ul_fid2);
1254         CHECK_MEMBER(mdt_rec_unlink, ul_time);
1255         CHECK_MEMBER(mdt_rec_unlink, ul_padding_2);
1256         CHECK_MEMBER(mdt_rec_unlink, ul_padding_3);
1257         CHECK_MEMBER(mdt_rec_unlink, ul_padding_4);
1258         CHECK_MEMBER(mdt_rec_unlink, ul_padding_5);
1259         CHECK_MEMBER(mdt_rec_unlink, ul_bias);
1260         CHECK_MEMBER(mdt_rec_unlink, ul_mode);
1261         CHECK_MEMBER(mdt_rec_unlink, ul_padding_6);
1262         CHECK_MEMBER(mdt_rec_unlink, ul_padding_7);
1263         CHECK_MEMBER(mdt_rec_unlink, ul_padding_8);
1264         CHECK_MEMBER(mdt_rec_unlink, ul_padding_9);
1265 }
1266
1267 static void
1268 check_mdt_rec_rename(void)
1269 {
1270         BLANK_LINE();
1271         CHECK_STRUCT(mdt_rec_rename);
1272         CHECK_MEMBER(mdt_rec_rename, rn_opcode);
1273         CHECK_MEMBER(mdt_rec_rename, rn_cap);
1274         CHECK_MEMBER(mdt_rec_rename, rn_fsuid);
1275         CHECK_MEMBER(mdt_rec_rename, rn_fsuid_h);
1276         CHECK_MEMBER(mdt_rec_rename, rn_fsgid);
1277         CHECK_MEMBER(mdt_rec_rename, rn_fsgid_h);
1278         CHECK_MEMBER(mdt_rec_rename, rn_suppgid1);
1279         CHECK_MEMBER(mdt_rec_rename, rn_suppgid1_h);
1280         CHECK_MEMBER(mdt_rec_rename, rn_suppgid2);
1281         CHECK_MEMBER(mdt_rec_rename, rn_suppgid2_h);
1282         CHECK_MEMBER(mdt_rec_rename, rn_fid1);
1283         CHECK_MEMBER(mdt_rec_rename, rn_fid2);
1284         CHECK_MEMBER(mdt_rec_rename, rn_time);
1285         CHECK_MEMBER(mdt_rec_rename, rn_padding_1);
1286         CHECK_MEMBER(mdt_rec_rename, rn_padding_2);
1287         CHECK_MEMBER(mdt_rec_rename, rn_padding_3);
1288         CHECK_MEMBER(mdt_rec_rename, rn_padding_4);
1289         CHECK_MEMBER(mdt_rec_rename, rn_bias);
1290         CHECK_MEMBER(mdt_rec_rename, rn_mode);
1291         CHECK_MEMBER(mdt_rec_rename, rn_padding_5);
1292         CHECK_MEMBER(mdt_rec_rename, rn_padding_6);
1293         CHECK_MEMBER(mdt_rec_rename, rn_padding_7);
1294         CHECK_MEMBER(mdt_rec_rename, rn_padding_8);
1295 }
1296
1297 static void
1298 check_mdt_rec_setxattr(void)
1299 {
1300         BLANK_LINE();
1301         CHECK_STRUCT(mdt_rec_setxattr);
1302         CHECK_MEMBER(mdt_rec_setxattr, sx_opcode);
1303         CHECK_MEMBER(mdt_rec_setxattr, sx_cap);
1304         CHECK_MEMBER(mdt_rec_setxattr, sx_fsuid);
1305         CHECK_MEMBER(mdt_rec_setxattr, sx_fsuid_h);
1306         CHECK_MEMBER(mdt_rec_setxattr, sx_fsgid);
1307         CHECK_MEMBER(mdt_rec_setxattr, sx_fsgid_h);
1308         CHECK_MEMBER(mdt_rec_setxattr, sx_suppgid1);
1309         CHECK_MEMBER(mdt_rec_setxattr, sx_suppgid1_h);
1310         CHECK_MEMBER(mdt_rec_setxattr, sx_suppgid2);
1311         CHECK_MEMBER(mdt_rec_setxattr, sx_suppgid2_h);
1312         CHECK_MEMBER(mdt_rec_setxattr, sx_fid);
1313         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_1);
1314         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_2);
1315         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_3);
1316         CHECK_MEMBER(mdt_rec_setxattr, sx_valid);
1317         CHECK_MEMBER(mdt_rec_setxattr, sx_time);
1318         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_5);
1319         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_6);
1320         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_7);
1321         CHECK_MEMBER(mdt_rec_setxattr, sx_size);
1322         CHECK_MEMBER(mdt_rec_setxattr, sx_flags);
1323         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_8);
1324         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_9);
1325         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_10);
1326         CHECK_MEMBER(mdt_rec_setxattr, sx_padding_11);
1327 }
1328
1329 static void
1330 check_mdt_rec_resync(void)
1331 {
1332         BLANK_LINE();
1333         CHECK_STRUCT(mdt_rec_resync);
1334         CHECK_MEMBER(mdt_rec_resync, rs_opcode);
1335         CHECK_MEMBER(mdt_rec_resync, rs_cap);
1336         CHECK_MEMBER(mdt_rec_resync, rs_fsuid);
1337         CHECK_MEMBER(mdt_rec_resync, rs_fsuid_h);
1338         CHECK_MEMBER(mdt_rec_resync, rs_fsgid);
1339         CHECK_MEMBER(mdt_rec_resync, rs_fsgid_h);
1340         CHECK_MEMBER(mdt_rec_resync, rs_suppgid1);
1341         CHECK_MEMBER(mdt_rec_resync, rs_suppgid1_h);
1342         CHECK_MEMBER(mdt_rec_resync, rs_suppgid2);
1343         CHECK_MEMBER(mdt_rec_resync, rs_suppgid2_h);
1344         CHECK_MEMBER(mdt_rec_resync, rs_fid);
1345         CHECK_MEMBER(mdt_rec_resync, rs_padding0);
1346         CHECK_MEMBER(mdt_rec_resync, rs_padding1);
1347         CHECK_MEMBER(mdt_rec_resync, rs_padding2);
1348         CHECK_MEMBER(mdt_rec_resync, rs_padding3);
1349         CHECK_MEMBER(mdt_rec_resync, rs_padding4);
1350         CHECK_MEMBER(mdt_rec_resync, rs_bias);
1351         CHECK_MEMBER(mdt_rec_resync, rs_padding5);
1352         CHECK_MEMBER(mdt_rec_resync, rs_padding6);
1353         CHECK_MEMBER(mdt_rec_resync, rs_padding7);
1354         CHECK_MEMBER(mdt_rec_resync, rs_padding8);
1355         CHECK_MEMBER(mdt_rec_resync, rs_padding9);
1356 }
1357
1358 static void
1359 check_mdt_rec_reint(void)
1360 {
1361         BLANK_LINE();
1362         CHECK_STRUCT(mdt_rec_reint);
1363         CHECK_MEMBER(mdt_rec_reint, rr_opcode);
1364         CHECK_MEMBER(mdt_rec_reint, rr_cap);
1365         CHECK_MEMBER(mdt_rec_reint, rr_fsuid);
1366         CHECK_MEMBER(mdt_rec_reint, rr_fsuid_h);
1367         CHECK_MEMBER(mdt_rec_reint, rr_fsgid);
1368         CHECK_MEMBER(mdt_rec_reint, rr_fsgid_h);
1369         CHECK_MEMBER(mdt_rec_reint, rr_suppgid1);
1370         CHECK_MEMBER(mdt_rec_reint, rr_suppgid1_h);
1371         CHECK_MEMBER(mdt_rec_reint, rr_suppgid2);
1372         CHECK_MEMBER(mdt_rec_reint, rr_suppgid2_h);
1373         CHECK_MEMBER(mdt_rec_reint, rr_fid1);
1374         CHECK_MEMBER(mdt_rec_reint, rr_fid2);
1375         CHECK_MEMBER(mdt_rec_reint, rr_mtime);
1376         CHECK_MEMBER(mdt_rec_reint, rr_atime);
1377         CHECK_MEMBER(mdt_rec_reint, rr_ctime);
1378         CHECK_MEMBER(mdt_rec_reint, rr_size);
1379         CHECK_MEMBER(mdt_rec_reint, rr_blocks);
1380         CHECK_MEMBER(mdt_rec_reint, rr_bias);
1381         CHECK_MEMBER(mdt_rec_reint, rr_mode);
1382         CHECK_MEMBER(mdt_rec_reint, rr_flags);
1383         CHECK_MEMBER(mdt_rec_reint, rr_flags_h);
1384         CHECK_MEMBER(mdt_rec_reint, rr_umask);
1385         CHECK_MEMBER(mdt_rec_reint, rr_padding_4);
1386 }
1387
1388 static void
1389 check_lmv_desc(void)
1390 {
1391         BLANK_LINE();
1392         CHECK_STRUCT(lmv_desc);
1393         CHECK_MEMBER(lmv_desc, ld_tgt_count);
1394         CHECK_MEMBER(lmv_desc, ld_active_tgt_count);
1395         CHECK_MEMBER(lmv_desc, ld_default_stripe_count);
1396         CHECK_MEMBER(lmv_desc, ld_pattern);
1397         CHECK_MEMBER(lmv_desc, ld_default_hash_size);
1398         CHECK_MEMBER(lmv_desc, ld_padding_1);
1399         CHECK_MEMBER(lmv_desc, ld_padding_2);
1400         CHECK_MEMBER(lmv_desc, ld_qos_maxage);
1401         CHECK_MEMBER(lmv_desc, ld_padding_3);
1402         CHECK_MEMBER(lmv_desc, ld_padding_4);
1403         CHECK_MEMBER(lmv_desc, ld_uuid);
1404 }
1405
1406 static void
1407 check_lov_desc(void)
1408 {
1409         BLANK_LINE();
1410         CHECK_STRUCT(lov_desc);
1411         CHECK_MEMBER(lov_desc, ld_tgt_count);
1412         CHECK_MEMBER(lov_desc, ld_active_tgt_count);
1413         CHECK_MEMBER(lov_desc, ld_default_stripe_count);
1414         CHECK_MEMBER(lov_desc, ld_pattern);
1415         CHECK_MEMBER(lov_desc, ld_default_stripe_size);
1416         CHECK_MEMBER(lov_desc, ld_default_stripe_offset);
1417         CHECK_MEMBER(lov_desc, ld_padding_0);
1418         CHECK_MEMBER(lov_desc, ld_qos_maxage);
1419         CHECK_MEMBER(lov_desc, ld_padding_1);
1420         CHECK_MEMBER(lov_desc, ld_padding_2);
1421         CHECK_MEMBER(lov_desc, ld_uuid);
1422
1423         CHECK_CDEFINE(LOV_DESC_MAGIC);
1424 }
1425
1426 static void
1427 check_ldlm_res_id(void)
1428 {
1429         BLANK_LINE();
1430         CHECK_STRUCT(ldlm_res_id);
1431         CHECK_CVALUE(RES_NAME_SIZE);
1432         CHECK_MEMBER(ldlm_res_id, name[RES_NAME_SIZE]);
1433 }
1434
1435 static void
1436 check_ldlm_extent(void)
1437 {
1438         BLANK_LINE();
1439         CHECK_STRUCT(ldlm_extent);
1440         CHECK_MEMBER(ldlm_extent, start);
1441         CHECK_MEMBER(ldlm_extent, end);
1442         CHECK_MEMBER(ldlm_extent, gid);
1443 }
1444
1445 static void
1446 check_ldlm_inodebits(void)
1447 {
1448         BLANK_LINE();
1449         CHECK_STRUCT(ldlm_inodebits);
1450         CHECK_MEMBER(ldlm_inodebits, bits);
1451         CHECK_MEMBER(ldlm_inodebits, try_bits);
1452 }
1453
1454 static void
1455 check_ldlm_flock(void)
1456 {
1457         BLANK_LINE();
1458         CHECK_STRUCT(ldlm_flock_wire);
1459         CHECK_MEMBER(ldlm_flock_wire, lfw_start);
1460         CHECK_MEMBER(ldlm_flock_wire, lfw_end);
1461         CHECK_MEMBER(ldlm_flock_wire, lfw_owner);
1462         CHECK_MEMBER(ldlm_flock_wire, lfw_padding);
1463         CHECK_MEMBER(ldlm_flock_wire, lfw_pid);
1464 }
1465
1466 static void
1467 check_ldlm_intent(void)
1468 {
1469         BLANK_LINE();
1470         CHECK_STRUCT(ldlm_intent);
1471         CHECK_MEMBER(ldlm_intent, opc);
1472         CHECK_VALUE(IT_OPEN);
1473         CHECK_VALUE(IT_CREAT);
1474         CHECK_VALUE(IT_READDIR);
1475         CHECK_VALUE(IT_GETATTR);
1476         CHECK_VALUE(IT_LOOKUP);
1477         CHECK_VALUE(IT_GETXATTR);
1478         CHECK_VALUE(IT_LAYOUT);
1479         CHECK_VALUE(IT_QUOTA_DQACQ);
1480         CHECK_VALUE(IT_QUOTA_CONN);
1481 }
1482
1483 static void
1484 check_ldlm_resource_desc(void)
1485 {
1486         BLANK_LINE();
1487         CHECK_STRUCT(ldlm_resource_desc);
1488         CHECK_MEMBER(ldlm_resource_desc, lr_type);
1489         CHECK_MEMBER(ldlm_resource_desc, lr_pad);
1490         CHECK_MEMBER(ldlm_resource_desc, lr_name);
1491 }
1492
1493 static void
1494 check_ldlm_lock_desc(void)
1495 {
1496         BLANK_LINE();
1497         CHECK_STRUCT(ldlm_lock_desc);
1498         CHECK_MEMBER(ldlm_lock_desc, l_resource);
1499         CHECK_MEMBER(ldlm_lock_desc, l_req_mode);
1500         CHECK_MEMBER(ldlm_lock_desc, l_granted_mode);
1501         CHECK_MEMBER(ldlm_lock_desc, l_policy_data);
1502 }
1503
1504 static void
1505 check_ldlm_request(void)
1506 {
1507         BLANK_LINE();
1508         CHECK_STRUCT(ldlm_request);
1509         CHECK_MEMBER(ldlm_request, lock_flags);
1510         CHECK_MEMBER(ldlm_request, lock_count);
1511         CHECK_MEMBER(ldlm_request, lock_desc);
1512         CHECK_MEMBER(ldlm_request, lock_handle);
1513 }
1514
1515 static void
1516 check_ldlm_reply(void)
1517 {
1518         BLANK_LINE();
1519         CHECK_STRUCT(ldlm_reply);
1520         CHECK_MEMBER(ldlm_reply, lock_flags);
1521         CHECK_MEMBER(ldlm_reply, lock_padding);
1522         CHECK_MEMBER(ldlm_reply, lock_desc);
1523         CHECK_MEMBER(ldlm_reply, lock_handle);
1524         CHECK_MEMBER(ldlm_reply, lock_policy_res1);
1525         CHECK_MEMBER(ldlm_reply, lock_policy_res2);
1526 }
1527
1528 static void
1529 check_ldlm_ost_lvb_v1(void)
1530 {
1531         BLANK_LINE();
1532         CHECK_STRUCT(ost_lvb_v1);
1533         CHECK_MEMBER(ost_lvb_v1, lvb_size);
1534         CHECK_MEMBER(ost_lvb_v1, lvb_mtime);
1535         CHECK_MEMBER(ost_lvb_v1, lvb_atime);
1536         CHECK_MEMBER(ost_lvb_v1, lvb_ctime);
1537         CHECK_MEMBER(ost_lvb_v1, lvb_blocks);
1538 }
1539
1540 static void
1541 check_ldlm_ost_lvb(void)
1542 {
1543         BLANK_LINE();
1544         CHECK_STRUCT(ost_lvb);
1545         CHECK_MEMBER(ost_lvb, lvb_size);
1546         CHECK_MEMBER(ost_lvb, lvb_mtime);
1547         CHECK_MEMBER(ost_lvb, lvb_atime);
1548         CHECK_MEMBER(ost_lvb, lvb_ctime);
1549         CHECK_MEMBER(ost_lvb, lvb_blocks);
1550         CHECK_MEMBER(ost_lvb, lvb_mtime_ns);
1551         CHECK_MEMBER(ost_lvb, lvb_atime_ns);
1552         CHECK_MEMBER(ost_lvb, lvb_ctime_ns);
1553         CHECK_MEMBER(ost_lvb, lvb_padding);
1554 }
1555
1556 static void
1557 check_ldlm_lquota_lvb(void)
1558 {
1559         BLANK_LINE();
1560         CHECK_STRUCT(lquota_lvb);
1561         CHECK_MEMBER(lquota_lvb, lvb_flags);
1562         CHECK_MEMBER(lquota_lvb, lvb_id_may_rel);
1563         CHECK_MEMBER(lquota_lvb, lvb_id_rel);
1564         CHECK_MEMBER(lquota_lvb, lvb_id_qunit);
1565         CHECK_MEMBER(lquota_lvb, lvb_pad1);
1566         CHECK_VALUE(LQUOTA_FL_EDQUOT);
1567 }
1568
1569 static void
1570 check_ldlm_gl_lquota_desc(void)
1571 {
1572         BLANK_LINE();
1573         CHECK_STRUCT(ldlm_gl_lquota_desc);
1574         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_id);
1575         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_flags);
1576         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_ver);
1577         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_hardlimit);
1578         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_softlimit);
1579         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_time);
1580         CHECK_MEMBER(ldlm_gl_lquota_desc, gl_pad2);
1581 }
1582
1583 static void check_ldlm_gl_barrier_desc(void)
1584 {
1585         BLANK_LINE();
1586         CHECK_STRUCT(ldlm_gl_barrier_desc);
1587         CHECK_MEMBER(ldlm_gl_barrier_desc, lgbd_status);
1588         CHECK_MEMBER(ldlm_gl_barrier_desc, lgbd_timeout);
1589         CHECK_MEMBER(ldlm_gl_barrier_desc, lgbd_padding);
1590 }
1591
1592 static void check_ldlm_barrier_lvb(void)
1593 {
1594         BLANK_LINE();
1595         CHECK_STRUCT(barrier_lvb);
1596         CHECK_MEMBER(barrier_lvb, lvb_status);
1597         CHECK_MEMBER(barrier_lvb, lvb_index);
1598         CHECK_MEMBER(barrier_lvb, lvb_padding);
1599 }
1600
1601 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 13, 53, 0)
1602 static void
1603 check_mgs_send_param(void)
1604 {
1605         BLANK_LINE();
1606         CHECK_STRUCT(mgs_send_param);
1607         CHECK_CVALUE(MGS_PARAM_MAXLEN);
1608         CHECK_MEMBER(mgs_send_param, mgs_param[MGS_PARAM_MAXLEN]);
1609 }
1610 #endif
1611
1612 static void
1613 check_cfg_marker(void)
1614 {
1615         BLANK_LINE();
1616         CHECK_STRUCT(cfg_marker);
1617         CHECK_MEMBER(cfg_marker, cm_step);
1618         CHECK_MEMBER(cfg_marker, cm_flags);
1619         CHECK_MEMBER(cfg_marker, cm_vers);
1620         CHECK_MEMBER(cfg_marker, cm_padding);
1621         CHECK_MEMBER(cfg_marker, cm_createtime);
1622         CHECK_MEMBER(cfg_marker, cm_canceltime);
1623         CHECK_MEMBER(cfg_marker, cm_tgtname);
1624         CHECK_MEMBER(cfg_marker, cm_comment);
1625 }
1626
1627 static void
1628 check_llog_logid(void)
1629 {
1630         BLANK_LINE();
1631         CHECK_STRUCT(llog_logid);
1632         CHECK_MEMBER(llog_logid, lgl_oi);
1633         CHECK_MEMBER(llog_logid, lgl_ogen);
1634
1635         CHECK_CVALUE(OST_SZ_REC);
1636         CHECK_CVALUE(MDS_UNLINK_REC);
1637         CHECK_CVALUE(MDS_UNLINK64_REC);
1638         CHECK_CVALUE(MDS_SETATTR64_REC);
1639         CHECK_CVALUE(OBD_CFG_REC);
1640         CHECK_CVALUE(LLOG_GEN_REC);
1641         CHECK_CVALUE(CHANGELOG_REC);
1642         CHECK_CVALUE(CHANGELOG_USER_REC);
1643         CHECK_CVALUE(LLOG_HDR_MAGIC);
1644         CHECK_CVALUE(LLOG_LOGID_MAGIC);
1645 }
1646
1647 static void
1648 check_llog_catid(void)
1649 {
1650         BLANK_LINE();
1651         CHECK_STRUCT(llog_catid);
1652         CHECK_MEMBER(llog_catid, lci_logid);
1653         CHECK_MEMBER(llog_catid, lci_padding1);
1654         CHECK_MEMBER(llog_catid, lci_padding2);
1655         CHECK_MEMBER(llog_catid, lci_padding3);
1656 }
1657
1658 static void
1659 check_llog_rec_hdr(void)
1660 {
1661         BLANK_LINE();
1662         CHECK_STRUCT(llog_rec_hdr);
1663         CHECK_MEMBER(llog_rec_hdr, lrh_len);
1664         CHECK_MEMBER(llog_rec_hdr, lrh_index);
1665         CHECK_MEMBER(llog_rec_hdr, lrh_type);
1666         CHECK_MEMBER(llog_rec_hdr, lrh_id);
1667 }
1668
1669 static void
1670 check_llog_rec_tail(void)
1671 {
1672         BLANK_LINE();
1673         CHECK_STRUCT(llog_rec_tail);
1674         CHECK_MEMBER(llog_rec_tail, lrt_len);
1675         CHECK_MEMBER(llog_rec_tail, lrt_index);
1676 }
1677
1678 static void
1679 check_llog_logid_rec(void)
1680 {
1681         BLANK_LINE();
1682         CHECK_STRUCT(llog_logid_rec);
1683         CHECK_MEMBER(llog_logid_rec, lid_hdr);
1684         CHECK_MEMBER(llog_logid_rec, lid_id);
1685         CHECK_MEMBER(llog_logid_rec, lid_padding1);
1686         CHECK_MEMBER(llog_logid_rec, lid_padding2);
1687         CHECK_MEMBER(llog_logid_rec, lid_padding3);
1688         CHECK_MEMBER(llog_logid_rec, lid_tail);
1689 }
1690
1691 static void
1692 check_llog_unlink_rec(void)
1693 {
1694         BLANK_LINE();
1695         CHECK_STRUCT(llog_unlink_rec);
1696         CHECK_MEMBER(llog_unlink_rec, lur_hdr);
1697         CHECK_MEMBER(llog_unlink_rec, lur_oid);
1698         CHECK_MEMBER(llog_unlink_rec, lur_oseq);
1699         CHECK_MEMBER(llog_unlink_rec, lur_count);
1700         CHECK_MEMBER(llog_unlink_rec, lur_tail);
1701 }
1702
1703 static void
1704 check_llog_unlink64_rec(void)
1705 {
1706         CHECK_STRUCT(llog_unlink64_rec);
1707         CHECK_MEMBER(llog_unlink64_rec, lur_hdr);
1708         CHECK_MEMBER(llog_unlink64_rec, lur_fid);
1709         CHECK_MEMBER(llog_unlink64_rec, lur_count);
1710         CHECK_MEMBER(llog_unlink64_rec, lur_tail);
1711         CHECK_MEMBER(llog_unlink64_rec, lur_padding1);
1712         CHECK_MEMBER(llog_unlink64_rec, lur_padding2);
1713         CHECK_MEMBER(llog_unlink64_rec, lur_padding3);
1714 }
1715
1716 static void
1717 check_llog_setattr64_rec(void)
1718 {
1719         BLANK_LINE();
1720         CHECK_STRUCT(llog_setattr64_rec);
1721         CHECK_MEMBER(llog_setattr64_rec, lsr_hdr);
1722         CHECK_MEMBER(llog_setattr64_rec, lsr_oi);
1723         CHECK_MEMBER(llog_setattr64_rec, lsr_uid);
1724         CHECK_MEMBER(llog_setattr64_rec, lsr_uid_h);
1725         CHECK_MEMBER(llog_setattr64_rec, lsr_gid);
1726         CHECK_MEMBER(llog_setattr64_rec, lsr_gid_h);
1727         CHECK_MEMBER(llog_setattr64_rec, lsr_valid);
1728         CHECK_MEMBER(llog_setattr64_rec, lsr_tail);
1729         CHECK_MEMBER(llog_setattr64_rec_v2, lsr_projid);
1730 }
1731
1732 static void
1733 check_llog_size_change_rec(void)
1734 {
1735         BLANK_LINE();
1736         CHECK_STRUCT(llog_size_change_rec);
1737         CHECK_MEMBER(llog_size_change_rec, lsc_hdr);
1738         CHECK_MEMBER(llog_size_change_rec, lsc_fid);
1739         CHECK_MEMBER(llog_size_change_rec, lsc_ioepoch);
1740         CHECK_MEMBER(llog_size_change_rec, lsc_padding1);
1741         CHECK_MEMBER(llog_size_change_rec, lsc_padding2);
1742         CHECK_MEMBER(llog_size_change_rec, lsc_padding3);
1743         CHECK_MEMBER(llog_size_change_rec, lsc_tail);
1744 }
1745
1746 static void
1747 check_changelog_rec(void)
1748 {
1749         BLANK_LINE();
1750         CHECK_STRUCT(changelog_rec);
1751         CHECK_MEMBER(changelog_rec, cr_namelen);
1752         CHECK_MEMBER(changelog_rec, cr_flags);
1753         CHECK_MEMBER(changelog_rec, cr_type);
1754         CHECK_MEMBER(changelog_rec, cr_index);
1755         CHECK_MEMBER(changelog_rec, cr_prev);
1756         CHECK_MEMBER(changelog_rec, cr_time);
1757         CHECK_MEMBER(changelog_rec, cr_tfid);
1758         CHECK_MEMBER(changelog_rec, cr_pfid);
1759 }
1760
1761 static void
1762 check_changelog_ext_rename(void)
1763 {
1764         BLANK_LINE();
1765         CHECK_STRUCT(changelog_ext_rename);
1766         CHECK_MEMBER(changelog_ext_rename, cr_sfid);
1767         CHECK_MEMBER(changelog_ext_rename, cr_spfid);
1768 }
1769
1770 static void
1771 check_changelog_ext_jobid(void)
1772 {
1773         BLANK_LINE();
1774         CHECK_STRUCT(changelog_ext_jobid);
1775         CHECK_MEMBER(changelog_ext_jobid, cr_jobid);
1776 }
1777
1778 static void
1779 check_changelog_setinfo(void)
1780 {
1781         BLANK_LINE();
1782         CHECK_STRUCT(changelog_setinfo);
1783         CHECK_MEMBER(changelog_setinfo, cs_recno);
1784         CHECK_MEMBER(changelog_setinfo, cs_id);
1785 }
1786
1787 static void
1788 check_llog_changelog_rec(void)
1789 {
1790         BLANK_LINE();
1791         CHECK_STRUCT(llog_changelog_rec);
1792         CHECK_MEMBER(llog_changelog_rec, cr_hdr);
1793         CHECK_MEMBER(llog_changelog_rec, cr);
1794         CHECK_MEMBER(llog_changelog_rec, cr_do_not_use);
1795 }
1796
1797 static void
1798 check_llog_changelog_user_rec(void)
1799 {
1800         BLANK_LINE();
1801         CHECK_STRUCT(llog_changelog_user_rec);
1802         CHECK_MEMBER(llog_changelog_user_rec, cur_hdr);
1803         CHECK_MEMBER(llog_changelog_user_rec, cur_id);
1804         CHECK_MEMBER(llog_changelog_user_rec, cur_time);
1805         CHECK_MEMBER(llog_changelog_user_rec, cur_endrec);
1806         CHECK_MEMBER(llog_changelog_user_rec, cur_tail);
1807 }
1808
1809 static void
1810 check_llog_gen(void)
1811 {
1812         BLANK_LINE();
1813         CHECK_STRUCT(llog_gen);
1814         CHECK_MEMBER(llog_gen, mnt_cnt);
1815         CHECK_MEMBER(llog_gen, conn_cnt);
1816 }
1817
1818 static void
1819 check_llog_gen_rec(void)
1820 {
1821         BLANK_LINE();
1822         CHECK_STRUCT(llog_gen_rec);
1823         CHECK_MEMBER(llog_gen_rec, lgr_hdr);
1824         CHECK_MEMBER(llog_gen_rec, lgr_gen);
1825         CHECK_MEMBER(llog_gen_rec, lgr_tail);
1826 }
1827
1828 static void
1829 check_llog_log_hdr(void)
1830 {
1831         BLANK_LINE();
1832         CHECK_STRUCT(llog_log_hdr);
1833         CHECK_MEMBER(llog_log_hdr, llh_hdr);
1834         CHECK_MEMBER(llog_log_hdr, llh_timestamp);
1835         CHECK_MEMBER(llog_log_hdr, llh_count);
1836         CHECK_MEMBER(llog_log_hdr, llh_bitmap_offset);
1837         CHECK_MEMBER(llog_log_hdr, llh_size);
1838         CHECK_MEMBER(llog_log_hdr, llh_flags);
1839         CHECK_MEMBER(llog_log_hdr, llh_cat_idx);
1840         CHECK_MEMBER(llog_log_hdr, llh_tgtuuid);
1841 }
1842
1843 static void
1844 check_llogd_body(void)
1845 {
1846         BLANK_LINE();
1847         CHECK_STRUCT(llogd_body);
1848         CHECK_MEMBER(llogd_body, lgd_logid);
1849         CHECK_MEMBER(llogd_body, lgd_ctxt_idx);
1850         CHECK_MEMBER(llogd_body, lgd_llh_flags);
1851         CHECK_MEMBER(llogd_body, lgd_index);
1852         CHECK_MEMBER(llogd_body, lgd_saved_index);
1853         CHECK_MEMBER(llogd_body, lgd_len);
1854         CHECK_MEMBER(llogd_body, lgd_cur_offset);
1855
1856         CHECK_CVALUE(LLOG_ORIGIN_HANDLE_CREATE);
1857         CHECK_CVALUE(LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
1858         CHECK_CVALUE(LLOG_ORIGIN_HANDLE_READ_HEADER);
1859         CHECK_CVALUE(LLOG_ORIGIN_HANDLE_PREV_BLOCK);
1860         CHECK_CVALUE(LLOG_FIRST_OPC);
1861         CHECK_CVALUE(LLOG_LAST_OPC);
1862
1863         CHECK_CVALUE(LLOG_CONFIG_ORIG_CTXT);
1864         CHECK_CVALUE(LLOG_CONFIG_REPL_CTXT);
1865         CHECK_CVALUE(LLOG_MDS_OST_ORIG_CTXT);
1866         CHECK_CVALUE(LLOG_MDS_OST_REPL_CTXT);
1867         CHECK_CVALUE(LLOG_SIZE_ORIG_CTXT);
1868         CHECK_CVALUE(LLOG_SIZE_REPL_CTXT);
1869         CHECK_CVALUE(LLOG_TEST_ORIG_CTXT);
1870         CHECK_CVALUE(LLOG_TEST_REPL_CTXT);
1871         CHECK_CVALUE(LLOG_CHANGELOG_ORIG_CTXT);
1872         CHECK_CVALUE(LLOG_CHANGELOG_REPL_CTXT);
1873         CHECK_CVALUE(LLOG_CHANGELOG_USER_ORIG_CTXT);
1874         CHECK_CVALUE(LLOG_AGENT_ORIG_CTXT);
1875         CHECK_CVALUE(LLOG_UPDATELOG_ORIG_CTXT);
1876         CHECK_CVALUE(LLOG_UPDATELOG_REPL_CTXT);
1877         CHECK_CVALUE(LLOG_MAX_CTXTS);
1878 }
1879
1880 static void
1881 check_llogd_conn_body(void)
1882 {
1883         BLANK_LINE();
1884         CHECK_STRUCT(llogd_conn_body);
1885         CHECK_MEMBER(llogd_conn_body, lgdc_gen);
1886         CHECK_MEMBER(llogd_conn_body, lgdc_logid);
1887         CHECK_MEMBER(llogd_conn_body, lgdc_ctxt_idx);
1888 }
1889
1890 static void
1891 check_ll_fiemap_info_key(void)
1892 {
1893         BLANK_LINE();
1894         CHECK_STRUCT(ll_fiemap_info_key);
1895         CHECK_MEMBER(ll_fiemap_info_key, lfik_name[8]);
1896         CHECK_MEMBER(ll_fiemap_info_key, lfik_oa);
1897         CHECK_MEMBER(ll_fiemap_info_key, lfik_fiemap);
1898 }
1899
1900 static void
1901 check_quota_body(void)
1902 {
1903         BLANK_LINE();
1904         CHECK_STRUCT(quota_body);
1905         CHECK_MEMBER(quota_body, qb_fid);
1906         CHECK_MEMBER(quota_body, qb_id);
1907         CHECK_MEMBER(quota_body, qb_flags);
1908         CHECK_MEMBER(quota_body, qb_padding);
1909         CHECK_MEMBER(quota_body, qb_count);
1910         CHECK_MEMBER(quota_body, qb_usage);
1911         CHECK_MEMBER(quota_body, qb_slv_ver);
1912         CHECK_MEMBER(quota_body, qb_lockh);
1913         CHECK_MEMBER(quota_body, qb_glb_lockh);
1914         CHECK_MEMBER(quota_body, qb_padding1[4]);
1915 }
1916
1917 static void
1918 check_mgs_target_info(void)
1919 {
1920         BLANK_LINE();
1921         CHECK_STRUCT(mgs_target_info);
1922         CHECK_MEMBER(mgs_target_info, mti_lustre_ver);
1923         CHECK_MEMBER(mgs_target_info, mti_stripe_index);
1924         CHECK_MEMBER(mgs_target_info, mti_config_ver);
1925         CHECK_MEMBER(mgs_target_info, mti_flags);
1926         CHECK_MEMBER(mgs_target_info, mti_nid_count);
1927         CHECK_MEMBER(mgs_target_info, mti_instance);
1928         CHECK_MEMBER(mgs_target_info, mti_fsname);
1929         CHECK_MEMBER(mgs_target_info, mti_svname);
1930         CHECK_MEMBER(mgs_target_info, mti_uuid);
1931         CHECK_MEMBER(mgs_target_info, mti_nids);
1932         CHECK_MEMBER(mgs_target_info, mti_params);
1933 }
1934
1935 static void
1936 check_mgs_nidtbl_entry(void)
1937 {
1938         BLANK_LINE();
1939         CHECK_STRUCT(mgs_nidtbl_entry);
1940         CHECK_MEMBER(mgs_nidtbl_entry, mne_version);
1941         CHECK_MEMBER(mgs_nidtbl_entry, mne_instance);
1942         CHECK_MEMBER(mgs_nidtbl_entry, mne_index);
1943         CHECK_MEMBER(mgs_nidtbl_entry, mne_length);
1944         CHECK_MEMBER(mgs_nidtbl_entry, mne_type);
1945         CHECK_MEMBER(mgs_nidtbl_entry, mne_nid_type);
1946         CHECK_MEMBER(mgs_nidtbl_entry, mne_nid_size);
1947         CHECK_MEMBER(mgs_nidtbl_entry, mne_nid_count);
1948         CHECK_MEMBER(mgs_nidtbl_entry, u.nids[0]);
1949 }
1950
1951 static void
1952 check_mgs_config_body(void)
1953 {
1954         BLANK_LINE();
1955         CHECK_STRUCT(mgs_config_body);
1956         CHECK_MEMBER(mgs_config_body, mcb_name);
1957         CHECK_MEMBER(mgs_config_body, mcb_offset);
1958         CHECK_MEMBER(mgs_config_body, mcb_type);
1959         CHECK_MEMBER(mgs_config_body, mcb_nm_cur_pass);
1960         CHECK_MEMBER(mgs_config_body, mcb_bits);
1961         CHECK_MEMBER(mgs_config_body, mcb_units);
1962
1963         CHECK_CVALUE(CONFIG_T_CONFIG);
1964         CHECK_CVALUE(CONFIG_T_SPTLRPC);
1965         CHECK_CVALUE(CONFIG_T_RECOVER);
1966         CHECK_CVALUE(CONFIG_T_PARAMS);
1967         CHECK_CVALUE(CONFIG_T_NODEMAP);
1968         CHECK_CVALUE(CONFIG_T_BARRIER);
1969 }
1970
1971 static void
1972 check_mgs_config_res(void)
1973 {
1974         BLANK_LINE();
1975         CHECK_STRUCT(mgs_config_res);
1976         CHECK_MEMBER(mgs_config_res, mcr_offset);
1977         CHECK_MEMBER(mgs_config_res, mcr_size);
1978 }
1979
1980 static void
1981 check_lustre_capa(void)
1982 {
1983         BLANK_LINE();
1984         CHECK_STRUCT(lustre_capa);
1985         CHECK_MEMBER(lustre_capa, lc_fid);
1986         CHECK_MEMBER(lustre_capa, lc_opc);
1987         CHECK_MEMBER(lustre_capa, lc_uid);
1988         CHECK_MEMBER(lustre_capa, lc_gid);
1989         CHECK_MEMBER(lustre_capa, lc_flags);
1990         CHECK_MEMBER(lustre_capa, lc_keyid);
1991         CHECK_MEMBER(lustre_capa, lc_timeout);
1992         CHECK_MEMBER(lustre_capa, lc_expiry);
1993         CHECK_CVALUE(CAPA_HMAC_MAX_LEN);
1994         CHECK_MEMBER(lustre_capa, lc_hmac[CAPA_HMAC_MAX_LEN]);
1995 }
1996
1997 static void
1998 check_lustre_capa_key(void)
1999 {
2000         BLANK_LINE();
2001         CHECK_STRUCT(lustre_capa_key);
2002         CHECK_MEMBER(lustre_capa_key, lk_seq);
2003         CHECK_MEMBER(lustre_capa_key, lk_keyid);
2004         CHECK_MEMBER(lustre_capa_key, lk_padding);
2005         CHECK_CVALUE(CAPA_HMAC_KEY_MAX_LEN);
2006         CHECK_MEMBER(lustre_capa_key, lk_key[CAPA_HMAC_KEY_MAX_LEN]);
2007 }
2008
2009 static void
2010 check_getinfo_fid2path(void)
2011 {
2012         BLANK_LINE();
2013         CHECK_STRUCT(getinfo_fid2path);
2014         CHECK_MEMBER(getinfo_fid2path, gf_fid);
2015         CHECK_MEMBER(getinfo_fid2path, gf_recno);
2016         CHECK_MEMBER(getinfo_fid2path, gf_linkno);
2017         CHECK_MEMBER(getinfo_fid2path, gf_pathlen);
2018         CHECK_MEMBER(getinfo_fid2path, gf_u.gf_path[0]);
2019 }
2020
2021 /* We don't control the definitions of posix_acl_xattr_{entry,header}
2022  * and so we shouldn't have used them in our wire protocol. But it's
2023  * too late now and so we emit checks against the *fixed* definitions
2024  * below. See LU-5607. */
2025
2026 typedef struct {
2027         __u16                   e_tag;
2028         __u16                   e_perm;
2029         __u32                   e_id;
2030 } posix_acl_xattr_entry;
2031
2032 typedef struct {
2033         __u32                   a_version;
2034         posix_acl_xattr_entry   a_entries[0];
2035 } posix_acl_xattr_header;
2036
2037 static void
2038 check_posix_acl_xattr_entry(void)
2039 {
2040         BLANK_LINE();
2041         printf("#ifdef CONFIG_FS_POSIX_ACL\n");
2042         CHECK_STRUCT_TYPEDEF(posix_acl_xattr_entry);
2043         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_tag);
2044         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_perm);
2045         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_id);
2046         printf("#endif /* CONFIG_FS_POSIX_ACL */\n");
2047 }
2048
2049 static void
2050 check_posix_acl_xattr_header(void)
2051 {
2052         BLANK_LINE();
2053         printf("#ifdef CONFIG_FS_POSIX_ACL\n");
2054         CHECK_STRUCT_TYPEDEF(posix_acl_xattr_header);
2055         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_version);
2056         printf("#ifndef HAVE_STRUCT_POSIX_ACL_XATTR\n");
2057         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_entries);
2058         printf("#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */\n");
2059         printf("#endif /* CONFIG_FS_POSIX_ACL */\n");
2060 }
2061
2062 static void
2063 check_ll_user_fiemap(void)
2064 {
2065         BLANK_LINE();
2066         CHECK_STRUCT(fiemap);
2067         CHECK_MEMBER(fiemap, fm_start);
2068         CHECK_MEMBER(fiemap, fm_length);
2069         CHECK_MEMBER(fiemap, fm_flags);
2070         CHECK_MEMBER(fiemap, fm_mapped_extents);
2071         CHECK_MEMBER(fiemap, fm_extent_count);
2072         CHECK_MEMBER(fiemap, fm_reserved);
2073         CHECK_MEMBER(fiemap, fm_extents);
2074
2075         CHECK_CDEFINE(FIEMAP_FLAG_SYNC);
2076         CHECK_CDEFINE(FIEMAP_FLAG_XATTR);
2077         CHECK_CDEFINE(FIEMAP_FLAG_DEVICE_ORDER);
2078 }
2079
2080 static void
2081 check_ll_fiemap_extent(void)
2082 {
2083         BLANK_LINE();
2084         CHECK_STRUCT(fiemap_extent);
2085         CHECK_MEMBER(fiemap_extent, fe_logical);
2086         CHECK_MEMBER(fiemap_extent, fe_physical);
2087         CHECK_MEMBER(fiemap_extent, fe_length);
2088         CHECK_MEMBER(fiemap_extent, fe_flags);
2089         CHECK_MEMBER(fiemap_extent, fe_device);
2090
2091         CHECK_CDEFINE(FIEMAP_EXTENT_LAST);
2092         CHECK_CDEFINE(FIEMAP_EXTENT_UNKNOWN);
2093         CHECK_CDEFINE(FIEMAP_EXTENT_DELALLOC);
2094         CHECK_CDEFINE(FIEMAP_EXTENT_ENCODED);
2095         CHECK_CDEFINE(FIEMAP_EXTENT_DATA_ENCRYPTED);
2096         CHECK_CDEFINE(FIEMAP_EXTENT_NOT_ALIGNED);
2097         CHECK_CDEFINE(FIEMAP_EXTENT_DATA_INLINE);
2098         CHECK_CDEFINE(FIEMAP_EXTENT_DATA_TAIL);
2099         CHECK_CDEFINE(FIEMAP_EXTENT_UNWRITTEN);
2100         CHECK_CDEFINE(FIEMAP_EXTENT_MERGED);
2101         CHECK_CDEFINE(FIEMAP_EXTENT_NO_DIRECT);
2102         CHECK_CDEFINE(FIEMAP_EXTENT_NET);
2103 }
2104
2105 static void
2106 check_link_ea_header(void)
2107 {
2108         BLANK_LINE();
2109         CHECK_STRUCT(link_ea_header);
2110         CHECK_MEMBER(link_ea_header, leh_magic);
2111         CHECK_MEMBER(link_ea_header, leh_reccount);
2112         CHECK_MEMBER(link_ea_header, leh_len);
2113         CHECK_MEMBER(link_ea_header, leh_overflow_time);
2114         CHECK_MEMBER(link_ea_header, leh_padding);
2115
2116         CHECK_CDEFINE(LINK_EA_MAGIC);
2117 }
2118
2119 static void
2120 check_link_ea_entry(void)
2121 {
2122         BLANK_LINE();
2123         CHECK_STRUCT(link_ea_entry);
2124         CHECK_MEMBER(link_ea_entry, lee_reclen);
2125         CHECK_MEMBER(link_ea_entry, lee_parent_fid);
2126         CHECK_MEMBER(link_ea_entry, lee_name);
2127 }
2128
2129 static void
2130 check_hsm_user_item(void)
2131 {
2132         BLANK_LINE();
2133         CHECK_STRUCT(hsm_user_item);
2134         CHECK_MEMBER(hsm_user_item, hui_fid);
2135         CHECK_MEMBER(hsm_user_item, hui_extent);
2136 }
2137
2138 static void
2139 check_hsm_user_state(void)
2140 {
2141         BLANK_LINE();
2142         CHECK_STRUCT(hsm_user_state);
2143         CHECK_MEMBER(hsm_user_state, hus_states);
2144         CHECK_MEMBER(hsm_user_state, hus_archive_id);
2145         CHECK_MEMBER(hsm_user_state, hus_in_progress_state);
2146         CHECK_MEMBER(hsm_user_state, hus_in_progress_action);
2147         CHECK_MEMBER(hsm_user_state, hus_in_progress_location);
2148 }
2149
2150 static void
2151 check_hsm_action_item(void)
2152 {
2153         BLANK_LINE();
2154         CHECK_STRUCT(hsm_action_item);
2155         CHECK_MEMBER(hsm_action_item, hai_len);
2156         CHECK_MEMBER(hsm_action_item, hai_action);
2157         CHECK_MEMBER(hsm_action_item, hai_fid);
2158         CHECK_MEMBER(hsm_action_item, hai_dfid);
2159         CHECK_MEMBER(hsm_action_item, hai_extent);
2160         CHECK_MEMBER(hsm_action_item, hai_cookie);
2161         CHECK_MEMBER(hsm_action_item, hai_gid);
2162         CHECK_MEMBER(hsm_action_item, hai_data);
2163 }
2164
2165 static void
2166 check_hsm_action_list(void)
2167 {
2168         BLANK_LINE();
2169         CHECK_STRUCT(hsm_action_list);
2170         CHECK_MEMBER(hsm_action_list, hal_version);
2171         CHECK_MEMBER(hsm_action_list, hal_count);
2172         CHECK_MEMBER(hsm_action_list, hal_compound_id);
2173         CHECK_MEMBER(hsm_action_list, hal_flags);
2174         CHECK_MEMBER(hsm_action_list, hal_archive_id);
2175         CHECK_MEMBER(hsm_action_list, padding1);
2176         CHECK_MEMBER(hsm_action_list, hal_fsname);
2177 }
2178
2179 static void
2180 check_hsm_progress_kernel(void)
2181 {
2182         BLANK_LINE();
2183         CHECK_STRUCT(hsm_progress_kernel);
2184         CHECK_MEMBER(hsm_progress_kernel, hpk_fid);
2185         CHECK_MEMBER(hsm_progress_kernel, hpk_cookie);
2186         CHECK_MEMBER(hsm_progress_kernel, hpk_extent);
2187         CHECK_MEMBER(hsm_progress_kernel, hpk_flags);
2188         CHECK_MEMBER(hsm_progress_kernel, hpk_errval);
2189         CHECK_MEMBER(hsm_progress_kernel, hpk_padding1);
2190         CHECK_MEMBER(hsm_progress_kernel, hpk_data_version);
2191         CHECK_MEMBER(hsm_progress_kernel, hpk_padding2);
2192 }
2193
2194 static void
2195 check_hsm_progress(void)
2196 {
2197         BLANK_LINE();
2198         CHECK_STRUCT(hsm_progress);
2199         CHECK_MEMBER(hsm_progress, hp_fid);
2200         CHECK_MEMBER(hsm_progress, hp_cookie);
2201         CHECK_MEMBER(hsm_progress, hp_extent);
2202         CHECK_MEMBER(hsm_progress, hp_flags);
2203         CHECK_MEMBER(hsm_progress, hp_errval);
2204         CHECK_MEMBER(hsm_progress, padding);
2205         CHECK_DEFINE_X(HP_FLAG_COMPLETED);
2206         CHECK_DEFINE_X(HP_FLAG_RETRY);
2207 }
2208
2209 static void
2210 check_hsm_copy(void)
2211 {
2212         BLANK_LINE();
2213         CHECK_MEMBER(hsm_copy, hc_data_version);
2214         CHECK_MEMBER(hsm_copy, hc_flags);
2215         CHECK_MEMBER(hsm_copy, hc_errval);
2216         CHECK_MEMBER(hsm_copy, padding);
2217         CHECK_MEMBER(hsm_copy, hc_hai);
2218 }
2219
2220 static void check_layout_intent(void)
2221 {
2222         BLANK_LINE();
2223         CHECK_STRUCT(layout_intent);
2224         CHECK_MEMBER(layout_intent, li_opc);
2225         CHECK_MEMBER(layout_intent, li_flags);
2226         CHECK_MEMBER(layout_intent, li_extent);
2227
2228         CHECK_VALUE(LAYOUT_INTENT_ACCESS);
2229         CHECK_VALUE(LAYOUT_INTENT_READ);
2230         CHECK_VALUE(LAYOUT_INTENT_WRITE);
2231         CHECK_VALUE(LAYOUT_INTENT_GLIMPSE);
2232         CHECK_VALUE(LAYOUT_INTENT_TRUNC);
2233         CHECK_VALUE(LAYOUT_INTENT_RELEASE);
2234         CHECK_VALUE(LAYOUT_INTENT_RESTORE);
2235 }
2236
2237 static void check_hsm_state_set(void)
2238 {
2239         BLANK_LINE();
2240         CHECK_STRUCT(hsm_state_set);
2241         CHECK_MEMBER(hsm_state_set, hss_valid);
2242         CHECK_MEMBER(hsm_state_set, hss_archive_id);
2243         CHECK_MEMBER(hsm_state_set, hss_setmask);
2244         CHECK_MEMBER(hsm_state_set, hss_clearmask);
2245 }
2246
2247 static void check_hsm_current_action(void)
2248 {
2249         BLANK_LINE();
2250         CHECK_STRUCT(hsm_current_action);
2251         CHECK_MEMBER(hsm_current_action, hca_state);
2252         CHECK_MEMBER(hsm_current_action, hca_action);
2253         CHECK_MEMBER(hsm_current_action, hca_location);
2254 }
2255
2256 static void check_hsm_request(void)
2257 {
2258         BLANK_LINE();
2259         CHECK_STRUCT(hsm_request);
2260         CHECK_MEMBER(hsm_request, hr_action);
2261         CHECK_MEMBER(hsm_request, hr_archive_id);
2262         CHECK_MEMBER(hsm_request, hr_flags);
2263         CHECK_MEMBER(hsm_request, hr_itemcount);
2264         CHECK_MEMBER(hsm_request, hr_data_len);
2265         CHECK_VALUE_X(HSM_FORCE_ACTION);
2266         CHECK_VALUE_X(HSM_GHOST_COPY);
2267 }
2268
2269 static void check_hsm_user_request(void)
2270 {
2271         BLANK_LINE();
2272         CHECK_STRUCT(hsm_user_request);
2273         CHECK_MEMBER(hsm_user_request, hur_request);
2274         CHECK_MEMBER(hsm_user_request, hur_user_item);
2275 }
2276
2277 static void check_hsm_user_import(void)
2278 {
2279         BLANK_LINE();
2280         CHECK_STRUCT(hsm_user_import);
2281         CHECK_MEMBER(hsm_user_import, hui_size);
2282         CHECK_MEMBER(hsm_user_import, hui_uid);
2283         CHECK_MEMBER(hsm_user_import, hui_gid);
2284         CHECK_MEMBER(hsm_user_import, hui_mode);
2285         CHECK_MEMBER(hsm_user_import, hui_atime);
2286         CHECK_MEMBER(hsm_user_import, hui_atime_ns);
2287         CHECK_MEMBER(hsm_user_import, hui_mtime);
2288         CHECK_MEMBER(hsm_user_import, hui_mtime_ns);
2289         CHECK_MEMBER(hsm_user_import, hui_archive_id);
2290 }
2291
2292 static void check_object_update_param(void)
2293 {
2294         BLANK_LINE();
2295         CHECK_STRUCT(object_update_param);
2296         CHECK_MEMBER(object_update_param, oup_len);
2297         CHECK_MEMBER(object_update_param, oup_padding);
2298         CHECK_MEMBER(object_update_param, oup_padding2);
2299         CHECK_MEMBER(object_update_param, oup_buf);
2300 }
2301
2302 static void check_object_update(void)
2303 {
2304         BLANK_LINE();
2305         CHECK_STRUCT(object_update);
2306         CHECK_MEMBER(object_update, ou_type);
2307         CHECK_MEMBER(object_update, ou_params_count);
2308         CHECK_MEMBER(object_update, ou_result_size);
2309         CHECK_MEMBER(object_update, ou_flags);
2310         CHECK_MEMBER(object_update, ou_padding1);
2311         CHECK_MEMBER(object_update, ou_batchid);
2312         CHECK_MEMBER(object_update, ou_fid);
2313         CHECK_MEMBER(object_update, ou_params);
2314 }
2315
2316 static void check_object_update_request(void)
2317 {
2318         BLANK_LINE();
2319         CHECK_STRUCT(object_update_request);
2320         CHECK_MEMBER(object_update_request, ourq_magic);
2321         CHECK_MEMBER(object_update_request, ourq_count);
2322         CHECK_MEMBER(object_update_request, ourq_padding);
2323         CHECK_MEMBER(object_update_request, ourq_updates);
2324 }
2325
2326 static void check_object_update_result(void)
2327 {
2328         BLANK_LINE();
2329         CHECK_STRUCT(object_update_result);
2330         CHECK_MEMBER(object_update_result, our_rc);
2331         CHECK_MEMBER(object_update_result, our_datalen);
2332         CHECK_MEMBER(object_update_result, our_padding);
2333         CHECK_MEMBER(object_update_result, our_data);
2334 }
2335
2336 static void check_object_update_reply(void)
2337 {
2338         BLANK_LINE();
2339         CHECK_STRUCT(object_update_reply);
2340         CHECK_MEMBER(object_update_reply, ourp_magic);
2341         CHECK_MEMBER(object_update_reply, ourp_count);
2342         CHECK_MEMBER(object_update_reply, ourp_padding);
2343         CHECK_MEMBER(object_update_reply, ourp_lens);
2344 }
2345
2346 static void check_out_update_header(void)
2347 {
2348         BLANK_LINE();
2349         CHECK_STRUCT(out_update_header);
2350         CHECK_MEMBER(out_update_header, ouh_magic);
2351         CHECK_MEMBER(out_update_header, ouh_count);
2352         CHECK_MEMBER(out_update_header, ouh_inline_length);
2353         CHECK_MEMBER(out_update_header, ouh_reply_size);
2354         CHECK_MEMBER(out_update_header, ouh_inline_data);
2355 }
2356
2357 static void check_out_update_buffer(void)
2358 {
2359         BLANK_LINE();
2360         CHECK_STRUCT(out_update_buffer);
2361         CHECK_MEMBER(out_update_buffer, oub_size);
2362         CHECK_MEMBER(out_update_buffer, oub_padding);
2363 }
2364
2365 static void check_nodemap_cluster_rec(void)
2366 {
2367         BLANK_LINE();
2368         CHECK_STRUCT(nodemap_cluster_rec);
2369         CHECK_MEMBER(nodemap_cluster_rec, ncr_name);
2370         CHECK_MEMBER(nodemap_cluster_rec, ncr_flags);
2371         CHECK_MEMBER(nodemap_cluster_rec, ncr_padding1);
2372         CHECK_MEMBER(nodemap_cluster_rec, ncr_padding2);
2373         CHECK_MEMBER(nodemap_cluster_rec, ncr_squash_uid);
2374         CHECK_MEMBER(nodemap_cluster_rec, ncr_squash_gid);
2375 }
2376
2377 static void check_nodemap_range_rec(void)
2378 {
2379         BLANK_LINE();
2380         CHECK_STRUCT(nodemap_range_rec);
2381         CHECK_MEMBER(nodemap_range_rec, nrr_start_nid);
2382         CHECK_MEMBER(nodemap_range_rec, nrr_end_nid);
2383         CHECK_MEMBER(nodemap_range_rec, nrr_padding1);
2384         CHECK_MEMBER(nodemap_range_rec, nrr_padding2);
2385 }
2386
2387 static void check_nodemap_id_rec(void)
2388 {
2389         BLANK_LINE();
2390         CHECK_STRUCT(nodemap_id_rec);
2391         CHECK_MEMBER(nodemap_id_rec, nir_id_fs);
2392         CHECK_MEMBER(nodemap_id_rec, nir_padding1);
2393         CHECK_MEMBER(nodemap_id_rec, nir_padding2);
2394         CHECK_MEMBER(nodemap_id_rec, nir_padding3);
2395         CHECK_MEMBER(nodemap_id_rec, nir_padding4);
2396 }
2397
2398 static void check_nodemap_global_rec(void)
2399 {
2400         BLANK_LINE();
2401         CHECK_STRUCT(nodemap_global_rec);
2402         CHECK_MEMBER(nodemap_global_rec, ngr_is_active);
2403         CHECK_MEMBER(nodemap_global_rec, ngr_padding1);
2404         CHECK_MEMBER(nodemap_global_rec, ngr_padding2);
2405         CHECK_MEMBER(nodemap_global_rec, ngr_padding3);
2406         CHECK_MEMBER(nodemap_global_rec, ngr_padding4);
2407         CHECK_MEMBER(nodemap_global_rec, ngr_padding5);
2408         CHECK_MEMBER(nodemap_global_rec, ngr_padding6);
2409 }
2410
2411 static void check_nodemap_rec(void)
2412 {
2413         BLANK_LINE();
2414         CHECK_UNION(nodemap_rec);
2415 }
2416
2417 static void check_lfsck_request(void)
2418 {
2419         BLANK_LINE();
2420         CHECK_STRUCT(lfsck_request);
2421         CHECK_MEMBER(lfsck_request, lr_event);
2422         CHECK_MEMBER(lfsck_request, lr_index);
2423         CHECK_MEMBER(lfsck_request, lr_flags);
2424         CHECK_MEMBER(lfsck_request, lr_valid);
2425         CHECK_MEMBER(lfsck_request, lr_speed);
2426         CHECK_MEMBER(lfsck_request, lr_version);
2427         CHECK_MEMBER(lfsck_request, lr_active);
2428         CHECK_MEMBER(lfsck_request, lr_param);
2429         CHECK_MEMBER(lfsck_request, lr_async_windows);
2430         CHECK_MEMBER(lfsck_request, lr_flags);
2431         CHECK_MEMBER(lfsck_request, lr_fid);
2432         CHECK_MEMBER(lfsck_request, lr_fid2);
2433         CHECK_MEMBER(lfsck_request, lr_comp_id);
2434         CHECK_MEMBER(lfsck_request, lr_padding_0);
2435         CHECK_MEMBER(lfsck_request, lr_padding_1);
2436         CHECK_MEMBER(lfsck_request, lr_padding_2);
2437         CHECK_MEMBER(lfsck_request, lr_padding_3);
2438         printf("#ifdef HAVE_SERVER_SUPPORT\n");
2439         CHECK_VALUE_X(LFSCK_TYPE_SCRUB);
2440         CHECK_VALUE_X(LFSCK_TYPE_LAYOUT);
2441         CHECK_VALUE_X(LFSCK_TYPE_NAMESPACE);
2442         printf("#endif\n");
2443         CHECK_VALUE(LE_LASTID_REBUILDING);
2444         CHECK_VALUE(LE_LASTID_REBUILT);
2445         CHECK_VALUE(LE_PHASE1_DONE);
2446         CHECK_VALUE(LE_PHASE2_DONE);
2447         CHECK_VALUE(LE_START);
2448         CHECK_VALUE(LE_STOP);
2449         CHECK_VALUE(LE_QUERY);
2450         CHECK_VALUE(LE_PEER_EXIT);
2451         CHECK_VALUE(LE_CONDITIONAL_DESTROY);
2452         CHECK_VALUE(LE_PAIRS_VERIFY);
2453         CHECK_VALUE(LE_SET_LMV_MASTER);
2454         CHECK_VALUE(LE_SET_LMV_SLAVE);
2455
2456         CHECK_VALUE_X(LEF_TO_OST);
2457         CHECK_VALUE_X(LEF_FROM_OST);
2458         CHECK_VALUE_X(LEF_SET_LMV_HASH);
2459         CHECK_VALUE_X(LEF_SET_LMV_ALL);
2460         CHECK_VALUE_X(LEF_RECHECK_NAME_HASH);
2461         CHECK_VALUE_X(LEF_QUERY_ALL);
2462 }
2463
2464 static void check_lfsck_reply(void)
2465 {
2466         BLANK_LINE();
2467         CHECK_STRUCT(lfsck_reply);
2468         CHECK_MEMBER(lfsck_reply, lr_status);
2469         CHECK_MEMBER(lfsck_reply, lr_padding_1);
2470         CHECK_MEMBER(lfsck_reply, lr_repaired);
2471 }
2472
2473 static void check_update_params(void)
2474 {
2475         BLANK_LINE();
2476         CHECK_STRUCT(update_params);
2477         CHECK_MEMBER(update_params, up_params);
2478 }
2479
2480 static void check_update_op(void)
2481 {
2482         BLANK_LINE();
2483         CHECK_STRUCT(update_op);
2484         CHECK_MEMBER(update_op, uop_fid);
2485         CHECK_MEMBER(update_op, uop_type);
2486         CHECK_MEMBER(update_op, uop_param_count);
2487         CHECK_MEMBER(update_op, uop_params_off);
2488 }
2489
2490 static void check_update_ops(void)
2491 {
2492         BLANK_LINE();
2493         CHECK_STRUCT(update_ops);
2494         CHECK_MEMBER(update_ops, uops_op);
2495 }
2496
2497 static void check_update_records(void)
2498 {
2499         BLANK_LINE();
2500         CHECK_STRUCT(update_records);
2501         CHECK_MEMBER(update_records, ur_master_transno);
2502         CHECK_MEMBER(update_records, ur_batchid);
2503         CHECK_MEMBER(update_records, ur_flags);
2504         CHECK_MEMBER(update_records, ur_index);
2505         CHECK_MEMBER(update_records, ur_update_count);
2506         CHECK_MEMBER(update_records, ur_param_count);
2507
2508         CHECK_VALUE_X(UPDATE_RECORD_CONTINUE);
2509 }
2510
2511 static void check_llog_update_record(void)
2512 {
2513         BLANK_LINE();
2514         CHECK_STRUCT(llog_update_record);
2515         CHECK_MEMBER(llog_update_record, lur_hdr);
2516         CHECK_MEMBER(llog_update_record, lur_update_rec);
2517 }
2518
2519 int
2520 main(int argc, char **argv)
2521 {
2522         BLANK_LINE();
2523
2524         printf ("void lustre_assert_wire_constants(void)\n"
2525                 "{\n"
2526                 "       /* Wire protocol assertions generated by 'wirecheck'\n"
2527                 "        * (make -C lustre/utils newwiretest)\n"
2528                 "        */\n");
2529
2530         BLANK_LINE();
2531
2532         COMMENT("Constants...");
2533         CHECK_VALUE(PTL_RPC_MSG_REQUEST);
2534         CHECK_VALUE(PTL_RPC_MSG_ERR);
2535         CHECK_VALUE(PTL_RPC_MSG_REPLY);
2536
2537         CHECK_DEFINE_64X(MDS_DIR_END_OFF);
2538
2539         CHECK_DEFINE_64X(DEAD_HANDLE_MAGIC);
2540
2541         CHECK_CVALUE(MTI_NAME_MAXLEN);
2542
2543         CHECK_VALUE(OST_REPLY);
2544         CHECK_VALUE(OST_GETATTR);
2545         CHECK_VALUE(OST_SETATTR);
2546         CHECK_VALUE(OST_READ);
2547         CHECK_VALUE(OST_WRITE);
2548         CHECK_VALUE(OST_CREATE);
2549         CHECK_VALUE(OST_DESTROY);
2550         CHECK_VALUE(OST_GET_INFO);
2551         CHECK_VALUE(OST_CONNECT);
2552         CHECK_VALUE(OST_DISCONNECT);
2553         CHECK_VALUE(OST_PUNCH);
2554         CHECK_VALUE(OST_OPEN);
2555         CHECK_VALUE(OST_CLOSE);
2556         CHECK_VALUE(OST_STATFS);
2557         CHECK_VALUE(OST_SYNC);
2558         CHECK_VALUE(OST_SET_INFO);
2559         CHECK_VALUE(OST_QUOTACHECK);
2560         CHECK_VALUE(OST_QUOTACTL);
2561         CHECK_VALUE(OST_QUOTA_ADJUST_QUNIT);
2562         CHECK_VALUE(OST_LADVISE);
2563         CHECK_VALUE(OST_LAST_OPC);
2564
2565         CHECK_DEFINE_64X(OBD_OBJECT_EOF);
2566
2567         CHECK_VALUE(OST_MIN_PRECREATE);
2568         CHECK_VALUE(OST_MAX_PRECREATE);
2569
2570         CHECK_DEFINE_64X(OST_LVB_ERR_INIT);
2571         CHECK_DEFINE_64X(OST_LVB_ERR_MASK);
2572
2573         CHECK_VALUE(MDS_FIRST_OPC);
2574         CHECK_VALUE(MDS_GETATTR);
2575         CHECK_VALUE(MDS_GETATTR_NAME);
2576         CHECK_VALUE(MDS_CLOSE);
2577         CHECK_VALUE(MDS_REINT);
2578         CHECK_VALUE(MDS_READPAGE);
2579         CHECK_VALUE(MDS_CONNECT);
2580         CHECK_VALUE(MDS_DISCONNECT);
2581         CHECK_VALUE(MDS_GET_ROOT);
2582         CHECK_VALUE(MDS_STATFS);
2583         CHECK_VALUE(MDS_PIN);
2584         CHECK_VALUE(MDS_UNPIN);
2585         CHECK_VALUE(MDS_SYNC);
2586         CHECK_VALUE(MDS_DONE_WRITING);
2587         CHECK_VALUE(MDS_SET_INFO);
2588         CHECK_VALUE(MDS_QUOTACHECK);
2589         CHECK_VALUE(MDS_QUOTACTL);
2590         CHECK_VALUE(MDS_GETXATTR);
2591         CHECK_VALUE(MDS_SETXATTR);
2592         CHECK_VALUE(MDS_WRITEPAGE);
2593         CHECK_VALUE(MDS_IS_SUBDIR);
2594         CHECK_VALUE(MDS_GET_INFO);
2595         CHECK_VALUE(MDS_HSM_STATE_GET);
2596         CHECK_VALUE(MDS_HSM_STATE_SET);
2597         CHECK_VALUE(MDS_HSM_ACTION);
2598         CHECK_VALUE(MDS_HSM_PROGRESS);
2599         CHECK_VALUE(MDS_HSM_REQUEST);
2600         CHECK_VALUE(MDS_HSM_CT_REGISTER);
2601         CHECK_VALUE(MDS_HSM_CT_UNREGISTER);
2602         CHECK_VALUE(MDS_SWAP_LAYOUTS);
2603         CHECK_VALUE(MDS_LAST_OPC);
2604
2605         CHECK_VALUE(REINT_SETATTR);
2606         CHECK_VALUE(REINT_CREATE);
2607         CHECK_VALUE(REINT_LINK);
2608         CHECK_VALUE(REINT_UNLINK);
2609         CHECK_VALUE(REINT_RENAME);
2610         CHECK_VALUE(REINT_OPEN);
2611         CHECK_VALUE(REINT_SETXATTR);
2612         CHECK_VALUE(REINT_RMENTRY);
2613         CHECK_VALUE(REINT_MIGRATE);
2614         CHECK_VALUE(REINT_MAX);
2615
2616         CHECK_VALUE_X(DISP_IT_EXECD);
2617         CHECK_VALUE_X(DISP_LOOKUP_EXECD);
2618         CHECK_VALUE_X(DISP_LOOKUP_NEG);
2619         CHECK_VALUE_X(DISP_LOOKUP_POS);
2620         CHECK_VALUE_X(DISP_OPEN_CREATE);
2621         CHECK_VALUE_X(DISP_OPEN_OPEN);
2622         CHECK_VALUE_X(DISP_ENQ_COMPLETE);
2623         CHECK_VALUE_X(DISP_ENQ_OPEN_REF);
2624         CHECK_VALUE_X(DISP_ENQ_CREATE_REF);
2625         CHECK_VALUE_X(DISP_OPEN_LOCK);
2626
2627         CHECK_VALUE(MDS_STATUS_CONN);
2628         CHECK_VALUE(MDS_STATUS_LOV);
2629
2630         CHECK_VALUE_64X(MDS_ATTR_MODE);
2631         CHECK_VALUE_64X(MDS_ATTR_UID);
2632         CHECK_VALUE_64X(MDS_ATTR_GID);
2633         CHECK_VALUE_64X(MDS_ATTR_SIZE);
2634         CHECK_VALUE_64X(MDS_ATTR_ATIME);
2635         CHECK_VALUE_64X(MDS_ATTR_MTIME);
2636         CHECK_VALUE_64X(MDS_ATTR_CTIME);
2637         CHECK_VALUE_64X(MDS_ATTR_ATIME_SET);
2638         CHECK_VALUE_64X(MDS_ATTR_MTIME_SET);
2639         CHECK_VALUE_64X(MDS_ATTR_FORCE);
2640         CHECK_VALUE_64X(MDS_ATTR_ATTR_FLAG);
2641         CHECK_VALUE_64X(MDS_ATTR_KILL_SUID);
2642         CHECK_VALUE_64X(MDS_ATTR_KILL_SGID);
2643         CHECK_VALUE_64X(MDS_ATTR_CTIME_SET);
2644         CHECK_VALUE_64X(MDS_ATTR_FROM_OPEN);
2645         CHECK_VALUE_64X(MDS_ATTR_BLOCKS);
2646         CHECK_VALUE_64X(MDS_ATTR_PROJID);
2647         CHECK_VALUE_64X(MDS_ATTR_LSIZE);
2648         CHECK_VALUE_64X(MDS_ATTR_LBLOCKS);
2649
2650         CHECK_VALUE(FLD_QUERY);
2651         CHECK_VALUE(FLD_READ);
2652         CHECK_VALUE(FLD_FIRST_OPC);
2653         CHECK_VALUE(FLD_LAST_OPC);
2654
2655         CHECK_VALUE(SEQ_QUERY);
2656         CHECK_VALUE(SEQ_FIRST_OPC);
2657         CHECK_VALUE(SEQ_LAST_OPC);
2658
2659         CHECK_VALUE(LFSCK_NOTIFY);
2660         CHECK_VALUE(LFSCK_QUERY);
2661         CHECK_VALUE(LFSCK_FIRST_OPC);
2662         CHECK_VALUE(LFSCK_LAST_OPC);
2663
2664         CHECK_VALUE(SEQ_ALLOC_SUPER);
2665         CHECK_VALUE(SEQ_ALLOC_META);
2666
2667         CHECK_VALUE(LDLM_ENQUEUE);
2668         CHECK_VALUE(LDLM_CONVERT);
2669         CHECK_VALUE(LDLM_CANCEL);
2670         CHECK_VALUE(LDLM_BL_CALLBACK);
2671         CHECK_VALUE(LDLM_CP_CALLBACK);
2672         CHECK_VALUE(LDLM_GL_CALLBACK);
2673         CHECK_VALUE(LDLM_SET_INFO);
2674         CHECK_VALUE(LDLM_LAST_OPC);
2675
2676         CHECK_VALUE(LCK_MINMODE);
2677         CHECK_VALUE(LCK_EX);
2678         CHECK_VALUE(LCK_PW);
2679         CHECK_VALUE(LCK_PR);
2680         CHECK_VALUE(LCK_CW);
2681         CHECK_VALUE(LCK_CR);
2682         CHECK_VALUE(LCK_NL);
2683         CHECK_VALUE(LCK_GROUP);
2684         CHECK_VALUE(LCK_COS);
2685         CHECK_VALUE(LCK_MAXMODE);
2686         CHECK_VALUE(LCK_MODE_NUM);
2687
2688         CHECK_CVALUE(LDLM_PLAIN);
2689         CHECK_CVALUE(LDLM_EXTENT);
2690         CHECK_CVALUE(LDLM_FLOCK);
2691         CHECK_CVALUE(LDLM_IBITS);
2692         CHECK_CVALUE(LDLM_MAX_TYPE);
2693
2694         CHECK_CVALUE(LUSTRE_RES_ID_SEQ_OFF);
2695         CHECK_CVALUE(LUSTRE_RES_ID_VER_OID_OFF);
2696         /* CHECK_CVALUE(LUSTRE_RES_ID_WAS_VER_OFF); packed with OID */
2697
2698         CHECK_VALUE(OUT_UPDATE);
2699         CHECK_VALUE(OUT_UPDATE_LAST_OPC);
2700         CHECK_CVALUE(LUSTRE_RES_ID_QUOTA_SEQ_OFF);
2701         CHECK_CVALUE(LUSTRE_RES_ID_QUOTA_VER_OID_OFF);
2702         CHECK_CVALUE(LUSTRE_RES_ID_HSH_OFF);
2703
2704         CHECK_CVALUE(LQUOTA_TYPE_USR);
2705         CHECK_CVALUE(LQUOTA_TYPE_GRP);
2706
2707         CHECK_CVALUE(LQUOTA_RES_MD);
2708         CHECK_CVALUE(LQUOTA_RES_DT);
2709
2710         CHECK_VALUE(OBD_PING);
2711         CHECK_VALUE(OBD_IDX_READ);
2712         CHECK_VALUE(OBD_LAST_OPC);
2713
2714         CHECK_VALUE(QUOTA_DQACQ);
2715         CHECK_VALUE(QUOTA_DQREL);
2716         CHECK_VALUE(QUOTA_LAST_OPC);
2717
2718         CHECK_VALUE(MGS_CONNECT);
2719         CHECK_VALUE(MGS_DISCONNECT);
2720         CHECK_VALUE(MGS_EXCEPTION);
2721         CHECK_VALUE(MGS_TARGET_REG);
2722         CHECK_VALUE(MGS_TARGET_DEL);
2723         CHECK_VALUE(MGS_SET_INFO);
2724         CHECK_VALUE(MGS_CONFIG_READ);
2725         CHECK_VALUE(MGS_LAST_OPC);
2726
2727         CHECK_VALUE(SEC_CTX_INIT);
2728         CHECK_VALUE(SEC_CTX_INIT_CONT);
2729         CHECK_VALUE(SEC_CTX_FINI);
2730         CHECK_VALUE(SEC_LAST_OPC);
2731
2732         COMMENT("Sizes and Offsets");
2733         BLANK_LINE();
2734         CHECK_STRUCT(obd_uuid);
2735         check_lu_seq_range();
2736         check_lustre_mdt_attrs();
2737         check_lustre_ost_attrs();
2738
2739         CHECK_VALUE(OUT_CREATE);
2740         CHECK_VALUE(OUT_DESTROY);
2741         CHECK_VALUE(OUT_REF_ADD);
2742         CHECK_VALUE(OUT_REF_DEL);
2743         CHECK_VALUE(OUT_ATTR_SET);
2744         CHECK_VALUE(OUT_ATTR_GET);
2745         CHECK_VALUE(OUT_XATTR_SET);
2746         CHECK_VALUE(OUT_XATTR_GET);
2747         CHECK_VALUE(OUT_INDEX_LOOKUP);
2748         CHECK_VALUE(OUT_INDEX_LOOKUP);
2749         CHECK_VALUE(OUT_INDEX_INSERT);
2750         CHECK_VALUE(OUT_INDEX_DELETE);
2751         CHECK_VALUE(OUT_WRITE);
2752         CHECK_VALUE(OUT_XATTR_DEL);
2753         CHECK_VALUE(OUT_PUNCH);
2754         CHECK_VALUE(OUT_READ);
2755         CHECK_VALUE(OUT_NOOP);
2756         CHECK_VALUE(OUT_XATTR_LIST);
2757
2758         check_som_attrs();
2759         check_hsm_attrs();
2760         check_ost_id();
2761         check_lu_dirent();
2762         check_luda_type();
2763         check_lu_dirpage();
2764         check_lu_ladvise();
2765         check_ladvise_hdr();
2766         check_lustre_handle();
2767         check_lustre_msg_v2();
2768         check_ptlrpc_body();
2769         check_obd_connect_data();
2770         check_ost_layout();
2771         check_obdo();
2772         check_lov_ost_data_v1();
2773         check_lov_mds_md_v1();
2774         check_lov_mds_md_v3();
2775         check_lov_comp_md_entry_v1();
2776         check_lov_comp_md_v1();
2777         check_lmv_mds_md_v1();
2778         check_obd_statfs();
2779         check_obd_ioobj();
2780         check_obd_quotactl();
2781         check_obd_idx_read();
2782         check_niobuf_remote();
2783         check_ost_body();
2784         check_ll_fid();
2785         check_mds_op_bias();
2786         check_mdt_body();
2787         check_mdt_ioepoch();
2788         check_mdt_rec_setattr();
2789         check_mdt_rec_create();
2790         check_mdt_rec_link();
2791         check_mdt_rec_unlink();
2792         check_mdt_rec_rename();
2793         check_mdt_rec_setxattr();
2794         check_mdt_rec_resync();
2795         check_mdt_rec_reint();
2796         check_lmv_desc();
2797         check_lov_desc();
2798         check_ldlm_res_id();
2799         check_ldlm_extent();
2800         check_ldlm_inodebits();
2801         check_ldlm_flock();
2802         check_ldlm_intent();
2803         check_ldlm_resource_desc();
2804         check_ldlm_lock_desc();
2805         check_ldlm_request();
2806         check_ldlm_reply();
2807         check_ldlm_ost_lvb_v1();
2808         check_ldlm_ost_lvb();
2809         check_ldlm_lquota_lvb();
2810         check_ldlm_gl_lquota_desc();
2811         check_ldlm_gl_barrier_desc();
2812         check_ldlm_barrier_lvb();
2813 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 13, 53, 0)
2814         check_mgs_send_param();
2815 #endif
2816         check_cfg_marker();
2817         check_llog_logid();
2818         check_llog_catid();
2819         check_llog_rec_hdr();
2820         check_llog_rec_tail();
2821         check_llog_logid_rec();
2822         check_llog_unlink_rec();
2823         check_llog_unlink64_rec();
2824         check_llog_setattr64_rec();
2825         check_llog_size_change_rec();
2826         check_changelog_rec();
2827         check_changelog_ext_rename();
2828         check_changelog_ext_jobid();
2829         check_changelog_setinfo();
2830         check_llog_changelog_rec();
2831         check_llog_changelog_user_rec();
2832         check_llog_gen();
2833         check_llog_gen_rec();
2834         check_llog_log_hdr();
2835         check_llogd_body();
2836         check_llogd_conn_body();
2837         check_ll_fiemap_info_key();
2838         check_quota_body();
2839         check_mgs_target_info();
2840         check_mgs_nidtbl_entry();
2841         check_mgs_config_body();
2842         check_mgs_config_res();
2843         check_lustre_capa();
2844         check_lustre_capa_key();
2845         check_getinfo_fid2path();
2846         check_ll_user_fiemap();
2847         check_ll_fiemap_extent();
2848         check_posix_acl_xattr_entry();
2849         check_posix_acl_xattr_header();
2850         check_link_ea_header();
2851         check_link_ea_entry();
2852         check_layout_intent();
2853         check_hsm_action_item();
2854         check_hsm_action_list();
2855         check_hsm_progress();
2856         check_hsm_copy();
2857         check_hsm_progress_kernel();
2858         check_hsm_user_item();
2859         check_hsm_user_state();
2860         check_hsm_state_set();
2861         check_hsm_current_action();
2862         check_hsm_request();
2863         check_hsm_user_request();
2864         check_hsm_user_import();
2865
2866         check_object_update_param();
2867         check_object_update();
2868         check_object_update_request();
2869         check_object_update_result();
2870         check_object_update_reply();
2871         check_out_update_header();
2872         check_out_update_buffer();
2873
2874         check_nodemap_cluster_rec();
2875         check_nodemap_range_rec();
2876         check_nodemap_id_rec();
2877         check_nodemap_global_rec();
2878         check_nodemap_rec();
2879
2880         check_lfsck_request();
2881         check_lfsck_reply();
2882
2883         check_update_params();
2884         check_update_op();
2885         check_update_ops();
2886         check_update_records();
2887         check_llog_update_record();
2888
2889         printf("}\n\n");
2890
2891         return 0;
2892 }