3 #include <linux/lustre_lib.h>
4 #include <linux/lustre_idl.h>
7 #define LASSERT(cond) if (!(cond)) { printf("failed " #cond "\n"); ret = 1; }
11 void lustre_assert_wire_constants(void);
15 lustre_assert_wire_constants();
19 void lustre_assert_wire_constants(void)
21 /* Wire protocol assertions generated by 'wirecheck' */
24 LASSERT(PTLRPC_MSG_MAGIC == 0x0BD00BD0);
25 LASSERT(PTLRPC_MSG_VERSION == 0x00000003);
26 LASSERT(PTL_RPC_MSG_REQUEST == 4711);
27 LASSERT(PTL_RPC_MSG_ERR == 4712);
28 LASSERT(PTL_RPC_MSG_REPLY == 4713);
29 LASSERT(MSG_LAST_REPLAY == 1);
30 LASSERT(MSG_RESENT == 2);
31 LASSERT(MSG_CONNECT_RECOVERING == 1);
32 LASSERT(MSG_CONNECT_RECONNECT == 2);
33 LASSERT(MSG_CONNECT_REPLAYABLE == 4);
34 LASSERT(OST_REPLY == 0);
35 LASSERT(OST_GETATTR == 1);
36 LASSERT(OST_SETATTR == 2);
37 LASSERT(OST_READ == 3);
38 LASSERT(OST_WRITE == 4);
39 LASSERT(OST_CREATE == 5);
40 LASSERT(OST_DESTROY == 6);
41 LASSERT(OST_GET_INFO == 7);
42 LASSERT(OST_CONNECT == 8);
43 LASSERT(OST_DISCONNECT == 9);
44 LASSERT(OST_PUNCH == 10);
45 LASSERT(OST_OPEN == 11);
46 LASSERT(OST_CLOSE == 12);
47 LASSERT(OST_STATFS == 13);
48 LASSERT(OST_SAN_READ == 14);
49 LASSERT(OST_SAN_WRITE == 15);
50 LASSERT(OST_SYNC == 16);
51 LASSERT(OST_LAST_OPC == 18);
52 LASSERT(OST_FIRST_OPC == 0);
53 LASSERT(OBD_FL_INLINEDATA == 1);
54 LASSERT(OBD_FL_OBDMDEXISTS == 2);
55 LASSERT(OBD_OBJECT_EOF == 0xffffffffffffffffULL);
56 LASSERT(OST_REQ_HAS_OA1 == 1);
57 LASSERT(MDS_GETATTR == 33);
58 LASSERT(MDS_GETATTR_NAME == 34);
59 LASSERT(MDS_CLOSE == 35);
60 LASSERT(MDS_REINT == 36);
61 LASSERT(MDS_READPAGE == 37);
62 LASSERT(MDS_CONNECT == 38);
63 LASSERT(MDS_DISCONNECT == 39);
64 LASSERT(MDS_GETSTATUS == 40);
65 LASSERT(MDS_STATFS == 41);
66 LASSERT(MDS_LAST_OPC == 45);
67 LASSERT(MDS_FIRST_OPC == 33);
68 LASSERT(REINT_SETATTR == 1);
69 LASSERT(REINT_CREATE == 2);
70 LASSERT(REINT_LINK == 3);
71 LASSERT(REINT_UNLINK == 4);
72 LASSERT(REINT_RENAME == 5);
73 LASSERT(REINT_OPEN == 6);
74 LASSERT(REINT_MAX == 6);
75 LASSERT(DISP_IT_EXECD == 1);
76 LASSERT(DISP_LOOKUP_EXECD == 2);
77 LASSERT(DISP_LOOKUP_NEG == 4);
78 LASSERT(DISP_LOOKUP_POS == 8);
79 LASSERT(DISP_OPEN_CREATE == 16);
80 LASSERT(DISP_OPEN_OPEN == 32);
81 LASSERT(MDS_STATUS_CONN == 1);
82 LASSERT(MDS_STATUS_LOV == 2);
83 LASSERT(MDS_OPEN_HAS_EA == 1073741824);
84 LASSERT(LDLM_ENQUEUE == 101);
85 LASSERT(LDLM_CONVERT == 102);
86 LASSERT(LDLM_CANCEL == 103);
87 LASSERT(LDLM_BL_CALLBACK == 104);
88 LASSERT(LDLM_CP_CALLBACK == 105);
89 LASSERT(LDLM_LAST_OPC == 106);
90 LASSERT(LDLM_FIRST_OPC == 101);
91 LASSERT(PTLBD_QUERY == 200);
92 LASSERT(PTLBD_READ == 201);
93 LASSERT(PTLBD_WRITE == 202);
94 LASSERT(PTLBD_FLUSH == 203);
95 LASSERT(PTLBD_CONNECT == 204);
96 LASSERT(PTLBD_DISCONNECT == 205);
97 LASSERT(PTLBD_LAST_OPC == 206);
98 LASSERT(PTLBD_FIRST_OPC == 200);
99 LASSERT(OBD_PING == 400);
100 /* Sizes and Offsets */
103 /* Checks for struct lustre_handle */
104 LASSERT((int)sizeof(struct lustre_handle) == 8);
105 LASSERT(offsetof(struct lustre_handle, cookie) == 0);
106 LASSERT((int)sizeof(((struct lustre_handle *)0)->cookie) == 8);
108 /* Checks for struct lustre_msg */
109 LASSERT((int)sizeof(struct lustre_msg) == 64);
110 LASSERT(offsetof(struct lustre_msg, handle) == 0);
111 LASSERT((int)sizeof(((struct lustre_msg *)0)->handle) == 8);
112 LASSERT(offsetof(struct lustre_msg, magic) == 8);
113 LASSERT((int)sizeof(((struct lustre_msg *)0)->magic) == 4);
114 LASSERT(offsetof(struct lustre_msg, type) == 12);
115 LASSERT((int)sizeof(((struct lustre_msg *)0)->type) == 4);
116 LASSERT(offsetof(struct lustre_msg, version) == 16);
117 LASSERT((int)sizeof(((struct lustre_msg *)0)->version) == 4);
118 LASSERT(offsetof(struct lustre_msg, opc) == 20);
119 LASSERT((int)sizeof(((struct lustre_msg *)0)->opc) == 4);
120 LASSERT(offsetof(struct lustre_msg, last_xid) == 24);
121 LASSERT((int)sizeof(((struct lustre_msg *)0)->last_xid) == 8);
122 LASSERT(offsetof(struct lustre_msg, last_committed) == 32);
123 LASSERT((int)sizeof(((struct lustre_msg *)0)->last_committed) == 8);
124 LASSERT(offsetof(struct lustre_msg, transno) == 40);
125 LASSERT((int)sizeof(((struct lustre_msg *)0)->transno) == 8);
126 LASSERT(offsetof(struct lustre_msg, status) == 48);
127 LASSERT((int)sizeof(((struct lustre_msg *)0)->status) == 4);
128 LASSERT(offsetof(struct lustre_msg, flags) == 52);
129 LASSERT((int)sizeof(((struct lustre_msg *)0)->flags) == 4);
130 LASSERT(offsetof(struct lustre_msg, bufcount) == 60);
131 LASSERT((int)sizeof(((struct lustre_msg *)0)->bufcount) == 4);
132 LASSERT(offsetof(struct lustre_msg, buflens[7]) == 92);
133 LASSERT((int)sizeof(((struct lustre_msg *)0)->buflens[7]) == 4);
135 /* Checks for struct obdo */
136 LASSERT((int)sizeof(struct obdo) == 168);
137 LASSERT(offsetof(struct obdo, o_id) == 0);
138 LASSERT((int)sizeof(((struct obdo *)0)->o_id) == 8);
139 LASSERT(offsetof(struct obdo, o_gr) == 8);
140 LASSERT((int)sizeof(((struct obdo *)0)->o_gr) == 8);
141 LASSERT(offsetof(struct obdo, o_atime) == 16);
142 LASSERT((int)sizeof(((struct obdo *)0)->o_atime) == 8);
143 LASSERT(offsetof(struct obdo, o_mtime) == 24);
144 LASSERT((int)sizeof(((struct obdo *)0)->o_mtime) == 8);
145 LASSERT(offsetof(struct obdo, o_ctime) == 32);
146 LASSERT((int)sizeof(((struct obdo *)0)->o_ctime) == 8);
147 LASSERT(offsetof(struct obdo, o_size) == 40);
148 LASSERT((int)sizeof(((struct obdo *)0)->o_size) == 8);
149 LASSERT(offsetof(struct obdo, o_blocks) == 48);
150 LASSERT((int)sizeof(((struct obdo *)0)->o_blocks) == 8);
151 LASSERT(offsetof(struct obdo, o_grant) == 56);
152 LASSERT((int)sizeof(((struct obdo *)0)->o_grant) == 8);
153 LASSERT(offsetof(struct obdo, o_blksize) == 64);
154 LASSERT((int)sizeof(((struct obdo *)0)->o_blksize) == 4);
155 LASSERT(offsetof(struct obdo, o_mode) == 68);
156 LASSERT((int)sizeof(((struct obdo *)0)->o_mode) == 4);
157 LASSERT(offsetof(struct obdo, o_uid) == 72);
158 LASSERT((int)sizeof(((struct obdo *)0)->o_uid) == 4);
159 LASSERT(offsetof(struct obdo, o_gid) == 76);
160 LASSERT((int)sizeof(((struct obdo *)0)->o_gid) == 4);
161 LASSERT(offsetof(struct obdo, o_flags) == 80);
162 LASSERT((int)sizeof(((struct obdo *)0)->o_flags) == 4);
163 LASSERT(offsetof(struct obdo, o_nlink) == 84);
164 LASSERT((int)sizeof(((struct obdo *)0)->o_nlink) == 4);
165 LASSERT(offsetof(struct obdo, o_generation) == 88);
166 LASSERT((int)sizeof(((struct obdo *)0)->o_generation) == 4);
167 LASSERT(offsetof(struct obdo, o_valid) == 92);
168 LASSERT((int)sizeof(((struct obdo *)0)->o_valid) == 4);
169 LASSERT(offsetof(struct obdo, o_obdflags) == 96);
170 LASSERT((int)sizeof(((struct obdo *)0)->o_obdflags) == 4);
171 LASSERT(offsetof(struct obdo, o_easize) == 100);
172 LASSERT((int)sizeof(((struct obdo *)0)->o_easize) == 4);
173 LASSERT(offsetof(struct obdo, o_inline) == 104);
174 LASSERT((int)sizeof(((struct obdo *)0)->o_inline) == 64);
175 LASSERT(OBD_MD_FLID == 1);
176 LASSERT(OBD_MD_FLATIME == 2);
177 LASSERT(OBD_MD_FLMTIME == 4);
178 LASSERT(OBD_MD_FLCTIME == 8);
179 LASSERT(OBD_MD_FLSIZE == 16);
180 LASSERT(OBD_MD_FLBLOCKS == 32);
181 LASSERT(OBD_MD_FLBLKSZ == 64);
182 LASSERT(OBD_MD_FLMODE == 128);
183 LASSERT(OBD_MD_FLTYPE == 256);
184 LASSERT(OBD_MD_FLUID == 512);
185 LASSERT(OBD_MD_FLGID == 1024);
186 LASSERT(OBD_MD_FLFLAGS == 2048);
187 LASSERT(OBD_MD_FLOBDFLG == 4096);
188 LASSERT(OBD_MD_FLNLINK == 8192);
189 LASSERT(OBD_MD_FLGENER == 16384);
190 LASSERT(OBD_MD_FLINLINE == 32768);
191 LASSERT(OBD_MD_FLRDEV == 65536);
192 LASSERT(OBD_MD_FLEASIZE == 131072);
193 LASSERT(OBD_MD_LINKNAME == 262144);
194 LASSERT(OBD_MD_FLHANDLE == 524288);
195 LASSERT(OBD_MD_FLCKSUM == 1048576);
196 LASSERT(OBD_MD_FLQOS == 2097152);
197 LASSERT(OBD_MD_FLOSCOPQ == 4194304);
198 LASSERT(OBD_MD_FLCOOKIE == 8388608);
199 LASSERT(OBD_MD_FLGROUP == 16777216);
201 /* Checks for struct lov_mds_md_v1 */
202 LASSERT((int)sizeof(struct lov_mds_md_v1) == 32);
203 LASSERT(offsetof(struct lov_mds_md_v1, lmm_magic) == 0);
204 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4);
205 LASSERT(offsetof(struct lov_mds_md_v1, lmm_pattern) == 4);
206 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4);
207 LASSERT(offsetof(struct lov_mds_md_v1, lmm_object_id) == 8);
208 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8);
209 LASSERT(offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16);
210 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8);
211 LASSERT(offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24);
212 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4);
213 LASSERT(offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28);
214 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4);
215 LASSERT(offsetof(struct lov_mds_md_v1, lmm_objects) == 32);
216 LASSERT((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0);
218 /* Checks for struct lov_ost_data_v1 */
219 LASSERT((int)sizeof(struct lov_ost_data_v1) == 24);
220 LASSERT(offsetof(struct lov_ost_data_v1, l_object_id) == 0);
221 LASSERT((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8);
222 LASSERT(offsetof(struct lov_ost_data_v1, l_object_gr) == 8);
223 LASSERT((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8);
224 LASSERT(offsetof(struct lov_ost_data_v1, l_ost_gen) == 16);
225 LASSERT((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4);
226 LASSERT(offsetof(struct lov_ost_data_v1, l_ost_idx) == 20);
227 LASSERT((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4);
228 LASSERT(LOV_MAGIC_V0 == 198183888);
229 LASSERT(LOV_MAGIC_V1 == 198249424);
230 LASSERT(LOV_PATTERN_RAID0 == 1);
231 LASSERT(LOV_PATTERN_RAID1 == 2);
233 /* Checks for struct obd_statfs */
234 LASSERT((int)sizeof(struct obd_statfs) == 144);
235 LASSERT(offsetof(struct obd_statfs, os_type) == 0);
236 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_type) == 8);
237 LASSERT(offsetof(struct obd_statfs, os_blocks) == 8);
238 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8);
239 LASSERT(offsetof(struct obd_statfs, os_bfree) == 16);
240 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8);
241 LASSERT(offsetof(struct obd_statfs, os_bavail) == 24);
242 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8);
243 LASSERT(offsetof(struct obd_statfs, os_ffree) == 40);
244 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8);
245 LASSERT(offsetof(struct obd_statfs, os_fsid) == 48);
246 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40);
247 LASSERT(offsetof(struct obd_statfs, os_bsize) == 88);
248 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4);
249 LASSERT(offsetof(struct obd_statfs, os_namelen) == 92);
250 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4);
251 LASSERT(offsetof(struct obd_statfs, os_spare) == 104);
252 LASSERT((int)sizeof(((struct obd_statfs *)0)->os_spare) == 40);
254 /* Checks for struct obd_ioobj */
255 LASSERT((int)sizeof(struct obd_ioobj) == 24);
256 LASSERT(offsetof(struct obd_ioobj, ioo_id) == 0);
257 LASSERT((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8);
258 LASSERT(offsetof(struct obd_ioobj, ioo_gr) == 8);
259 LASSERT((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8);
260 LASSERT(offsetof(struct obd_ioobj, ioo_type) == 16);
261 LASSERT((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4);
262 LASSERT(offsetof(struct obd_ioobj, ioo_bufcnt) == 20);
263 LASSERT((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4);
265 /* Checks for struct niobuf_remote */
266 LASSERT((int)sizeof(struct niobuf_remote) == 16);
267 LASSERT(offsetof(struct niobuf_remote, offset) == 0);
268 LASSERT((int)sizeof(((struct niobuf_remote *)0)->offset) == 8);
269 LASSERT(offsetof(struct niobuf_remote, len) == 8);
270 LASSERT((int)sizeof(((struct niobuf_remote *)0)->len) == 4);
271 LASSERT(offsetof(struct niobuf_remote, flags) == 12);
272 LASSERT((int)sizeof(((struct niobuf_remote *)0)->flags) == 4);
273 LASSERT(OBD_BRW_READ == 1);
274 LASSERT(OBD_BRW_WRITE == 2);
275 LASSERT(OBD_BRW_CREATE == 4);
276 LASSERT(OBD_BRW_SYNC == 8);
278 /* Checks for struct ost_body */
279 LASSERT((int)sizeof(struct ost_body) == 168);
280 LASSERT(offsetof(struct ost_body, oa) == 0);
281 LASSERT((int)sizeof(((struct ost_body *)0)->oa) == 168);
283 /* Checks for struct ll_fid */
284 LASSERT((int)sizeof(struct ll_fid) == 16);
285 LASSERT(offsetof(struct ll_fid, id) == 0);
286 LASSERT((int)sizeof(((struct ll_fid *)0)->id) == 8);
287 LASSERT(offsetof(struct ll_fid, generation) == 8);
288 LASSERT((int)sizeof(((struct ll_fid *)0)->generation) == 4);
289 LASSERT(offsetof(struct ll_fid, f_type) == 12);
290 LASSERT((int)sizeof(((struct ll_fid *)0)->f_type) == 4);
292 /* Checks for struct mds_status_req */
293 LASSERT((int)sizeof(struct mds_status_req) == 8);
294 LASSERT(offsetof(struct mds_status_req, flags) == 0);
295 LASSERT((int)sizeof(((struct mds_status_req *)0)->flags) == 4);
296 LASSERT(offsetof(struct mds_status_req, repbuf) == 4);
297 LASSERT((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4);
299 /* Checks for struct mds_body */
300 LASSERT((int)sizeof(struct mds_body) == 136);
301 LASSERT(offsetof(struct mds_body, fid1) == 0);
302 LASSERT((int)sizeof(((struct mds_body *)0)->fid1) == 16);
303 LASSERT(offsetof(struct mds_body, fid2) == 16);
304 LASSERT((int)sizeof(((struct mds_body *)0)->fid2) == 16);
305 LASSERT(offsetof(struct mds_body, handle) == 32);
306 LASSERT((int)sizeof(((struct mds_body *)0)->handle) == 8);
307 LASSERT(offsetof(struct mds_body, size) == 40);
308 LASSERT((int)sizeof(((struct mds_body *)0)->size) == 8);
309 LASSERT(offsetof(struct mds_body, blocks) == 48);
310 LASSERT((int)sizeof(((struct mds_body *)0)->blocks) == 8);
311 LASSERT(offsetof(struct mds_body, io_epoch) == 56);
312 LASSERT((int)sizeof(((struct mds_body *)0)->io_epoch) == 8);
313 LASSERT(offsetof(struct mds_body, ino) == 64);
314 LASSERT((int)sizeof(((struct mds_body *)0)->ino) == 4);
315 LASSERT(offsetof(struct mds_body, valid) == 68);
316 LASSERT((int)sizeof(((struct mds_body *)0)->valid) == 4);
317 LASSERT(offsetof(struct mds_body, fsuid) == 72);
318 LASSERT((int)sizeof(((struct mds_body *)0)->fsuid) == 4);
319 LASSERT(offsetof(struct mds_body, fsgid) == 76);
320 LASSERT((int)sizeof(((struct mds_body *)0)->fsgid) == 4);
321 LASSERT(offsetof(struct mds_body, capability) == 80);
322 LASSERT((int)sizeof(((struct mds_body *)0)->capability) == 4);
323 LASSERT(offsetof(struct mds_body, mode) == 84);
324 LASSERT((int)sizeof(((struct mds_body *)0)->mode) == 4);
325 LASSERT(offsetof(struct mds_body, uid) == 88);
326 LASSERT((int)sizeof(((struct mds_body *)0)->uid) == 4);
327 LASSERT(offsetof(struct mds_body, gid) == 92);
328 LASSERT((int)sizeof(((struct mds_body *)0)->gid) == 4);
329 LASSERT(offsetof(struct mds_body, mtime) == 96);
330 LASSERT((int)sizeof(((struct mds_body *)0)->mtime) == 4);
331 LASSERT(offsetof(struct mds_body, ctime) == 100);
332 LASSERT((int)sizeof(((struct mds_body *)0)->ctime) == 4);
333 LASSERT(offsetof(struct mds_body, atime) == 104);
334 LASSERT((int)sizeof(((struct mds_body *)0)->atime) == 4);
335 LASSERT(offsetof(struct mds_body, flags) == 108);
336 LASSERT((int)sizeof(((struct mds_body *)0)->flags) == 4);
337 LASSERT(offsetof(struct mds_body, rdev) == 112);
338 LASSERT((int)sizeof(((struct mds_body *)0)->rdev) == 4);
339 LASSERT(offsetof(struct mds_body, nlink) == 116);
340 LASSERT((int)sizeof(((struct mds_body *)0)->nlink) == 4);
341 LASSERT(offsetof(struct mds_body, generation) == 120);
342 LASSERT((int)sizeof(((struct mds_body *)0)->generation) == 4);
343 LASSERT(offsetof(struct mds_body, suppgid) == 124);
344 LASSERT((int)sizeof(((struct mds_body *)0)->suppgid) == 4);
345 LASSERT(offsetof(struct mds_body, eadatasize) == 128);
346 LASSERT((int)sizeof(((struct mds_body *)0)->eadatasize) == 4);
347 LASSERT(FMODE_READ == 1);
348 LASSERT(FMODE_WRITE == 2);
349 LASSERT(FMODE_EXEC == 4);
350 LASSERT(MDS_OPEN_CREAT == 64);
351 LASSERT(MDS_OPEN_EXCL == 128);
352 LASSERT(MDS_OPEN_APPEND == 1024);
353 LASSERT(MDS_OPEN_SYNC == 4096);
354 LASSERT(MDS_OPEN_DIRECTORY == 65536);
355 LASSERT(MDS_OPEN_DELAY_CREATE == 16777216);
356 LASSERT(MDS_OPEN_HAS_EA == 1073741824);
358 /* Checks for struct mds_rec_setattr */
359 LASSERT((int)sizeof(struct mds_rec_setattr) == 88);
360 LASSERT(offsetof(struct mds_rec_setattr, sa_opcode) == 0);
361 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4);
362 LASSERT(offsetof(struct mds_rec_setattr, sa_fsuid) == 4);
363 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4);
364 LASSERT(offsetof(struct mds_rec_setattr, sa_fsgid) == 8);
365 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4);
366 LASSERT(offsetof(struct mds_rec_setattr, sa_cap) == 12);
367 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4);
368 LASSERT(offsetof(struct mds_rec_setattr, sa_suppgid) == 16);
369 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4);
370 LASSERT(offsetof(struct mds_rec_setattr, sa_valid) == 20);
371 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 4);
372 LASSERT(offsetof(struct mds_rec_setattr, sa_fid) == 24);
373 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16);
374 LASSERT(offsetof(struct mds_rec_setattr, sa_mode) == 40);
375 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4);
376 LASSERT(offsetof(struct mds_rec_setattr, sa_uid) == 44);
377 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4);
378 LASSERT(offsetof(struct mds_rec_setattr, sa_gid) == 48);
379 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4);
380 LASSERT(offsetof(struct mds_rec_setattr, sa_attr_flags) == 52);
381 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4);
382 LASSERT(offsetof(struct mds_rec_setattr, sa_size) == 56);
383 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8);
384 LASSERT(offsetof(struct mds_rec_setattr, sa_atime) == 64);
385 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8);
386 LASSERT(offsetof(struct mds_rec_setattr, sa_mtime) == 72);
387 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8);
388 LASSERT(offsetof(struct mds_rec_setattr, sa_ctime) == 80);
389 LASSERT((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8);
391 /* Checks for struct mds_rec_create */
392 LASSERT((int)sizeof(struct mds_rec_create) == 80);
393 LASSERT(offsetof(struct mds_rec_create, cr_opcode) == 0);
394 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4);
395 LASSERT(offsetof(struct mds_rec_create, cr_fsuid) == 4);
396 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4);
397 LASSERT(offsetof(struct mds_rec_create, cr_fsgid) == 8);
398 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4);
399 LASSERT(offsetof(struct mds_rec_create, cr_cap) == 12);
400 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4);
401 LASSERT(offsetof(struct mds_rec_create, cr_flags) == 16);
402 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4);
403 LASSERT(offsetof(struct mds_rec_create, cr_mode) == 20);
404 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4);
405 LASSERT(offsetof(struct mds_rec_create, cr_fid) == 24);
406 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16);
407 LASSERT(offsetof(struct mds_rec_create, cr_replayfid) == 40);
408 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16);
409 LASSERT(offsetof(struct mds_rec_create, cr_time) == 56);
410 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8);
411 LASSERT(offsetof(struct mds_rec_create, cr_rdev) == 64);
412 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8);
413 LASSERT(offsetof(struct mds_rec_create, cr_suppgid) == 72);
414 LASSERT((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4);
416 /* Checks for struct mds_rec_link */
417 LASSERT((int)sizeof(struct mds_rec_link) == 64);
418 LASSERT(offsetof(struct mds_rec_link, lk_opcode) == 0);
419 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4);
420 LASSERT(offsetof(struct mds_rec_link, lk_fsuid) == 4);
421 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4);
422 LASSERT(offsetof(struct mds_rec_link, lk_fsgid) == 8);
423 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4);
424 LASSERT(offsetof(struct mds_rec_link, lk_cap) == 12);
425 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4);
426 LASSERT(offsetof(struct mds_rec_link, lk_suppgid1) == 16);
427 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4);
428 LASSERT(offsetof(struct mds_rec_link, lk_suppgid2) == 20);
429 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4);
430 LASSERT(offsetof(struct mds_rec_link, lk_fid1) == 24);
431 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16);
432 LASSERT(offsetof(struct mds_rec_link, lk_fid2) == 40);
433 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16);
434 LASSERT(offsetof(struct mds_rec_link, lk_time) == 56);
435 LASSERT((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8);
437 /* Checks for struct mds_rec_unlink */
438 LASSERT((int)sizeof(struct mds_rec_unlink) == 64);
439 LASSERT(offsetof(struct mds_rec_unlink, ul_opcode) == 0);
440 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4);
441 LASSERT(offsetof(struct mds_rec_unlink, ul_fsuid) == 4);
442 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4);
443 LASSERT(offsetof(struct mds_rec_unlink, ul_fsgid) == 8);
444 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4);
445 LASSERT(offsetof(struct mds_rec_unlink, ul_cap) == 12);
446 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4);
447 LASSERT(offsetof(struct mds_rec_unlink, ul_suppgid) == 16);
448 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4);
449 LASSERT(offsetof(struct mds_rec_unlink, ul_mode) == 20);
450 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4);
451 LASSERT(offsetof(struct mds_rec_unlink, ul_fid1) == 24);
452 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16);
453 LASSERT(offsetof(struct mds_rec_unlink, ul_fid2) == 40);
454 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16);
455 LASSERT(offsetof(struct mds_rec_unlink, ul_time) == 56);
456 LASSERT((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8);
458 /* Checks for struct mds_rec_rename */
459 LASSERT((int)sizeof(struct mds_rec_rename) == 64);
460 LASSERT(offsetof(struct mds_rec_rename, rn_opcode) == 0);
461 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4);
462 LASSERT(offsetof(struct mds_rec_rename, rn_fsuid) == 4);
463 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4);
464 LASSERT(offsetof(struct mds_rec_rename, rn_fsgid) == 8);
465 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4);
466 LASSERT(offsetof(struct mds_rec_rename, rn_cap) == 12);
467 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4);
468 LASSERT(offsetof(struct mds_rec_rename, rn_suppgid1) == 16);
469 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4);
470 LASSERT(offsetof(struct mds_rec_rename, rn_suppgid2) == 20);
471 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4);
472 LASSERT(offsetof(struct mds_rec_rename, rn_fid1) == 24);
473 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16);
474 LASSERT(offsetof(struct mds_rec_rename, rn_fid2) == 40);
475 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16);
476 LASSERT(offsetof(struct mds_rec_rename, rn_time) == 56);
477 LASSERT((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8);
479 /* Checks for struct lov_desc */
480 LASSERT((int)sizeof(struct lov_desc) == 72);
481 LASSERT(offsetof(struct lov_desc, ld_tgt_count) == 0);
482 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4);
483 LASSERT(offsetof(struct lov_desc, ld_active_tgt_count) == 4);
484 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4);
485 LASSERT(offsetof(struct lov_desc, ld_default_stripe_count) == 8);
486 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4);
487 LASSERT(offsetof(struct lov_desc, ld_pattern) == 12);
488 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4);
489 LASSERT(offsetof(struct lov_desc, ld_default_stripe_size) == 16);
490 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8);
491 LASSERT(offsetof(struct lov_desc, ld_default_stripe_offset) == 24);
492 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8);
493 LASSERT(offsetof(struct lov_desc, ld_uuid) == 32);
494 LASSERT((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40);
496 /* Checks for struct ldlm_res_id */
497 LASSERT((int)sizeof(struct ldlm_res_id) == 32);
498 LASSERT(offsetof(struct ldlm_res_id, name[4]) == 32);
499 LASSERT((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8);
501 /* Checks for struct ldlm_extent */
502 LASSERT((int)sizeof(struct ldlm_extent) == 16);
503 LASSERT(offsetof(struct ldlm_extent, start) == 0);
504 LASSERT((int)sizeof(((struct ldlm_extent *)0)->start) == 8);
505 LASSERT(offsetof(struct ldlm_extent, end) == 8);
506 LASSERT((int)sizeof(((struct ldlm_extent *)0)->end) == 8);
508 /* Checks for struct ldlm_flock */
509 LASSERT((int)sizeof(struct ldlm_flock) == 32);
510 LASSERT(offsetof(struct ldlm_flock, start) == 0);
511 LASSERT((int)sizeof(((struct ldlm_flock *)0)->start) == 8);
512 LASSERT(offsetof(struct ldlm_flock, end) == 8);
513 LASSERT((int)sizeof(((struct ldlm_flock *)0)->end) == 8);
514 LASSERT(offsetof(struct ldlm_flock, blocking_export) == 16);
515 LASSERT((int)sizeof(((struct ldlm_flock *)0)->blocking_export) == 8);
516 LASSERT(offsetof(struct ldlm_flock, blocking_pid) == 24);
517 LASSERT((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4);
518 LASSERT(offsetof(struct ldlm_flock, pid) == 28);
519 LASSERT((int)sizeof(((struct ldlm_flock *)0)->pid) == 4);
521 /* Checks for struct ldlm_intent */
522 LASSERT((int)sizeof(struct ldlm_intent) == 8);
523 LASSERT(offsetof(struct ldlm_intent, opc) == 0);
524 LASSERT((int)sizeof(((struct ldlm_intent *)0)->opc) == 8);
526 /* Checks for struct ldlm_resource_desc */
527 LASSERT((int)sizeof(struct ldlm_resource_desc) == 52);
528 LASSERT(offsetof(struct ldlm_resource_desc, lr_type) == 0);
529 LASSERT((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4);
530 LASSERT(offsetof(struct ldlm_resource_desc, lr_name) == 4);
531 LASSERT((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32);
532 LASSERT(offsetof(struct ldlm_resource_desc, lr_version[4]) == 52);
533 LASSERT((int)sizeof(((struct ldlm_resource_desc *)0)->lr_version[4]) == 4);
535 /* Checks for struct ldlm_lock_desc */
536 LASSERT((int)sizeof(struct ldlm_lock_desc) == 108);
537 LASSERT(offsetof(struct ldlm_lock_desc, l_resource) == 0);
538 LASSERT((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 52);
539 LASSERT(offsetof(struct ldlm_lock_desc, l_req_mode) == 52);
540 LASSERT((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4);
541 LASSERT(offsetof(struct ldlm_lock_desc, l_granted_mode) == 56);
542 LASSERT((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4);
543 LASSERT(offsetof(struct ldlm_lock_desc, l_policy_data) == 60);
544 LASSERT((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32);
545 LASSERT(offsetof(struct ldlm_lock_desc, l_version[4]) == 108);
546 LASSERT((int)sizeof(((struct ldlm_lock_desc *)0)->l_version[4]) == 4);
548 /* Checks for struct ldlm_request */
549 LASSERT((int)sizeof(struct ldlm_request) == 128);
550 LASSERT(offsetof(struct ldlm_request, lock_flags) == 0);
551 LASSERT((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4);
552 LASSERT(offsetof(struct ldlm_request, lock_desc) == 4);
553 LASSERT((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 108);
554 LASSERT(offsetof(struct ldlm_request, lock_handle1) == 112);
555 LASSERT((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8);
556 LASSERT(offsetof(struct ldlm_request, lock_handle2) == 120);
557 LASSERT((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8);
559 /* Checks for struct ldlm_reply */
560 LASSERT((int)sizeof(struct ldlm_reply) == 96);
561 LASSERT(offsetof(struct ldlm_reply, lock_flags) == 0);
562 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4);
563 LASSERT(offsetof(struct ldlm_reply, lock_mode) == 4);
564 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_mode) == 4);
565 LASSERT(offsetof(struct ldlm_reply, lock_resource_name) == 8);
566 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_resource_name) == 32);
567 LASSERT(offsetof(struct ldlm_reply, lock_handle) == 40);
568 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8);
569 LASSERT(offsetof(struct ldlm_reply, lock_policy_data) == 48);
570 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_policy_data) == 32);
571 LASSERT(offsetof(struct ldlm_reply, lock_policy_res1) == 80);
572 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8);
573 LASSERT(offsetof(struct ldlm_reply, lock_policy_res2) == 88);
574 LASSERT((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8);
576 /* Checks for struct ptlbd_op */
577 LASSERT((int)sizeof(struct ptlbd_op) == 12);
578 LASSERT(offsetof(struct ptlbd_op, op_cmd) == 0);
579 LASSERT((int)sizeof(((struct ptlbd_op *)0)->op_cmd) == 2);
580 LASSERT(offsetof(struct ptlbd_op, op_lun) == 2);
581 LASSERT((int)sizeof(((struct ptlbd_op *)0)->op_lun) == 2);
582 LASSERT(offsetof(struct ptlbd_op, op_niob_cnt) == 4);
583 LASSERT((int)sizeof(((struct ptlbd_op *)0)->op_niob_cnt) == 2);
584 LASSERT(offsetof(struct ptlbd_op, op__padding) == 6);
585 LASSERT((int)sizeof(((struct ptlbd_op *)0)->op__padding) == 2);
586 LASSERT(offsetof(struct ptlbd_op, op_block_cnt) == 8);
587 LASSERT((int)sizeof(((struct ptlbd_op *)0)->op_block_cnt) == 4);
589 /* Checks for struct ptlbd_niob */
590 LASSERT((int)sizeof(struct ptlbd_niob) == 24);
591 LASSERT(offsetof(struct ptlbd_niob, n_xid) == 0);
592 LASSERT((int)sizeof(((struct ptlbd_niob *)0)->n_xid) == 8);
593 LASSERT(offsetof(struct ptlbd_niob, n_block_nr) == 8);
594 LASSERT((int)sizeof(((struct ptlbd_niob *)0)->n_block_nr) == 8);
595 LASSERT(offsetof(struct ptlbd_niob, n_offset) == 16);
596 LASSERT((int)sizeof(((struct ptlbd_niob *)0)->n_offset) == 4);
597 LASSERT(offsetof(struct ptlbd_niob, n_length) == 20);
598 LASSERT((int)sizeof(((struct ptlbd_niob *)0)->n_length) == 4);
600 /* Checks for struct ptlbd_rsp */
601 LASSERT((int)sizeof(struct ptlbd_rsp) == 4);
602 LASSERT(offsetof(struct ptlbd_rsp, r_status) == 0);
603 LASSERT((int)sizeof(((struct ptlbd_rsp *)0)->r_status) == 2);
604 LASSERT(offsetof(struct ptlbd_rsp, r_error_cnt) == 2);
605 LASSERT((int)sizeof(((struct ptlbd_rsp *)0)->r_error_cnt) == 2);
607 /* Checks for struct llog_logid */
608 LASSERT((int)sizeof(struct llog_logid) == 20);
609 LASSERT(offsetof(struct llog_logid, lgl_oid) == 0);
610 LASSERT((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8);
611 LASSERT(offsetof(struct llog_logid, lgl_ogr) == 8);
612 LASSERT((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8);
613 LASSERT(offsetof(struct llog_logid, lgl_ogen) == 16);
614 LASSERT((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4);
615 LASSERT(OST_SZ_REC == 274730752);
616 LASSERT(OST_RAID1_REC == 274731008);
617 LASSERT(MDS_UNLINK_REC == 274801668);
618 LASSERT(OBD_CFG_REC == 274857984);
619 LASSERT(PTL_CFG_REC == 274923520);
620 LASSERT(LLOG_HDR_MAGIC == 275010873);
621 LASSERT(LLOG_LOGID_MAGIC == 275010874);
623 /* Checks for struct llog_rec_hdr */
624 LASSERT((int)sizeof(struct llog_rec_hdr) == 16);
625 LASSERT(offsetof(struct llog_rec_hdr, lrh_len) == 0);
626 LASSERT((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4);
627 LASSERT(offsetof(struct llog_rec_hdr, lrh_index) == 4);
628 LASSERT((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4);
629 LASSERT(offsetof(struct llog_rec_hdr, lrh_type) == 8);
630 LASSERT((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4);
632 /* Checks for struct llog_rec_tail */
633 LASSERT((int)sizeof(struct llog_rec_tail) == 8);
634 LASSERT(offsetof(struct llog_rec_tail, lrt_len) == 0);
635 LASSERT((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4);
636 LASSERT(offsetof(struct llog_rec_tail, lrt_index) == 4);
637 LASSERT((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4);
639 /* Checks for struct llog_log_hdr */
640 LASSERT((int)sizeof(struct llog_log_hdr) == 4096);
641 LASSERT(offsetof(struct llog_log_hdr, llh_hdr) == 0);
642 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16);
643 LASSERT(offsetof(struct llog_log_hdr, llh_timestamp) == 16);
644 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8);
645 LASSERT(offsetof(struct llog_log_hdr, llh_count) == 24);
646 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4);
647 LASSERT(offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28);
648 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4);
649 LASSERT(offsetof(struct llog_log_hdr, llh_size) == 32);
650 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4);
651 LASSERT(offsetof(struct llog_log_hdr, llh_flags) == 36);
652 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4);
653 LASSERT(offsetof(struct llog_log_hdr, llh_cat_idx) == 40);
654 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4);
655 LASSERT(offsetof(struct llog_log_hdr, llh_tgtuuid) == 44);
656 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40);
657 LASSERT(offsetof(struct llog_log_hdr, llh_reserved) == 84);
658 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4);
659 LASSERT(offsetof(struct llog_log_hdr, llh_bitmap) == 88);
660 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 4000);
661 LASSERT(offsetof(struct llog_log_hdr, llh_tail) == 4088);
662 LASSERT((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8);
664 /* Checks for struct llog_cookie */
665 LASSERT((int)sizeof(struct llog_cookie) == 32);
666 LASSERT(offsetof(struct llog_cookie, lgc_lgl) == 0);
667 LASSERT((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20);
668 LASSERT(offsetof(struct llog_cookie, lgc_subsys) == 20);
669 LASSERT((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4);
670 LASSERT(offsetof(struct llog_cookie, lgc_index) == 24);
671 LASSERT((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4);
673 /* Checks for struct llogd_body */
674 LASSERT((int)sizeof(struct llogd_body) == 48);
675 LASSERT(offsetof(struct llogd_body, lgd_logid) == 0);
676 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20);
677 LASSERT(offsetof(struct llogd_body, lgd_ctxt_idx) == 20);
678 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4);
679 LASSERT(offsetof(struct llogd_body, lgd_llh_flags) == 24);
680 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4);
681 LASSERT(offsetof(struct llogd_body, lgd_index) == 28);
682 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4);
683 LASSERT(offsetof(struct llogd_body, lgd_saved_index) == 32);
684 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4);
685 LASSERT(offsetof(struct llogd_body, lgd_len) == 36);
686 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4);
687 LASSERT(offsetof(struct llogd_body, lgd_cur_offset) == 40);
688 LASSERT((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8);
689 LASSERT(LLOG_ORIGIN_HANDLE_CREATE == 501);
690 LASSERT(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502);
691 LASSERT(LLOG_ORIGIN_HANDLE_READ_HEADER == 503);
692 LASSERT(LLOG_ORIGIN_HANDLE_WRITE_REC == 504);
693 LASSERT(LLOG_ORIGIN_HANDLE_CLOSE == 505);
695 /* Checks for struct llogd_conn_body */
696 LASSERT((int)sizeof(struct llogd_conn_body) == 40);
697 LASSERT(offsetof(struct llogd_conn_body, lgdc_gen) == 0);
698 LASSERT((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16);
699 LASSERT(offsetof(struct llogd_conn_body, lgdc_logid) == 16);
700 LASSERT((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20);
701 LASSERT(offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36);
702 LASSERT((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4);