1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2001-2003 Cluster File Systems, Inc.
5 * Author: Peter J. Braam <braam@clusterfs.com>
6 * Author: Phil Schwan <phil@clusterfs.com>
7 * Author: Eric Barton <eeb@clusterfs.com>
9 * This file is part of the Lustre file system, http://www.lustre.org
10 * Lustre is a trademark of Cluster File Systems, Inc.
12 * You may have signed or agreed to another license before downloading
13 * this software. If so, you are bound by the terms and conditions
14 * of that agreement, and the following does not apply to you. See the
15 * LICENSE file included with this distribution for more information.
17 * If you did not agree to a different license, then this copy of Lustre
18 * is open source software; you can redistribute it and/or modify it
19 * under the terms of version 2 of the GNU General Public License as
20 * published by the Free Software Foundation.
22 * In either case, Lustre is distributed in the hope that it will be
23 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
24 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * license text for more details.
27 * (Un)packing of OST requests
31 #define DEBUG_SUBSYSTEM S_RPC
33 # include <liblustre.h>
36 #include <linux/obd_support.h>
37 #include <linux/obd_class.h>
38 #include <linux/lustre_net.h>
41 #define HDR_SIZE(count) \
42 size_round(offsetof (struct lustre_msg, buflens[(count)]))
44 int lustre_msg_swabbed(struct lustre_msg *msg)
46 return (msg->magic == __swab32(PTLRPC_MSG_MAGIC));
49 int lustre_msg_check_version(struct lustre_msg *msg, __u32 version)
51 if (lustre_msg_swabbed(msg))
52 return (__swab32(msg->version) & LUSTRE_VERSION_MASK) != version;
54 return (msg->version & LUSTRE_VERSION_MASK) != version;
58 lustre_init_msg (struct lustre_msg *msg, int count, int *lens, char **bufs)
63 msg->magic = PTLRPC_MSG_MAGIC;
64 msg->version = PTLRPC_MSG_VERSION;
65 msg->bufcount = count;
66 for (i = 0; i < count; i++)
67 msg->buflens[i] = lens[i];
72 ptr = (char *)msg + HDR_SIZE(count);
73 for (i = 0; i < count; i++) {
75 LOGL(tmp, lens[i], ptr);
79 int lustre_pack_request (struct ptlrpc_request *req,
80 int count, int *lens, char **bufs)
85 reqlen = lustre_msg_size (count, lens);
86 /* See if we got it from prealloc pool */
88 /* Cannot return error here, that would create
89 infinite loop in ptlrpc_prep_req_pool */
90 /* In this case ptlrpc_prep_req_from_pool sets req->rq_reqlen
91 to maximum size that would fit into this preallocated
93 LASSERTF(req->rq_reqlen >= reqlen, "req->rq_reqlen %d, "
94 "reqlen %d\n",req->rq_reqlen,
96 memset(req->rq_reqmsg, 0, reqlen);
98 OBD_ALLOC(req->rq_reqmsg, reqlen);
99 if (req->rq_reqmsg == NULL)
102 req->rq_reqlen = reqlen;
104 lustre_init_msg (req->rq_reqmsg, count, lens, bufs);
109 LIST_HEAD(ptlrpc_rs_debug_lru);
110 spinlock_t ptlrpc_rs_debug_lock = SPIN_LOCK_UNLOCKED;
112 #define PTLRPC_RS_DEBUG_LRU_ADD(rs) \
114 unsigned long __flags; \
116 spin_lock_irqsave(&ptlrpc_rs_debug_lock, __flags); \
117 list_add_tail(&(rs)->rs_debug_list, &ptlrpc_rs_debug_lru); \
118 spin_unlock_irqrestore(&ptlrpc_rs_debug_lock, __flags); \
121 #define PTLRPC_RS_DEBUG_LRU_DEL(rs) \
123 unsigned long __flags; \
125 spin_lock_irqsave(&ptlrpc_rs_debug_lock, __flags); \
126 list_del(&(rs)->rs_debug_list); \
127 spin_unlock_irqrestore(&ptlrpc_rs_debug_lock, __flags); \
130 # define PTLRPC_RS_DEBUG_LRU_ADD(rs) do {} while(0)
131 # define PTLRPC_RS_DEBUG_LRU_DEL(rs) do {} while(0)
134 static struct ptlrpc_reply_state *lustre_get_emerg_rs(struct ptlrpc_service *svc,
138 struct ptlrpc_reply_state *rs = NULL;
140 spin_lock_irqsave(&svc->srv_lock, flags);
141 /* See if we have anything in a pool, and wait if nothing */
142 while (list_empty(&svc->srv_free_rs_list)) {
143 struct l_wait_info lwi;
145 spin_unlock_irqrestore(&svc->srv_lock, flags);
146 /* If we cannot get anything for some long time, we better
147 bail out instead of waiting infinitely */
148 lwi = LWI_TIMEOUT(10 * HZ, NULL, NULL);
149 rc = l_wait_event(svc->srv_free_rs_waitq,
150 !list_empty(&svc->srv_free_rs_list), &lwi);
153 spin_lock_irqsave(&svc->srv_lock, flags);
156 rs = list_entry(svc->srv_free_rs_list.next, struct ptlrpc_reply_state,
158 list_del(&rs->rs_list);
159 spin_unlock_irqrestore(&svc->srv_lock, flags);
161 LASSERTF(svc->srv_max_reply_size > size, "Want %d, prealloc %d\n", size,
162 svc->srv_max_reply_size);
170 int lustre_pack_reply (struct ptlrpc_request *req,
171 int count, int *lens, char **bufs)
173 struct ptlrpc_reply_state *rs;
178 LASSERT (req->rq_reply_state == NULL);
180 msg_len = lustre_msg_size (count, lens);
181 size = offsetof (struct ptlrpc_reply_state, rs_msg) + msg_len;
182 OBD_ALLOC (rs, size);
183 if (unlikely(rs == NULL)) {
184 rs = lustre_get_emerg_rs(req->rq_rqbd->rqbd_service, size);
188 atomic_set(&rs->rs_refcount, 1); /* 1 ref for rq_reply_state */
189 rs->rs_cb_id.cbid_fn = reply_out_callback;
190 rs->rs_cb_id.cbid_arg = rs;
191 rs->rs_service = req->rq_rqbd->rqbd_service;
193 INIT_LIST_HEAD(&rs->rs_exp_list);
194 INIT_LIST_HEAD(&rs->rs_obd_list);
196 req->rq_replen = msg_len;
197 req->rq_reply_state = rs;
198 req->rq_repmsg = &rs->rs_msg;
199 lustre_init_msg (&rs->rs_msg, count, lens, bufs);
201 PTLRPC_RS_DEBUG_LRU_ADD(rs);
207 * shrink @segment to size @newlen. if @move_data is non-zero, we also move
208 * data forward from @segment + 1.
210 * if @newlen == 0, we remove the segment completely, but we still keep the
211 * totally bufcount the same to save possible data moving. this will leave a
212 * unused segment with size 0 at the tail, but that's ok.
215 * + if any buffers higher than @segment has been filled in, must call shrink
216 * with non-zero @move_data.
217 * + caller should NOT keep pointers to msg buffers which higher than @segment
220 void lustre_shrink_reply(struct ptlrpc_request *req,
221 int segment, unsigned int newlen, int move_data)
223 struct lustre_msg *msg = req->rq_repmsg;
224 char *tail = NULL, *newpos;
227 LASSERT(req->rq_reply_state);
229 LASSERT(msg->bufcount > segment);
230 LASSERT(msg->buflens[segment] >= newlen);
232 if (msg->buflens[segment] == newlen)
235 if (move_data && msg->bufcount > segment + 1) {
236 tail = lustre_msg_buf(msg, segment + 1, 0);
237 for (n = segment + 1; n < msg->bufcount; n++)
238 tail_len += size_round(msg->buflens[n]);
241 msg->buflens[segment] = newlen;
243 if (tail && tail_len) {
244 newpos = lustre_msg_buf(msg, segment + 1, 0);
245 LASSERT(newpos <= tail);
247 memcpy(newpos, tail, tail_len);
250 if (newlen == 0 && msg->bufcount > segment + 1) {
251 memmove(&msg->buflens[segment], &msg->buflens[segment + 1],
252 (msg->bufcount - segment - 1) * sizeof(__u32));
253 msg->buflens[msg->bufcount - 1] = 0;
256 req->rq_replen = lustre_msg_size(msg->bufcount, msg->buflens);
259 void lustre_free_reply_state (struct ptlrpc_reply_state *rs)
261 PTLRPC_RS_DEBUG_LRU_DEL(rs);
263 LASSERT (atomic_read(&rs->rs_refcount) == 0);
264 LASSERT (!rs->rs_difficult || rs->rs_handled);
265 LASSERT (!rs->rs_on_net);
266 LASSERT (!rs->rs_scheduled);
267 LASSERT (rs->rs_export == NULL);
268 LASSERT (rs->rs_nlocks == 0);
269 LASSERT (list_empty(&rs->rs_exp_list));
270 LASSERT (list_empty(&rs->rs_obd_list));
272 if (unlikely(rs->rs_prealloc)) {
274 struct ptlrpc_service *svc = rs->rs_service;
276 spin_lock_irqsave(&svc->srv_lock, flags);
277 list_add(&rs->rs_list,
278 &svc->srv_free_rs_list);
279 spin_unlock_irqrestore(&svc->srv_lock, flags);
280 wake_up(&svc->srv_free_rs_waitq);
282 OBD_FREE(rs, rs->rs_size);
286 /* This returns the size of the buffer that is required to hold a lustre_msg
287 * with the given sub-buffer lengths. */
288 int lustre_msg_size(int count, int *lengths)
293 size = HDR_SIZE (count);
294 for (i = 0; i < count; i++)
295 size += size_round(lengths[i]);
300 int lustre_unpack_msg(struct lustre_msg *m, int len)
307 /* We can provide a slightly better error log, if we check the
308 * message magic and version first. In the future, struct
309 * lustre_msg may grow, and we'd like to log a version mismatch,
310 * rather than a short message.
313 required_len = MAX (offsetof (struct lustre_msg, version) +
315 offsetof (struct lustre_msg, magic) +
317 if (len < required_len) {
318 /* can't even look inside the message */
319 CERROR ("message length %d too small for magic/version check\n",
324 flipped = lustre_msg_swabbed(m);
326 __swab32s (&m->version);
327 else if (m->magic != PTLRPC_MSG_MAGIC) {
328 CERROR("wrong lustre_msg magic %#08x\n", m->magic);
332 if ((m->version & ~LUSTRE_VERSION_MASK) != PTLRPC_MSG_VERSION) {
333 CERROR("wrong lustre_msg version %#08x\n", m->version);
337 /* Now we know the sender speaks my language (but possibly flipped)...*/
338 required_len = HDR_SIZE(0);
339 if (len < required_len) {
340 /* can't even look inside the message */
341 CERROR ("message length %d too small for lustre_msg\n", len);
346 __swab32s (&m->type);
348 __swab64s (&m->last_xid);
349 __swab64s (&m->last_committed);
350 __swab64s (&m->transno);
351 __swab32s (&m->status);
352 __swab32s (&m->flags);
353 __swab32s (&m->conn_cnt);
354 __swab32s (&m->bufcount);
357 required_len = HDR_SIZE(m->bufcount);
359 if (len < required_len) {
360 /* didn't receive all the buffer lengths */
361 CERROR ("message length %d too small for %d buflens\n",
366 for (i = 0; i < m->bufcount; i++) {
368 __swab32s (&m->buflens[i]);
369 required_len += size_round(m->buflens[i]);
372 if (len < required_len) {
373 CERROR("len: %d, required_len %d\n", len, required_len);
374 CERROR("bufcount: %d\n", m->bufcount);
375 for (i = 0; i < m->bufcount; i++)
376 CERROR("buffer %d length %d\n", i, m->buflens[i]);
384 * lustre_msg_buflen - return the length of buffer @n in message @m
385 * @m - lustre_msg (request or reply) to look at
386 * @n - message index (base 0)
388 * returns zero for non-existent message indices
390 int lustre_msg_buflen(struct lustre_msg *m, int n)
392 if (n >= m->bufcount)
395 return m->buflens[n];
397 EXPORT_SYMBOL(lustre_msg_buflen);
399 void *lustre_msg_buf(struct lustre_msg *m, int n, int min_size)
409 bufcount = m->bufcount;
411 CDEBUG(D_INFO, "msg %p buffer[%d] not present (count %d)\n",
416 buflen = m->buflens[n];
417 if (buflen < min_size) {
418 CERROR("msg %p buffer[%d] size %d too small (required %d)\n",
419 m, n, buflen, min_size);
423 offset = HDR_SIZE(bufcount);
424 for (i = 0; i < n; i++)
425 offset += size_round(m->buflens[i]);
427 return (char *)m + offset;
430 char *lustre_msg_string (struct lustre_msg *m, int index, int max_len)
432 /* max_len == 0 means the string should fill the buffer */
433 char *str = lustre_msg_buf (m, index, 0);
438 CERROR ("can't unpack string in msg %p buffer[%d]\n", m, index);
442 blen = m->buflens[index];
443 slen = strnlen (str, blen);
445 if (slen == blen) { /* not NULL terminated */
446 CERROR ("can't unpack non-NULL terminated string in "
447 "msg %p buffer[%d] len %d\n", m, index, blen);
452 if (slen != blen - 1) {
453 CERROR ("can't unpack short string in msg %p "
454 "buffer[%d] len %d: strlen %d\n",
455 m, index, blen, slen);
458 } else if (slen > max_len) {
459 CERROR ("can't unpack oversized string in msg %p "
460 "buffer[%d] len %d strlen %d: max %d expected\n",
461 m, index, blen, slen, max_len);
468 /* Wrap up the normal fixed length cases */
469 void *lustre_swab_buf(struct lustre_msg *msg, int index, int min_size,
474 ptr = lustre_msg_buf(msg, index, min_size);
478 if (swabber != NULL && lustre_msg_swabbed(msg))
479 ((void (*)(void *))swabber)(ptr);
484 void *lustre_swab_reqbuf(struct ptlrpc_request *req, int index, int min_size,
487 LASSERT_REQSWAB(req, index);
488 return lustre_swab_buf(req->rq_reqmsg, index, min_size, swabber);
491 void *lustre_swab_repbuf(struct ptlrpc_request *req, int index, int min_size,
494 LASSERT_REPSWAB(req, index);
495 return lustre_swab_buf(req->rq_repmsg, index, min_size, swabber);
498 /* byte flipping routines for all wire types declared in
499 * lustre_idl.h implemented here.
502 void lustre_swab_connect(struct obd_connect_data *ocd)
504 __swab64s (&ocd->ocd_connect_flags);
505 __swab32s (&ocd->ocd_version);
506 __swab32s (&ocd->ocd_grant);
507 __swab32s (&ocd->ocd_index);
508 __swab32s (&ocd->ocd_unused);
509 __swab64s (&ocd->ocd_ibits_known);
510 CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
511 CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
512 CLASSERT(offsetof(typeof(*ocd), padding4) != 0);
513 CLASSERT(offsetof(typeof(*ocd), padding5) != 0);
514 CLASSERT(offsetof(typeof(*ocd), padding6) != 0);
517 void lustre_swab_obdo (struct obdo *o)
519 __swab64s (&o->o_valid);
520 __swab64s (&o->o_id);
521 __swab64s (&o->o_gr);
522 __swab64s (&o->o_fid);
523 __swab64s (&o->o_size);
524 __swab64s (&o->o_mtime);
525 __swab64s (&o->o_atime);
526 __swab64s (&o->o_ctime);
527 __swab64s (&o->o_blocks);
528 __swab64s (&o->o_grant);
529 __swab32s (&o->o_blksize);
530 __swab32s (&o->o_mode);
531 __swab32s (&o->o_uid);
532 __swab32s (&o->o_gid);
533 __swab32s (&o->o_flags);
534 __swab32s (&o->o_nlink);
535 __swab32s (&o->o_generation);
536 __swab32s (&o->o_misc);
537 __swab32s (&o->o_easize);
538 __swab32s (&o->o_mds);
539 __swab32s (&o->o_stripe_idx);
540 __swab32s (&o->o_padding_1);
541 /* o_inline is opaque */
544 void lustre_swab_obd_statfs (struct obd_statfs *os)
546 __swab64s (&os->os_type);
547 __swab64s (&os->os_blocks);
548 __swab64s (&os->os_bfree);
549 __swab64s (&os->os_bavail);
550 __swab64s (&os->os_files);
551 __swab64s (&os->os_ffree);
552 /* no need to swab os_fsid */
553 __swab32s (&os->os_bsize);
554 __swab32s (&os->os_namelen);
555 __swab64s (&os->os_maxbytes);
556 __swab32s (&os->os_state);
557 /* no need to swap os_spare */
560 void lustre_swab_obd_ioobj (struct obd_ioobj *ioo)
562 __swab64s (&ioo->ioo_id);
563 __swab64s (&ioo->ioo_gr);
564 __swab32s (&ioo->ioo_type);
565 __swab32s (&ioo->ioo_bufcnt);
568 void lustre_swab_niobuf_remote (struct niobuf_remote *nbr)
570 __swab64s (&nbr->offset);
571 __swab32s (&nbr->len);
572 __swab32s (&nbr->flags);
575 void lustre_swab_ost_body (struct ost_body *b)
577 lustre_swab_obdo (&b->oa);
580 void lustre_swab_ost_last_id(obd_id *id)
585 void lustre_swab_ost_lvb(struct ost_lvb *lvb)
587 __swab64s(&lvb->lvb_size);
588 __swab64s(&lvb->lvb_mtime);
589 __swab64s(&lvb->lvb_atime);
590 __swab64s(&lvb->lvb_ctime);
591 __swab64s(&lvb->lvb_blocks);
594 void lustre_swab_mds_status_req (struct mds_status_req *r)
596 __swab32s (&r->flags);
597 __swab32s (&r->repbuf);
600 void lustre_swab_mds_body (struct mds_body *b)
602 lustre_swab_ll_fid (&b->fid1);
603 lustre_swab_ll_fid (&b->fid2);
604 /* handle is opaque */
605 __swab64s (&b->valid);
606 __swab64s (&b->size);
607 __swab64s (&b->mtime);
608 __swab64s (&b->atime);
609 __swab64s (&b->ctime);
610 __swab64s (&b->blocks);
611 __swab64s (&b->io_epoch);
613 __swab32s (&b->fsuid);
614 __swab32s (&b->fsgid);
615 __swab32s (&b->capability);
616 __swab32s (&b->mode);
619 __swab32s (&b->flags);
620 __swab32s (&b->rdev);
621 __swab32s (&b->nlink);
622 __swab32s (&b->generation);
623 __swab32s (&b->suppgid);
624 __swab32s (&b->eadatasize);
625 __swab32s (&b->aclsize);
626 __swab32s (&b->max_mdsize);
627 __swab32s (&b->max_cookiesize);
628 __swab32s (&b->padding_4);
631 void lustre_swab_mgs_target_info(struct mgs_target_info *mti)
634 LASSERT(sizeof(lnet_nid_t) == sizeof(__u64));
635 for (i = 0; i < MTI_NIDS_MAX; i++) {
636 __swab64s(&mti->mti_nids[i]);
637 __swab64s(&mti->mti_failnids[i]);
639 __swab32s(&mti->mti_stripe_index);
640 __swab32s(&mti->mti_nid_count);
641 __swab32s(&mti->mti_failnid_count);
642 __swab32s(&mti->mti_config_ver);
643 __swab32s(&mti->mti_flags);
646 static void lustre_swab_obd_dqinfo (struct obd_dqinfo *i)
648 __swab64s (&i->dqi_bgrace);
649 __swab64s (&i->dqi_igrace);
650 __swab32s (&i->dqi_flags);
651 __swab32s (&i->dqi_valid);
654 static void lustre_swab_obd_dqblk (struct obd_dqblk *b)
656 __swab64s (&b->dqb_ihardlimit);
657 __swab64s (&b->dqb_isoftlimit);
658 __swab64s (&b->dqb_curinodes);
659 __swab64s (&b->dqb_bhardlimit);
660 __swab64s (&b->dqb_bsoftlimit);
661 __swab64s (&b->dqb_curspace);
662 __swab64s (&b->dqb_btime);
663 __swab64s (&b->dqb_itime);
664 __swab32s (&b->dqb_valid);
665 CLASSERT(offsetof(typeof(*b), padding) != 0);
668 void lustre_swab_obd_quotactl (struct obd_quotactl *q)
670 __swab32s (&q->qc_cmd);
671 __swab32s (&q->qc_type);
672 __swab32s (&q->qc_id);
673 __swab32s (&q->qc_stat);
674 lustre_swab_obd_dqinfo (&q->qc_dqinfo);
675 lustre_swab_obd_dqblk (&q->qc_dqblk);
678 void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa)
680 __swab32s (&sa->sa_opcode);
681 __swab32s (&sa->sa_fsuid);
682 __swab32s (&sa->sa_fsgid);
683 __swab32s (&sa->sa_cap);
684 __swab32s (&sa->sa_suppgid);
685 __swab32s (&sa->sa_mode);
686 lustre_swab_ll_fid (&sa->sa_fid);
687 __swab64s (&sa->sa_valid);
688 __swab64s (&sa->sa_size);
689 __swab64s (&sa->sa_mtime);
690 __swab64s (&sa->sa_atime);
691 __swab64s (&sa->sa_ctime);
692 __swab32s (&sa->sa_uid);
693 __swab32s (&sa->sa_gid);
694 __swab32s (&sa->sa_attr_flags);
695 CLASSERT(offsetof(typeof(*sa), sa_padding) != 0);
698 void lustre_swab_mds_rec_join (struct mds_rec_join *jr)
700 __swab64s(&jr->jr_headsize);
701 lustre_swab_ll_fid(&jr->jr_fid);
704 void lustre_swab_mds_rec_create (struct mds_rec_create *cr)
706 __swab32s (&cr->cr_opcode);
707 __swab32s (&cr->cr_fsuid);
708 __swab32s (&cr->cr_fsgid);
709 __swab32s (&cr->cr_cap);
710 __swab32s (&cr->cr_flags); /* for use with open */
711 __swab32s (&cr->cr_mode);
712 lustre_swab_ll_fid (&cr->cr_fid);
713 lustre_swab_ll_fid (&cr->cr_replayfid);
714 __swab64s (&cr->cr_time);
715 __swab64s (&cr->cr_rdev);
716 __swab32s (&cr->cr_suppgid);
717 CLASSERT(offsetof(typeof(*cr), cr_padding_1) != 0);
718 CLASSERT(offsetof(typeof(*cr), cr_padding_2) != 0);
719 CLASSERT(offsetof(typeof(*cr), cr_padding_3) != 0);
720 CLASSERT(offsetof(typeof(*cr), cr_padding_4) != 0);
721 CLASSERT(offsetof(typeof(*cr), cr_padding_5) != 0);
724 void lustre_swab_mds_rec_link (struct mds_rec_link *lk)
726 __swab32s (&lk->lk_opcode);
727 __swab32s (&lk->lk_fsuid);
728 __swab32s (&lk->lk_fsgid);
729 __swab32s (&lk->lk_cap);
730 __swab32s (&lk->lk_suppgid1);
731 __swab32s (&lk->lk_suppgid2);
732 lustre_swab_ll_fid (&lk->lk_fid1);
733 lustre_swab_ll_fid (&lk->lk_fid2);
734 __swab64s (&lk->lk_time);
735 CLASSERT(offsetof(typeof(*lk), lk_padding_1) != 0);
736 CLASSERT(offsetof(typeof(*lk), lk_padding_2) != 0);
737 CLASSERT(offsetof(typeof(*lk), lk_padding_3) != 0);
738 CLASSERT(offsetof(typeof(*lk), lk_padding_4) != 0);
741 void lustre_swab_mds_rec_unlink (struct mds_rec_unlink *ul)
743 __swab32s (&ul->ul_opcode);
744 __swab32s (&ul->ul_fsuid);
745 __swab32s (&ul->ul_fsgid);
746 __swab32s (&ul->ul_cap);
747 __swab32s (&ul->ul_suppgid);
748 __swab32s (&ul->ul_mode);
749 lustre_swab_ll_fid (&ul->ul_fid1);
750 lustre_swab_ll_fid (&ul->ul_fid2);
751 __swab64s (&ul->ul_time);
752 CLASSERT(offsetof(typeof(*ul), ul_padding_1) != 0);
753 CLASSERT(offsetof(typeof(*ul), ul_padding_2) != 0);
754 CLASSERT(offsetof(typeof(*ul), ul_padding_3) != 0);
755 CLASSERT(offsetof(typeof(*ul), ul_padding_4) != 0);
758 void lustre_swab_mds_rec_rename (struct mds_rec_rename *rn)
760 __swab32s (&rn->rn_opcode);
761 __swab32s (&rn->rn_fsuid);
762 __swab32s (&rn->rn_fsgid);
763 __swab32s (&rn->rn_cap);
764 __swab32s (&rn->rn_suppgid1);
765 __swab32s (&rn->rn_suppgid2);
766 lustre_swab_ll_fid (&rn->rn_fid1);
767 lustre_swab_ll_fid (&rn->rn_fid2);
768 __swab64s (&rn->rn_time);
769 CLASSERT(offsetof(typeof(*rn), rn_padding_1) != 0);
770 CLASSERT(offsetof(typeof(*rn), rn_padding_2) != 0);
771 CLASSERT(offsetof(typeof(*rn), rn_padding_3) != 0);
772 CLASSERT(offsetof(typeof(*rn), rn_padding_4) != 0);
775 void lustre_swab_lov_desc (struct lov_desc *ld)
777 __swab32s (&ld->ld_tgt_count);
778 __swab32s (&ld->ld_active_tgt_count);
779 __swab32s (&ld->ld_default_stripe_count);
780 __swab64s (&ld->ld_default_stripe_size);
781 __swab64s (&ld->ld_default_stripe_offset);
782 __swab32s (&ld->ld_pattern);
783 /* uuid endian insensitive */
786 static void print_lum (struct lov_user_md *lum)
788 CDEBUG(D_OTHER, "lov_user_md %p:\n", lum);
789 CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lum->lmm_magic);
790 CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lum->lmm_pattern);
791 CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lum->lmm_object_id);
792 CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lum->lmm_object_gr);
793 CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lum->lmm_stripe_size);
794 CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lum->lmm_stripe_count);
795 CDEBUG(D_OTHER, "\tlmm_stripe_offset: %#x\n", lum->lmm_stripe_offset);
798 void lustre_swab_lov_user_md(struct lov_user_md *lum)
801 CDEBUG(D_IOCTL, "swabbing lov_user_md\n");
802 __swab32s(&lum->lmm_magic);
803 __swab32s(&lum->lmm_pattern);
804 __swab64s(&lum->lmm_object_id);
805 __swab64s(&lum->lmm_object_gr);
806 __swab32s(&lum->lmm_stripe_size);
807 __swab16s(&lum->lmm_stripe_count);
808 __swab16s(&lum->lmm_stripe_offset);
813 static void print_lumj (struct lov_user_md_join *lumj)
815 CDEBUG(D_OTHER, "lov_user_md %p:\n", lumj);
816 CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lumj->lmm_magic);
817 CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lumj->lmm_pattern);
818 CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lumj->lmm_object_id);
819 CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lumj->lmm_object_gr);
820 CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lumj->lmm_stripe_size);
821 CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lumj->lmm_stripe_count);
822 CDEBUG(D_OTHER, "\tlmm_extent_count: %#x\n", lumj->lmm_extent_count);
825 void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj)
828 CDEBUG(D_IOCTL, "swabbing lov_user_md_join\n");
829 __swab32s(&lumj->lmm_magic);
830 __swab32s(&lumj->lmm_pattern);
831 __swab64s(&lumj->lmm_object_id);
832 __swab64s(&lumj->lmm_object_gr);
833 __swab32s(&lumj->lmm_stripe_size);
834 __swab32s(&lumj->lmm_stripe_count);
835 __swab32s(&lumj->lmm_extent_count);
840 static void print_lum_objs(struct lov_user_md *lum)
842 struct lov_user_ost_data *lod;
845 if (!(libcfs_debug & D_OTHER)) /* don't loop on nothing */
847 CDEBUG(D_OTHER, "lov_user_md_objects: %p\n", lum);
848 for (i = 0; i < lum->lmm_stripe_count; i++) {
849 lod = &lum->lmm_objects[i];
850 CDEBUG(D_OTHER, "(%i) lod->l_object_id: "LPX64"\n", i, lod->l_object_id);
851 CDEBUG(D_OTHER, "(%i) lod->l_object_gr: "LPX64"\n", i, lod->l_object_gr);
852 CDEBUG(D_OTHER, "(%i) lod->l_ost_gen: %#x\n", i, lod->l_ost_gen);
853 CDEBUG(D_OTHER, "(%i) lod->l_ost_idx: %#x\n", i, lod->l_ost_idx);
858 void lustre_swab_lov_user_md_objects(struct lov_user_md *lum)
860 struct lov_user_ost_data *lod;
863 for (i = 0; i < lum->lmm_stripe_count; i++) {
864 lod = &lum->lmm_objects[i];
865 __swab64s(&lod->l_object_id);
866 __swab64s(&lod->l_object_gr);
867 __swab32s(&lod->l_ost_gen);
868 __swab32s(&lod->l_ost_idx);
874 void lustre_swab_ldlm_res_id (struct ldlm_res_id *id)
878 for (i = 0; i < RES_NAME_SIZE; i++)
879 __swab64s (&id->name[i]);
882 void lustre_swab_ldlm_policy_data (ldlm_policy_data_t *d)
884 /* the lock data is a union and the first two fields are always an
885 * extent so it's ok to process an LDLM_EXTENT and LDLM_FLOCK lock
886 * data the same way. */
887 __swab64s(&d->l_extent.start);
888 __swab64s(&d->l_extent.end);
889 __swab64s(&d->l_extent.gid);
890 __swab32s(&d->l_flock.pid);
893 void lustre_swab_ldlm_intent (struct ldlm_intent *i)
898 void lustre_swab_ldlm_resource_desc (struct ldlm_resource_desc *r)
900 __swab32s (&r->lr_type);
901 CLASSERT(offsetof(typeof(*r), lr_padding) != 0);
902 lustre_swab_ldlm_res_id (&r->lr_name);
905 void lustre_swab_ldlm_lock_desc (struct ldlm_lock_desc *l)
907 lustre_swab_ldlm_resource_desc (&l->l_resource);
908 __swab32s (&l->l_req_mode);
909 __swab32s (&l->l_granted_mode);
910 lustre_swab_ldlm_policy_data (&l->l_policy_data);
913 void lustre_swab_ldlm_request (struct ldlm_request *rq)
915 __swab32s (&rq->lock_flags);
916 CLASSERT(offsetof(typeof(*rq), lock_padding) != 0);
917 lustre_swab_ldlm_lock_desc (&rq->lock_desc);
918 /* lock_handle1 opaque */
919 /* lock_handle2 opaque */
922 void lustre_swab_ldlm_reply (struct ldlm_reply *r)
924 __swab32s (&r->lock_flags);
925 CLASSERT(offsetof(typeof(*r), lock_padding) != 0);
926 lustre_swab_ldlm_lock_desc (&r->lock_desc);
927 /* lock_handle opaque */
928 __swab64s (&r->lock_policy_res1);
929 __swab64s (&r->lock_policy_res2);
932 /* no one calls this */
933 int llog_log_swabbed(struct llog_log_hdr *hdr)
935 if (hdr->llh_hdr.lrh_type == __swab32(LLOG_HDR_MAGIC))
937 if (hdr->llh_hdr.lrh_type == LLOG_HDR_MAGIC)
942 void lustre_swab_qdata(struct qunit_data *d)
944 __swab32s (&d->qd_id);
945 __swab32s (&d->qd_type);
946 __swab32s (&d->qd_count);
947 __swab32s (&d->qd_isblk);
950 void lustre_assert_wire_constants(void)
952 /* Wire protocol assertions generated by 'wirecheck'
953 * running on Linux schatzie.adilger.int 2.6.12-1.1381_FC3 #1 Fri Oct 21 03:46:55 EDT 2005 i6
954 * with gcc version 3.3.4 20040817 (Red Hat Linux 3.3.4-2) */
958 LASSERTF(PTLRPC_MSG_MAGIC == 0x0BD00BD0," found %lld\n",
959 (long long)PTLRPC_MSG_MAGIC);
960 LASSERTF(PTLRPC_MSG_VERSION == 0x00000003," found %lld\n",
961 (long long)PTLRPC_MSG_VERSION);
962 LASSERTF(PTL_RPC_MSG_REQUEST == 4711, " found %lld\n",
963 (long long)PTL_RPC_MSG_REQUEST);
964 LASSERTF(PTL_RPC_MSG_ERR == 4712, " found %lld\n",
965 (long long)PTL_RPC_MSG_ERR);
966 LASSERTF(PTL_RPC_MSG_REPLY == 4713, " found %lld\n",
967 (long long)PTL_RPC_MSG_REPLY);
968 LASSERTF(MSG_LAST_REPLAY == 1, " found %lld\n",
969 (long long)MSG_LAST_REPLAY);
970 LASSERTF(MSG_RESENT == 2, " found %lld\n",
971 (long long)MSG_RESENT);
972 LASSERTF(MSG_REPLAY == 4, " found %lld\n",
973 (long long)MSG_REPLAY);
974 LASSERTF(MSG_CONNECT_RECOVERING == 1, " found %lld\n",
975 (long long)MSG_CONNECT_RECOVERING);
976 LASSERTF(MSG_CONNECT_RECONNECT == 2, " found %lld\n",
977 (long long)MSG_CONNECT_RECONNECT);
978 LASSERTF(MSG_CONNECT_REPLAYABLE == 4, " found %lld\n",
979 (long long)MSG_CONNECT_REPLAYABLE);
980 LASSERTF(OST_REPLY == 0, " found %lld\n",
981 (long long)OST_REPLY);
982 LASSERTF(OST_GETATTR == 1, " found %lld\n",
983 (long long)OST_GETATTR);
984 LASSERTF(OST_SETATTR == 2, " found %lld\n",
985 (long long)OST_SETATTR);
986 LASSERTF(OST_READ == 3, " found %lld\n",
987 (long long)OST_READ);
988 LASSERTF(OST_WRITE == 4, " found %lld\n",
989 (long long)OST_WRITE);
990 LASSERTF(OST_CREATE == 5, " found %lld\n",
991 (long long)OST_CREATE);
992 LASSERTF(OST_DESTROY == 6, " found %lld\n",
993 (long long)OST_DESTROY);
994 LASSERTF(OST_GET_INFO == 7, " found %lld\n",
995 (long long)OST_GET_INFO);
996 LASSERTF(OST_CONNECT == 8, " found %lld\n",
997 (long long)OST_CONNECT);
998 LASSERTF(OST_DISCONNECT == 9, " found %lld\n",
999 (long long)OST_DISCONNECT);
1000 LASSERTF(OST_PUNCH == 10, " found %lld\n",
1001 (long long)OST_PUNCH);
1002 LASSERTF(OST_OPEN == 11, " found %lld\n",
1003 (long long)OST_OPEN);
1004 LASSERTF(OST_CLOSE == 12, " found %lld\n",
1005 (long long)OST_CLOSE);
1006 LASSERTF(OST_STATFS == 13, " found %lld\n",
1007 (long long)OST_STATFS);
1008 LASSERTF(OST_SAN_READ == 14, " found %lld\n",
1009 (long long)OST_SAN_READ);
1010 LASSERTF(OST_SAN_WRITE == 15, " found %lld\n",
1011 (long long)OST_SAN_WRITE);
1012 LASSERTF(OST_SYNC == 16, " found %lld\n",
1013 (long long)OST_SYNC);
1014 LASSERTF(OST_QUOTACHECK == 18, " found %lld\n",
1015 (long long)OST_QUOTACHECK);
1016 LASSERTF(OST_QUOTACTL == 19, " found %lld\n",
1017 (long long)OST_QUOTACTL);
1018 LASSERTF(OST_LAST_OPC == 20, " found %lld\n",
1019 (long long)OST_LAST_OPC);
1020 LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
1021 (long long)OBD_OBJECT_EOF);
1022 LASSERTF(MDS_GETATTR == 33, " found %lld\n",
1023 (long long)MDS_GETATTR);
1024 LASSERTF(MDS_GETATTR_NAME == 34, " found %lld\n",
1025 (long long)MDS_GETATTR_NAME);
1026 LASSERTF(MDS_CLOSE == 35, " found %lld\n",
1027 (long long)MDS_CLOSE);
1028 LASSERTF(MDS_REINT == 36, " found %lld\n",
1029 (long long)MDS_REINT);
1030 LASSERTF(MDS_READPAGE == 37, " found %lld\n",
1031 (long long)MDS_READPAGE);
1032 LASSERTF(MDS_CONNECT == 38, " found %lld\n",
1033 (long long)MDS_CONNECT);
1034 LASSERTF(MDS_DISCONNECT == 39, " found %lld\n",
1035 (long long)MDS_DISCONNECT);
1036 LASSERTF(MDS_GETSTATUS == 40, " found %lld\n",
1037 (long long)MDS_GETSTATUS);
1038 LASSERTF(MDS_STATFS == 41, " found %lld\n",
1039 (long long)MDS_STATFS);
1040 LASSERTF(MDS_PIN == 42, " found %lld\n",
1041 (long long)MDS_PIN);
1042 LASSERTF(MDS_UNPIN == 43, " found %lld\n",
1043 (long long)MDS_UNPIN);
1044 LASSERTF(MDS_SYNC == 44, " found %lld\n",
1045 (long long)MDS_SYNC);
1046 LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n",
1047 (long long)MDS_DONE_WRITING);
1048 LASSERTF(MDS_SET_INFO == 46, " found %lld\n",
1049 (long long)MDS_SET_INFO);
1050 LASSERTF(MDS_QUOTACHECK == 47, " found %lld\n",
1051 (long long)MDS_QUOTACHECK);
1052 LASSERTF(MDS_QUOTACTL == 48, " found %lld\n",
1053 (long long)MDS_QUOTACTL);
1054 LASSERTF(MDS_LAST_OPC == 51, " found %lld\n",
1055 (long long)MDS_LAST_OPC);
1056 LASSERTF(REINT_SETATTR == 1, " found %lld\n",
1057 (long long)REINT_SETATTR);
1058 LASSERTF(REINT_CREATE == 2, " found %lld\n",
1059 (long long)REINT_CREATE);
1060 LASSERTF(REINT_LINK == 3, " found %lld\n",
1061 (long long)REINT_LINK);
1062 LASSERTF(REINT_UNLINK == 4, " found %lld\n",
1063 (long long)REINT_UNLINK);
1064 LASSERTF(REINT_RENAME == 5, " found %lld\n",
1065 (long long)REINT_RENAME);
1066 LASSERTF(REINT_OPEN == 6, " found %lld\n",
1067 (long long)REINT_OPEN);
1068 LASSERTF(REINT_MAX == 7, " found %lld\n",
1069 (long long)REINT_MAX);
1070 LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
1071 (long long)DISP_IT_EXECD);
1072 LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
1073 (long long)DISP_LOOKUP_EXECD);
1074 LASSERTF(DISP_LOOKUP_NEG == 4, " found %lld\n",
1075 (long long)DISP_LOOKUP_NEG);
1076 LASSERTF(DISP_LOOKUP_POS == 8, " found %lld\n",
1077 (long long)DISP_LOOKUP_POS);
1078 LASSERTF(DISP_OPEN_CREATE == 16, " found %lld\n",
1079 (long long)DISP_OPEN_CREATE);
1080 LASSERTF(DISP_OPEN_OPEN == 32, " found %lld\n",
1081 (long long)DISP_OPEN_OPEN);
1082 LASSERTF(MDS_STATUS_CONN == 1, " found %lld\n",
1083 (long long)MDS_STATUS_CONN);
1084 LASSERTF(MDS_STATUS_LOV == 2, " found %lld\n",
1085 (long long)MDS_STATUS_LOV);
1086 LASSERTF(LDLM_ENQUEUE == 101, " found %lld\n",
1087 (long long)LDLM_ENQUEUE);
1088 LASSERTF(LDLM_CONVERT == 102, " found %lld\n",
1089 (long long)LDLM_CONVERT);
1090 LASSERTF(LDLM_CANCEL == 103, " found %lld\n",
1091 (long long)LDLM_CANCEL);
1092 LASSERTF(LDLM_BL_CALLBACK == 104, " found %lld\n",
1093 (long long)LDLM_BL_CALLBACK);
1094 LASSERTF(LDLM_CP_CALLBACK == 105, " found %lld\n",
1095 (long long)LDLM_CP_CALLBACK);
1096 LASSERTF(LDLM_GL_CALLBACK == 106, " found %lld\n",
1097 (long long)LDLM_GL_CALLBACK);
1098 LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
1099 (long long)LDLM_LAST_OPC);
1100 LASSERTF(LCK_EX == 1, " found %lld\n",
1102 LASSERTF(LCK_PW == 2, " found %lld\n",
1104 LASSERTF(LCK_PR == 4, " found %lld\n",
1106 LASSERTF(LCK_CW == 8, " found %lld\n",
1108 LASSERTF(LCK_CR == 16, " found %lld\n",
1110 LASSERTF(LCK_NL == 32, " found %lld\n",
1112 LASSERTF(LCK_GROUP == 64, " found %lld\n",
1113 (long long)LCK_GROUP);
1114 LASSERTF(LCK_MAXMODE == 65, " found %lld\n",
1115 (long long)LCK_MAXMODE);
1116 LASSERTF(MGS_CONNECT == 250, " found %lld\n",
1117 (long long)MGS_CONNECT);
1118 LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",
1119 (long long)MGS_DISCONNECT);
1120 LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",
1121 (long long)MGS_EXCEPTION);
1122 LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",
1123 (long long)MGS_TARGET_REG);
1124 LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
1125 (long long)MGS_TARGET_DEL);
1126 LASSERTF(OBD_PING == 400, " found %lld\n",
1127 (long long)OBD_PING);
1128 LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",
1129 (long long)OBD_LOG_CANCEL);
1130 LASSERTF(OBD_QC_CALLBACK == 402, " found %lld\n",
1131 (long long)OBD_QC_CALLBACK);
1132 LASSERTF(OBD_LAST_OPC == 403, " found %lld\n",
1133 (long long)OBD_LAST_OPC);
1134 LASSERTF(QUOTA_DQACQ == 601, " found %lld\n",
1135 (long long)QUOTA_DQACQ);
1136 LASSERTF(QUOTA_DQREL == 602, " found %lld\n",
1137 (long long)QUOTA_DQREL);
1138 LASSERTF(OBD_CONNECT_RDONLY == 1, " found %lld\n",
1139 (long long)OBD_CONNECT_RDONLY);
1140 LASSERTF(OBD_CONNECT_INDEX == 2, " found %lld\n",
1141 (long long)OBD_CONNECT_INDEX);
1142 LASSERTF(OBD_CONNECT_GRANT == 8, " found %lld\n",
1143 (long long)OBD_CONNECT_GRANT);
1144 LASSERTF(OBD_CONNECT_SRVLOCK == 16, " found %lld\n",
1145 (long long)OBD_CONNECT_SRVLOCK);
1146 LASSERTF(OBD_CONNECT_VERSION == 32, " found %lld\n",
1147 (long long)OBD_CONNECT_VERSION);
1148 LASSERTF(OBD_CONNECT_REQPORTAL == 64, " found %lld\n",
1149 (long long)OBD_CONNECT_REQPORTAL);
1150 LASSERTF(OBD_CONNECT_ACL == 128, " found %lld\n",
1151 (long long)OBD_CONNECT_ACL);
1152 LASSERTF(OBD_CONNECT_XATTR == 256, " found %lld\n",
1153 (long long)OBD_CONNECT_XATTR);
1154 LASSERTF(OBD_CONNECT_CROW == 512, " found %lld\n",
1155 (long long)OBD_CONNECT_CROW);
1156 LASSERTF(OBD_CONNECT_TRUNCLOCK == 1024, " found %lld\n",
1157 (long long)OBD_CONNECT_TRUNCLOCK);
1158 LASSERTF(OBD_CONNECT_TRANSNO == 2048, " found %lld\n",
1159 (long long)OBD_CONNECT_TRANSNO);
1160 /* Sizes and Offsets */
1163 /* Checks for struct lustre_handle */
1164 LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",
1165 (long long)(int)sizeof(struct lustre_handle));
1166 LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
1167 (long long)(int)offsetof(struct lustre_handle, cookie));
1168 LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",
1169 (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
1171 /* Checks for struct lustre_msg */
1172 LASSERTF((int)sizeof(struct lustre_msg) == 64, " found %lld\n",
1173 (long long)(int)sizeof(struct lustre_msg));
1174 LASSERTF((int)offsetof(struct lustre_msg, handle) == 0, " found %lld\n",
1175 (long long)(int)offsetof(struct lustre_msg, handle));
1176 LASSERTF((int)sizeof(((struct lustre_msg *)0)->handle) == 8, " found %lld\n",
1177 (long long)(int)sizeof(((struct lustre_msg *)0)->handle));
1178 LASSERTF((int)offsetof(struct lustre_msg, magic) == 8, " found %lld\n",
1179 (long long)(int)offsetof(struct lustre_msg, magic));
1180 LASSERTF((int)sizeof(((struct lustre_msg *)0)->magic) == 4, " found %lld\n",
1181 (long long)(int)sizeof(((struct lustre_msg *)0)->magic));
1182 LASSERTF((int)offsetof(struct lustre_msg, type) == 12, " found %lld\n",
1183 (long long)(int)offsetof(struct lustre_msg, type));
1184 LASSERTF((int)sizeof(((struct lustre_msg *)0)->type) == 4, " found %lld\n",
1185 (long long)(int)sizeof(((struct lustre_msg *)0)->type));
1186 LASSERTF((int)offsetof(struct lustre_msg, version) == 16, " found %lld\n",
1187 (long long)(int)offsetof(struct lustre_msg, version));
1188 LASSERTF((int)sizeof(((struct lustre_msg *)0)->version) == 4, " found %lld\n",
1189 (long long)(int)sizeof(((struct lustre_msg *)0)->version));
1190 LASSERTF((int)offsetof(struct lustre_msg, opc) == 20, " found %lld\n",
1191 (long long)(int)offsetof(struct lustre_msg, opc));
1192 LASSERTF((int)sizeof(((struct lustre_msg *)0)->opc) == 4, " found %lld\n",
1193 (long long)(int)sizeof(((struct lustre_msg *)0)->opc));
1194 LASSERTF((int)offsetof(struct lustre_msg, last_xid) == 24, " found %lld\n",
1195 (long long)(int)offsetof(struct lustre_msg, last_xid));
1196 LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_xid) == 8, " found %lld\n",
1197 (long long)(int)sizeof(((struct lustre_msg *)0)->last_xid));
1198 LASSERTF((int)offsetof(struct lustre_msg, last_committed) == 32, " found %lld\n",
1199 (long long)(int)offsetof(struct lustre_msg, last_committed));
1200 LASSERTF((int)sizeof(((struct lustre_msg *)0)->last_committed) == 8, " found %lld\n",
1201 (long long)(int)sizeof(((struct lustre_msg *)0)->last_committed));
1202 LASSERTF((int)offsetof(struct lustre_msg, transno) == 40, " found %lld\n",
1203 (long long)(int)offsetof(struct lustre_msg, transno));
1204 LASSERTF((int)sizeof(((struct lustre_msg *)0)->transno) == 8, " found %lld\n",
1205 (long long)(int)sizeof(((struct lustre_msg *)0)->transno));
1206 LASSERTF((int)offsetof(struct lustre_msg, status) == 48, " found %lld\n",
1207 (long long)(int)offsetof(struct lustre_msg, status));
1208 LASSERTF((int)sizeof(((struct lustre_msg *)0)->status) == 4, " found %lld\n",
1209 (long long)(int)sizeof(((struct lustre_msg *)0)->status));
1210 LASSERTF((int)offsetof(struct lustre_msg, flags) == 52, " found %lld\n",
1211 (long long)(int)offsetof(struct lustre_msg, flags));
1212 LASSERTF((int)sizeof(((struct lustre_msg *)0)->flags) == 4, " found %lld\n",
1213 (long long)(int)sizeof(((struct lustre_msg *)0)->flags));
1214 LASSERTF((int)offsetof(struct lustre_msg, bufcount) == 60, " found %lld\n",
1215 (long long)(int)offsetof(struct lustre_msg, bufcount));
1216 LASSERTF((int)sizeof(((struct lustre_msg *)0)->bufcount) == 4, " found %lld\n",
1217 (long long)(int)sizeof(((struct lustre_msg *)0)->bufcount));
1218 LASSERTF((int)offsetof(struct lustre_msg, buflens[7]) == 92, " found %lld\n",
1219 (long long)(int)offsetof(struct lustre_msg, buflens[7]));
1220 LASSERTF((int)sizeof(((struct lustre_msg *)0)->buflens[7]) == 4, " found %lld\n",
1221 (long long)(int)sizeof(((struct lustre_msg *)0)->buflens[7]));
1223 /* Checks for struct obdo */
1224 LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
1225 (long long)(int)sizeof(struct obdo));
1226 LASSERTF((int)offsetof(struct obdo, o_valid) == 0, " found %lld\n",
1227 (long long)(int)offsetof(struct obdo, o_valid));
1228 LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, " found %lld\n",
1229 (long long)(int)sizeof(((struct obdo *)0)->o_valid));
1230 LASSERTF((int)offsetof(struct obdo, o_id) == 8, " found %lld\n",
1231 (long long)(int)offsetof(struct obdo, o_id));
1232 LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
1233 (long long)(int)sizeof(((struct obdo *)0)->o_id));
1234 LASSERTF((int)offsetof(struct obdo, o_gr) == 16, " found %lld\n",
1235 (long long)(int)offsetof(struct obdo, o_gr));
1236 LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n",
1237 (long long)(int)sizeof(((struct obdo *)0)->o_gr));
1238 LASSERTF((int)offsetof(struct obdo, o_fid) == 24, " found %lld\n",
1239 (long long)(int)offsetof(struct obdo, o_fid));
1240 LASSERTF((int)sizeof(((struct obdo *)0)->o_fid) == 8, " found %lld\n",
1241 (long long)(int)sizeof(((struct obdo *)0)->o_fid));
1242 LASSERTF((int)offsetof(struct obdo, o_size) == 32, " found %lld\n",
1243 (long long)(int)offsetof(struct obdo, o_size));
1244 LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n",
1245 (long long)(int)sizeof(((struct obdo *)0)->o_size));
1246 LASSERTF((int)offsetof(struct obdo, o_mtime) == 40, " found %lld\n",
1247 (long long)(int)offsetof(struct obdo, o_mtime));
1248 LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n",
1249 (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
1250 LASSERTF((int)offsetof(struct obdo, o_atime) == 48, " found %lld\n",
1251 (long long)(int)offsetof(struct obdo, o_atime));
1252 LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n",
1253 (long long)(int)sizeof(((struct obdo *)0)->o_atime));
1254 LASSERTF((int)offsetof(struct obdo, o_ctime) == 56, " found %lld\n",
1255 (long long)(int)offsetof(struct obdo, o_ctime));
1256 LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n",
1257 (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
1258 LASSERTF((int)offsetof(struct obdo, o_blocks) == 64, " found %lld\n",
1259 (long long)(int)offsetof(struct obdo, o_blocks));
1260 LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n",
1261 (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
1262 LASSERTF((int)offsetof(struct obdo, o_grant) == 72, " found %lld\n",
1263 (long long)(int)offsetof(struct obdo, o_grant));
1264 LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n",
1265 (long long)(int)sizeof(((struct obdo *)0)->o_grant));
1266 LASSERTF((int)offsetof(struct obdo, o_blksize) == 80, " found %lld\n",
1267 (long long)(int)offsetof(struct obdo, o_blksize));
1268 LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n",
1269 (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
1270 LASSERTF((int)offsetof(struct obdo, o_mode) == 84, " found %lld\n",
1271 (long long)(int)offsetof(struct obdo, o_mode));
1272 LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n",
1273 (long long)(int)sizeof(((struct obdo *)0)->o_mode));
1274 LASSERTF((int)offsetof(struct obdo, o_uid) == 88, " found %lld\n",
1275 (long long)(int)offsetof(struct obdo, o_uid));
1276 LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n",
1277 (long long)(int)sizeof(((struct obdo *)0)->o_uid));
1278 LASSERTF((int)offsetof(struct obdo, o_gid) == 92, " found %lld\n",
1279 (long long)(int)offsetof(struct obdo, o_gid));
1280 LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n",
1281 (long long)(int)sizeof(((struct obdo *)0)->o_gid));
1282 LASSERTF((int)offsetof(struct obdo, o_flags) == 96, " found %lld\n",
1283 (long long)(int)offsetof(struct obdo, o_flags));
1284 LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n",
1285 (long long)(int)sizeof(((struct obdo *)0)->o_flags));
1286 LASSERTF((int)offsetof(struct obdo, o_nlink) == 100, " found %lld\n",
1287 (long long)(int)offsetof(struct obdo, o_nlink));
1288 LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n",
1289 (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
1290 LASSERTF((int)offsetof(struct obdo, o_generation) == 104, " found %lld\n",
1291 (long long)(int)offsetof(struct obdo, o_generation));
1292 LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n",
1293 (long long)(int)sizeof(((struct obdo *)0)->o_generation));
1294 LASSERTF((int)offsetof(struct obdo, o_misc) == 108, " found %lld\n",
1295 (long long)(int)offsetof(struct obdo, o_misc));
1296 LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n",
1297 (long long)(int)sizeof(((struct obdo *)0)->o_misc));
1298 LASSERTF((int)offsetof(struct obdo, o_easize) == 112, " found %lld\n",
1299 (long long)(int)offsetof(struct obdo, o_easize));
1300 LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n",
1301 (long long)(int)sizeof(((struct obdo *)0)->o_easize));
1302 LASSERTF((int)offsetof(struct obdo, o_mds) == 116, " found %lld\n",
1303 (long long)(int)offsetof(struct obdo, o_mds));
1304 LASSERTF((int)sizeof(((struct obdo *)0)->o_mds) == 4, " found %lld\n",
1305 (long long)(int)sizeof(((struct obdo *)0)->o_mds));
1306 LASSERTF((int)offsetof(struct obdo, o_padding_1) == 124, " found %lld\n",
1307 (long long)(int)offsetof(struct obdo, o_padding_1));
1308 LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n",
1309 (long long)(int)sizeof(((struct obdo *)0)->o_padding_1));
1310 LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
1311 (long long)(int)offsetof(struct obdo, o_inline));
1312 LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
1313 (long long)(int)sizeof(((struct obdo *)0)->o_inline));
1314 LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
1315 (long long)OBD_INLINESZ);
1316 LASSERTF(OBD_MD_FLID == 1, " found %lld\n",
1317 (long long)OBD_MD_FLID);
1318 LASSERTF(OBD_MD_FLATIME == 2, " found %lld\n",
1319 (long long)OBD_MD_FLATIME);
1320 LASSERTF(OBD_MD_FLMTIME == 4, " found %lld\n",
1321 (long long)OBD_MD_FLMTIME);
1322 LASSERTF(OBD_MD_FLCTIME == 8, " found %lld\n",
1323 (long long)OBD_MD_FLCTIME);
1324 LASSERTF(OBD_MD_FLSIZE == 16, " found %lld\n",
1325 (long long)OBD_MD_FLSIZE);
1326 LASSERTF(OBD_MD_FLBLOCKS == 32, " found %lld\n",
1327 (long long)OBD_MD_FLBLOCKS);
1328 LASSERTF(OBD_MD_FLBLKSZ == 64, " found %lld\n",
1329 (long long)OBD_MD_FLBLKSZ);
1330 LASSERTF(OBD_MD_FLMODE == 128, " found %lld\n",
1331 (long long)OBD_MD_FLMODE);
1332 LASSERTF(OBD_MD_FLTYPE == 256, " found %lld\n",
1333 (long long)OBD_MD_FLTYPE);
1334 LASSERTF(OBD_MD_FLUID == 512, " found %lld\n",
1335 (long long)OBD_MD_FLUID);
1336 LASSERTF(OBD_MD_FLGID == 1024, " found %lld\n",
1337 (long long)OBD_MD_FLGID);
1338 LASSERTF(OBD_MD_FLFLAGS == 2048, " found %lld\n",
1339 (long long)OBD_MD_FLFLAGS);
1340 LASSERTF(OBD_MD_FLNLINK == 8192, " found %lld\n",
1341 (long long)OBD_MD_FLNLINK);
1342 LASSERTF(OBD_MD_FLGENER == 16384, " found %lld\n",
1343 (long long)OBD_MD_FLGENER);
1344 LASSERTF(OBD_MD_FLINLINE == 32768, " found %lld\n",
1345 (long long)OBD_MD_FLINLINE);
1346 LASSERTF(OBD_MD_FLRDEV == 65536, " found %lld\n",
1347 (long long)OBD_MD_FLRDEV);
1348 LASSERTF(OBD_MD_FLEASIZE == 131072, " found %lld\n",
1349 (long long)OBD_MD_FLEASIZE);
1350 LASSERTF(OBD_MD_LINKNAME == 262144, " found %lld\n",
1351 (long long)OBD_MD_LINKNAME);
1352 LASSERTF(OBD_MD_FLHANDLE == 524288, " found %lld\n",
1353 (long long)OBD_MD_FLHANDLE);
1354 LASSERTF(OBD_MD_FLCKSUM == 1048576, " found %lld\n",
1355 (long long)OBD_MD_FLCKSUM);
1356 LASSERTF(OBD_MD_FLQOS == 2097152, " found %lld\n",
1357 (long long)OBD_MD_FLQOS);
1358 LASSERTF(OBD_MD_FLCOOKIE == 8388608, " found %lld\n",
1359 (long long)OBD_MD_FLCOOKIE);
1360 LASSERTF(OBD_MD_FLGROUP == 16777216, " found %lld\n",
1361 (long long)OBD_MD_FLGROUP);
1362 LASSERTF(OBD_MD_FLFID == 33554432, " found %lld\n",
1363 (long long)OBD_MD_FLFID);
1364 LASSERTF(OBD_MD_FLEPOCH == 67108864, " found %lld\n",
1365 (long long)OBD_MD_FLEPOCH);
1366 LASSERTF(OBD_MD_FLGRANT == 134217728, " found %lld\n",
1367 (long long)OBD_MD_FLGRANT);
1368 LASSERTF(OBD_MD_FLDIREA == 268435456, " found %lld\n",
1369 (long long)OBD_MD_FLDIREA);
1370 LASSERTF(OBD_MD_FLUSRQUOTA == 536870912, " found %lld\n",
1371 (long long)OBD_MD_FLUSRQUOTA);
1372 LASSERTF(OBD_MD_FLGRPQUOTA == 1073741824, " found %lld\n",
1373 (long long)OBD_MD_FLGRPQUOTA);
1374 LASSERTF(OBD_MD_MDS == 4294967296ULL, " found %lld\n",
1375 (long long)OBD_MD_MDS);
1376 LASSERTF(OBD_MD_REINT == 8589934592ULL, " found %lld\n",
1377 (long long)OBD_MD_REINT);
1378 LASSERTF(OBD_FL_INLINEDATA == 1, " found %lld\n",
1379 (long long)OBD_FL_INLINEDATA);
1380 LASSERTF(OBD_FL_OBDMDEXISTS == 2, " found %lld\n",
1381 (long long)OBD_FL_OBDMDEXISTS);
1382 LASSERTF(OBD_FL_DELORPHAN == 4, " found %lld\n",
1383 (long long)OBD_FL_DELORPHAN);
1384 LASSERTF(OBD_FL_NORPC == 8, " found %lld\n",
1385 (long long)OBD_FL_NORPC);
1386 LASSERTF(OBD_FL_IDONLY == 16, " found %lld\n",
1387 (long long)OBD_FL_IDONLY);
1388 LASSERTF(OBD_FL_RECREATE_OBJS == 32, " found %lld\n",
1389 (long long)OBD_FL_RECREATE_OBJS);
1390 LASSERTF(OBD_FL_DEBUG_CHECK == 64, " found %lld\n",
1391 (long long)OBD_FL_DEBUG_CHECK);
1392 LASSERTF(OBD_FL_NO_USRQUOTA == 256, " found %lld\n",
1393 (long long)OBD_FL_NO_USRQUOTA);
1394 LASSERTF(OBD_FL_NO_GRPQUOTA == 512, " found %lld\n",
1395 (long long)OBD_FL_NO_GRPQUOTA);
1397 /* Checks for struct lov_mds_md_v1 */
1398 LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
1399 (long long)(int)sizeof(struct lov_mds_md_v1));
1400 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
1401 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
1402 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
1403 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
1404 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
1405 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
1406 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
1407 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
1408 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
1409 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
1410 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
1411 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
1412 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
1413 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr));
1414 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
1415 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
1416 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
1417 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
1418 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
1419 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
1420 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
1421 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
1422 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
1423 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
1424 LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
1425 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects));
1426 LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
1427 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
1429 /* Checks for struct lov_ost_data_v1 */
1430 LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
1431 (long long)(int)sizeof(struct lov_ost_data_v1));
1432 LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
1433 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
1434 LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
1435 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
1436 LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
1437 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr));
1438 LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
1439 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
1440 LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
1441 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
1442 LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
1443 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
1444 LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
1445 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
1446 LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
1447 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
1448 LASSERTF(LOV_MAGIC_V1 == 198249424, " found %lld\n",
1449 (long long)LOV_MAGIC_V1);
1450 LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
1451 (long long)LOV_PATTERN_RAID0);
1452 LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
1453 (long long)LOV_PATTERN_RAID1);
1455 /* Checks for struct obd_statfs */
1456 LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
1457 (long long)(int)sizeof(struct obd_statfs));
1458 LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
1459 (long long)(int)offsetof(struct obd_statfs, os_type));
1460 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
1461 (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
1462 LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
1463 (long long)(int)offsetof(struct obd_statfs, os_blocks));
1464 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
1465 (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
1466 LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
1467 (long long)(int)offsetof(struct obd_statfs, os_bfree));
1468 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
1469 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
1470 LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
1471 (long long)(int)offsetof(struct obd_statfs, os_bavail));
1472 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
1473 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
1474 LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
1475 (long long)(int)offsetof(struct obd_statfs, os_ffree));
1476 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
1477 (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
1478 LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
1479 (long long)(int)offsetof(struct obd_statfs, os_fsid));
1480 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
1481 (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
1482 LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
1483 (long long)(int)offsetof(struct obd_statfs, os_bsize));
1484 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
1485 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
1486 LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
1487 (long long)(int)offsetof(struct obd_statfs, os_namelen));
1488 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
1489 (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
1490 LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, " found %lld\n",
1491 (long long)(int)offsetof(struct obd_statfs, os_state));
1492 LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, " found %lld\n",
1493 (long long)(int)sizeof(((struct obd_statfs *)0)->os_state));
1495 /* Checks for struct obd_ioobj */
1496 LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
1497 (long long)(int)sizeof(struct obd_ioobj));
1498 LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
1499 (long long)(int)offsetof(struct obd_ioobj, ioo_id));
1500 LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
1501 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
1502 LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
1503 (long long)(int)offsetof(struct obd_ioobj, ioo_gr));
1504 LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
1505 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
1506 LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
1507 (long long)(int)offsetof(struct obd_ioobj, ioo_type));
1508 LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
1509 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
1510 LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
1511 (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
1512 LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
1513 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
1515 /* Checks for struct obd_quotactl */
1516 LASSERTF((int)sizeof(struct obd_quotactl) == 112, " found %lld\n",
1517 (long long)(int)sizeof(struct obd_quotactl));
1518 LASSERTF((int)offsetof(struct obd_quotactl, qc_cmd) == 0, " found %lld\n",
1519 (long long)(int)offsetof(struct obd_quotactl, qc_cmd));
1520 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_cmd) == 4, " found %lld\n",
1521 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_cmd));
1522 LASSERTF((int)offsetof(struct obd_quotactl, qc_type) == 4, " found %lld\n",
1523 (long long)(int)offsetof(struct obd_quotactl, qc_type));
1524 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_type) == 4, " found %lld\n",
1525 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_type));
1526 LASSERTF((int)offsetof(struct obd_quotactl, qc_id) == 8, " found %lld\n",
1527 (long long)(int)offsetof(struct obd_quotactl, qc_id));
1528 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_id) == 4, " found %lld\n",
1529 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_id));
1530 LASSERTF((int)offsetof(struct obd_quotactl, qc_stat) == 12, " found %lld\n",
1531 (long long)(int)offsetof(struct obd_quotactl, qc_stat));
1532 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_stat) == 4, " found %lld\n",
1533 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_stat));
1534 LASSERTF((int)offsetof(struct obd_quotactl, qc_dqinfo) == 16, " found %lld\n",
1535 (long long)(int)offsetof(struct obd_quotactl, qc_dqinfo));
1536 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo) == 24, " found %lld\n",
1537 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo));
1538 LASSERTF((int)offsetof(struct obd_quotactl, qc_dqblk) == 40, " found %lld\n",
1539 (long long)(int)offsetof(struct obd_quotactl, qc_dqblk));
1540 LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqblk) == 72, " found %lld\n",
1541 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqblk));
1543 /* Checks for struct obd_dqinfo */
1544 LASSERTF((int)sizeof(struct obd_dqinfo) == 24, " found %lld\n",
1545 (long long)(int)sizeof(struct obd_dqinfo));
1546 LASSERTF((int)offsetof(struct obd_dqinfo, dqi_bgrace) == 0, " found %lld\n",
1547 (long long)(int)offsetof(struct obd_dqinfo, dqi_bgrace));
1548 LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace) == 8, " found %lld\n",
1549 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace));
1550 LASSERTF((int)offsetof(struct obd_dqinfo, dqi_igrace) == 8, " found %lld\n",
1551 (long long)(int)offsetof(struct obd_dqinfo, dqi_igrace));
1552 LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace) == 8, " found %lld\n",
1553 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace));
1554 LASSERTF((int)offsetof(struct obd_dqinfo, dqi_flags) == 16, " found %lld\n",
1555 (long long)(int)offsetof(struct obd_dqinfo, dqi_flags));
1556 LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_flags) == 4, " found %lld\n",
1557 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_flags));
1558 LASSERTF((int)offsetof(struct obd_dqinfo, dqi_valid) == 20, " found %lld\n",
1559 (long long)(int)offsetof(struct obd_dqinfo, dqi_valid));
1560 LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_valid) == 4, " found %lld\n",
1561 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_valid));
1563 /* Checks for struct obd_dqblk */
1564 LASSERTF((int)sizeof(struct obd_dqblk) == 72, " found %lld\n",
1565 (long long)(int)sizeof(struct obd_dqblk));
1566 LASSERTF((int)offsetof(struct obd_dqblk, dqb_bhardlimit) == 0, " found %lld\n",
1567 (long long)(int)offsetof(struct obd_dqblk, dqb_bhardlimit));
1568 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit) == 8, " found %lld\n",
1569 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit));
1570 LASSERTF((int)offsetof(struct obd_dqblk, dqb_bsoftlimit) == 8, " found %lld\n",
1571 (long long)(int)offsetof(struct obd_dqblk, dqb_bsoftlimit));
1572 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit) == 8, " found %lld\n",
1573 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit));
1574 LASSERTF((int)offsetof(struct obd_dqblk, dqb_curspace) == 16, " found %lld\n",
1575 (long long)(int)offsetof(struct obd_dqblk, dqb_curspace));
1576 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curspace) == 8, " found %lld\n",
1577 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curspace));
1578 LASSERTF((int)offsetof(struct obd_dqblk, dqb_ihardlimit) == 24, " found %lld\n",
1579 (long long)(int)offsetof(struct obd_dqblk, dqb_ihardlimit));
1580 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit) == 8, " found %lld\n",
1581 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit));
1582 LASSERTF((int)offsetof(struct obd_dqblk, dqb_isoftlimit) == 32, " found %lld\n",
1583 (long long)(int)offsetof(struct obd_dqblk, dqb_isoftlimit));
1584 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit) == 8, " found %lld\n",
1585 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit));
1586 LASSERTF((int)offsetof(struct obd_dqblk, dqb_curinodes) == 40, " found %lld\n",
1587 (long long)(int)offsetof(struct obd_dqblk, dqb_curinodes));
1588 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes) == 8, " found %lld\n",
1589 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes));
1590 LASSERTF((int)offsetof(struct obd_dqblk, dqb_btime) == 48, " found %lld\n",
1591 (long long)(int)offsetof(struct obd_dqblk, dqb_btime));
1592 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_btime) == 8, " found %lld\n",
1593 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_btime));
1594 LASSERTF((int)offsetof(struct obd_dqblk, dqb_itime) == 56, " found %lld\n",
1595 (long long)(int)offsetof(struct obd_dqblk, dqb_itime));
1596 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_itime) == 8, " found %lld\n",
1597 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_itime));
1598 LASSERTF((int)offsetof(struct obd_dqblk, dqb_valid) == 64, " found %lld\n",
1599 (long long)(int)offsetof(struct obd_dqblk, dqb_valid));
1600 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_valid) == 4, " found %lld\n",
1601 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_valid));
1602 LASSERTF((int)offsetof(struct obd_dqblk, padding) == 68, " found %lld\n",
1603 (long long)(int)offsetof(struct obd_dqblk, padding));
1604 LASSERTF((int)sizeof(((struct obd_dqblk *)0)->padding) == 4, " found %lld\n",
1605 (long long)(int)sizeof(((struct obd_dqblk *)0)->padding));
1606 LASSERTF(Q_QUOTACHECK == 0x800100," found %lld\n",
1607 (long long)Q_QUOTACHECK);
1608 LASSERTF(Q_INITQUOTA == 0x800101," found %lld\n",
1609 (long long)Q_INITQUOTA);
1610 LASSERTF(Q_GETOINFO == 0x800102," found %lld\n",
1611 (long long)Q_GETOINFO);
1612 LASSERTF(Q_GETOQUOTA == 0x800103," found %lld\n",
1613 (long long)Q_GETOQUOTA);
1615 /* Checks for struct niobuf_remote */
1616 LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
1617 (long long)(int)sizeof(struct niobuf_remote));
1618 LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
1619 (long long)(int)offsetof(struct niobuf_remote, offset));
1620 LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
1621 (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
1622 LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
1623 (long long)(int)offsetof(struct niobuf_remote, len));
1624 LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
1625 (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
1626 LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
1627 (long long)(int)offsetof(struct niobuf_remote, flags));
1628 LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
1629 (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
1630 LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
1631 (long long)OBD_BRW_READ);
1632 LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
1633 (long long)OBD_BRW_WRITE);
1634 LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
1635 (long long)OBD_BRW_SYNC);
1636 LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
1637 (long long)OBD_BRW_FROM_GRANT);
1638 LASSERTF(OBD_BRW_NOQUOTA == 256, " found %lld\n",
1639 (long long)OBD_BRW_NOQUOTA);
1641 /* Checks for struct ost_body */
1642 LASSERTF((int)sizeof(struct ost_body) == 208, " found %lld\n",
1643 (long long)(int)sizeof(struct ost_body));
1644 LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n",
1645 (long long)(int)offsetof(struct ost_body, oa));
1646 LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
1647 (long long)(int)sizeof(((struct ost_body *)0)->oa));
1649 /* Checks for struct ll_fid */
1650 LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
1651 (long long)(int)sizeof(struct ll_fid));
1652 LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
1653 (long long)(int)offsetof(struct ll_fid, id));
1654 LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
1655 (long long)(int)sizeof(((struct ll_fid *)0)->id));
1656 LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
1657 (long long)(int)offsetof(struct ll_fid, generation));
1658 LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
1659 (long long)(int)sizeof(((struct ll_fid *)0)->generation));
1660 LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
1661 (long long)(int)offsetof(struct ll_fid, f_type));
1662 LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
1663 (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
1665 /* Checks for struct mds_status_req */
1666 LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
1667 (long long)(int)sizeof(struct mds_status_req));
1668 LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
1669 (long long)(int)offsetof(struct mds_status_req, flags));
1670 LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
1671 (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
1672 LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
1673 (long long)(int)offsetof(struct mds_status_req, repbuf));
1674 LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
1675 (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
1677 /* Checks for struct mds_body */
1678 LASSERTF((int)sizeof(struct mds_body) == 168, " found %lld\n",
1679 (long long)(int)sizeof(struct mds_body));
1680 LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n",
1681 (long long)(int)offsetof(struct mds_body, fid1));
1682 LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n",
1683 (long long)(int)sizeof(((struct mds_body *)0)->fid1));
1684 LASSERTF((int)offsetof(struct mds_body, fid2) == 16, " found %lld\n",
1685 (long long)(int)offsetof(struct mds_body, fid2));
1686 LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n",
1687 (long long)(int)sizeof(((struct mds_body *)0)->fid2));
1688 LASSERTF((int)offsetof(struct mds_body, handle) == 32, " found %lld\n",
1689 (long long)(int)offsetof(struct mds_body, handle));
1690 LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
1691 (long long)(int)sizeof(((struct mds_body *)0)->handle));
1692 LASSERTF((int)offsetof(struct mds_body, size) == 48, " found %lld\n",
1693 (long long)(int)offsetof(struct mds_body, size));
1694 LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
1695 (long long)(int)sizeof(((struct mds_body *)0)->size));
1696 LASSERTF((int)offsetof(struct mds_body, blocks) == 80, " found %lld\n",
1697 (long long)(int)offsetof(struct mds_body, blocks));
1698 LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
1699 (long long)(int)sizeof(((struct mds_body *)0)->blocks));
1700 LASSERTF((int)offsetof(struct mds_body, io_epoch) == 88, " found %lld\n",
1701 (long long)(int)offsetof(struct mds_body, io_epoch));
1702 LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
1703 (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
1704 LASSERTF((int)offsetof(struct mds_body, ino) == 96, " found %lld\n",
1705 (long long)(int)offsetof(struct mds_body, ino));
1706 LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 8, " found %lld\n",
1707 (long long)(int)sizeof(((struct mds_body *)0)->ino));
1708 LASSERTF((int)offsetof(struct mds_body, valid) == 40, " found %lld\n",
1709 (long long)(int)offsetof(struct mds_body, valid));
1710 LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 8, " found %lld\n",
1711 (long long)(int)sizeof(((struct mds_body *)0)->valid));
1712 LASSERTF((int)offsetof(struct mds_body, fsuid) == 104, " found %lld\n",
1713 (long long)(int)offsetof(struct mds_body, fsuid));
1714 LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n",
1715 (long long)(int)sizeof(((struct mds_body *)0)->fsuid));
1716 LASSERTF((int)offsetof(struct mds_body, fsgid) == 108, " found %lld\n",
1717 (long long)(int)offsetof(struct mds_body, fsgid));
1718 LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n",
1719 (long long)(int)sizeof(((struct mds_body *)0)->fsgid));
1720 LASSERTF((int)offsetof(struct mds_body, capability) == 112, " found %lld\n",
1721 (long long)(int)offsetof(struct mds_body, capability));
1722 LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n",
1723 (long long)(int)sizeof(((struct mds_body *)0)->capability));
1724 LASSERTF((int)offsetof(struct mds_body, mode) == 116, " found %lld\n",
1725 (long long)(int)offsetof(struct mds_body, mode));
1726 LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
1727 (long long)(int)sizeof(((struct mds_body *)0)->mode));
1728 LASSERTF((int)offsetof(struct mds_body, uid) == 120, " found %lld\n",
1729 (long long)(int)offsetof(struct mds_body, uid));
1730 LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
1731 (long long)(int)sizeof(((struct mds_body *)0)->uid));
1732 LASSERTF((int)offsetof(struct mds_body, gid) == 124, " found %lld\n",
1733 (long long)(int)offsetof(struct mds_body, gid));
1734 LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
1735 (long long)(int)sizeof(((struct mds_body *)0)->gid));
1736 LASSERTF((int)offsetof(struct mds_body, mtime) == 56, " found %lld\n",
1737 (long long)(int)offsetof(struct mds_body, mtime));
1738 LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 8, " found %lld\n",
1739 (long long)(int)sizeof(((struct mds_body *)0)->mtime));
1740 LASSERTF((int)offsetof(struct mds_body, ctime) == 72, " found %lld\n",
1741 (long long)(int)offsetof(struct mds_body, ctime));
1742 LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 8, " found %lld\n",
1743 (long long)(int)sizeof(((struct mds_body *)0)->ctime));
1744 LASSERTF((int)offsetof(struct mds_body, atime) == 64, " found %lld\n",
1745 (long long)(int)offsetof(struct mds_body, atime));
1746 LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 8, " found %lld\n",
1747 (long long)(int)sizeof(((struct mds_body *)0)->atime));
1748 LASSERTF((int)offsetof(struct mds_body, flags) == 128, " found %lld\n",
1749 (long long)(int)offsetof(struct mds_body, flags));
1750 LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
1751 (long long)(int)sizeof(((struct mds_body *)0)->flags));
1752 LASSERTF((int)offsetof(struct mds_body, rdev) == 132, " found %lld\n",
1753 (long long)(int)offsetof(struct mds_body, rdev));
1754 LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
1755 (long long)(int)sizeof(((struct mds_body *)0)->rdev));
1756 LASSERTF((int)offsetof(struct mds_body, nlink) == 136, " found %lld\n",
1757 (long long)(int)offsetof(struct mds_body, nlink));
1758 LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
1759 (long long)(int)sizeof(((struct mds_body *)0)->nlink));
1760 LASSERTF((int)offsetof(struct mds_body, generation) == 140, " found %lld\n",
1761 (long long)(int)offsetof(struct mds_body, generation));
1762 LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
1763 (long long)(int)sizeof(((struct mds_body *)0)->generation));
1764 LASSERTF((int)offsetof(struct mds_body, suppgid) == 144, " found %lld\n",
1765 (long long)(int)offsetof(struct mds_body, suppgid));
1766 LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n",
1767 (long long)(int)sizeof(((struct mds_body *)0)->suppgid));
1768 LASSERTF((int)offsetof(struct mds_body, eadatasize) == 148, " found %lld\n",
1769 (long long)(int)offsetof(struct mds_body, eadatasize));
1770 LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
1771 (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
1772 LASSERTF((int)offsetof(struct mds_body, aclsize) == 152, " found %lld\n",
1773 (long long)(int)offsetof(struct mds_body, aclsize));
1774 LASSERTF((int)sizeof(((struct mds_body *)0)->aclsize) == 4, " found %lld\n",
1775 (long long)(int)sizeof(((struct mds_body *)0)->aclsize));
1776 LASSERTF((int)offsetof(struct mds_body, max_mdsize) == 156, " found %lld\n",
1777 (long long)(int)offsetof(struct mds_body, max_mdsize));
1778 LASSERTF((int)sizeof(((struct mds_body *)0)->max_mdsize) == 4, " found %lld\n",
1779 (long long)(int)sizeof(((struct mds_body *)0)->max_mdsize));
1780 LASSERTF((int)offsetof(struct mds_body, max_cookiesize) == 160, " found %lld\n",
1781 (long long)(int)offsetof(struct mds_body, max_cookiesize));
1782 LASSERTF((int)sizeof(((struct mds_body *)0)->max_cookiesize) == 4, " found %lld\n",
1783 (long long)(int)sizeof(((struct mds_body *)0)->max_cookiesize));
1784 LASSERTF((int)offsetof(struct mds_body, padding_4) == 164, " found %lld\n",
1785 (long long)(int)offsetof(struct mds_body, padding_4));
1786 LASSERTF((int)sizeof(((struct mds_body *)0)->padding_4) == 4, " found %lld\n",
1787 (long long)(int)sizeof(((struct mds_body *)0)->padding_4));
1788 LASSERTF(FMODE_READ == 1, " found %lld\n",
1789 (long long)FMODE_READ);
1790 LASSERTF(FMODE_WRITE == 2, " found %lld\n",
1791 (long long)FMODE_WRITE);
1792 LASSERTF(FMODE_EXEC == 4, " found %lld\n",
1793 (long long)FMODE_EXEC);
1794 LASSERTF(MDS_OPEN_CREAT == 64, " found %lld\n",
1795 (long long)MDS_OPEN_CREAT);
1796 LASSERTF(MDS_OPEN_EXCL == 128, " found %lld\n",
1797 (long long)MDS_OPEN_EXCL);
1798 LASSERTF(MDS_OPEN_TRUNC == 512, " found %lld\n",
1799 (long long)MDS_OPEN_TRUNC);
1800 LASSERTF(MDS_OPEN_APPEND == 1024, " found %lld\n",
1801 (long long)MDS_OPEN_APPEND);
1802 LASSERTF(MDS_OPEN_SYNC == 4096, " found %lld\n",
1803 (long long)MDS_OPEN_SYNC);
1804 LASSERTF(MDS_OPEN_DIRECTORY == 65536, " found %lld\n",
1805 (long long)MDS_OPEN_DIRECTORY);
1806 LASSERTF(MDS_OPEN_DELAY_CREATE == 16777216, " found %lld\n",
1807 (long long)MDS_OPEN_DELAY_CREATE);
1808 CLASSERT(MDS_OPEN_OWNEROVERRIDE == 0200000000);
1809 CLASSERT(MDS_OPEN_JOIN_FILE == 0400000000);
1810 CLASSERT(MDS_OPEN_HAS_EA == 010000000000);
1811 CLASSERT(MDS_OPEN_HAS_OBJS == 020000000000);
1813 /* Checks for struct mds_rec_setattr */
1814 LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
1815 (long long)(int)sizeof(struct mds_rec_setattr));
1816 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
1817 (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
1818 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
1819 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
1820 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
1821 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
1822 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
1823 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
1824 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
1825 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
1826 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
1827 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
1828 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
1829 (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
1830 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
1831 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
1832 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
1833 (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
1834 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
1835 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
1836 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
1837 (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
1838 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
1839 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
1840 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
1841 (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
1842 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
1843 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
1844 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
1845 (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
1846 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
1847 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
1848 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
1849 (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
1850 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
1851 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
1852 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
1853 (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
1854 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
1855 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
1856 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
1857 (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
1858 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
1859 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
1860 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
1861 (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
1862 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
1863 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
1864 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
1865 (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
1866 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
1867 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
1868 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
1869 (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
1870 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
1871 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
1872 LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
1873 (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
1874 LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
1875 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
1877 /* Checks for struct mds_rec_create */
1878 LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
1879 (long long)(int)sizeof(struct mds_rec_create));
1880 LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
1881 (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
1882 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
1883 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
1884 LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
1885 (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
1886 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
1887 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
1888 LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
1889 (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
1890 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
1891 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
1892 LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
1893 (long long)(int)offsetof(struct mds_rec_create, cr_cap));
1894 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
1895 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
1896 LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
1897 (long long)(int)offsetof(struct mds_rec_create, cr_flags));
1898 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
1899 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
1900 LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
1901 (long long)(int)offsetof(struct mds_rec_create, cr_mode));
1902 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
1903 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
1904 LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
1905 (long long)(int)offsetof(struct mds_rec_create, cr_fid));
1906 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
1907 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
1908 LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
1909 (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
1910 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
1911 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
1912 LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
1913 (long long)(int)offsetof(struct mds_rec_create, cr_time));
1914 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
1915 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
1916 LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
1917 (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
1918 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
1919 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
1920 LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
1921 (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
1922 LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
1923 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
1925 /* Checks for struct mds_rec_link */
1926 LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
1927 (long long)(int)sizeof(struct mds_rec_link));
1928 LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
1929 (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
1930 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
1931 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
1932 LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
1933 (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
1934 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
1935 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
1936 LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
1937 (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
1938 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
1939 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
1940 LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
1941 (long long)(int)offsetof(struct mds_rec_link, lk_cap));
1942 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
1943 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
1944 LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
1945 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
1946 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
1947 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
1948 LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
1949 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
1950 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
1951 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
1952 LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
1953 (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
1954 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
1955 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
1956 LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
1957 (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
1958 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
1959 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
1960 LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
1961 (long long)(int)offsetof(struct mds_rec_link, lk_time));
1962 LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
1963 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
1965 /* Checks for struct mds_rec_unlink */
1966 LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
1967 (long long)(int)sizeof(struct mds_rec_unlink));
1968 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
1969 (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
1970 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
1971 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
1972 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
1973 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
1974 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
1975 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
1976 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
1977 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
1978 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
1979 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
1980 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
1981 (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
1982 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
1983 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
1984 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
1985 (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
1986 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
1987 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
1988 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
1989 (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
1990 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
1991 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
1992 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
1993 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
1994 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
1995 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
1996 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
1997 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
1998 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
1999 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
2000 LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
2001 (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
2002 LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
2003 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
2005 /* Checks for struct mds_rec_rename */
2006 LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
2007 (long long)(int)sizeof(struct mds_rec_rename));
2008 LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
2009 (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
2010 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
2011 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
2012 LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
2013 (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
2014 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
2015 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
2016 LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
2017 (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
2018 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
2019 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
2020 LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
2021 (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
2022 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
2023 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
2024 LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
2025 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
2026 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
2027 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
2028 LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
2029 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
2030 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
2031 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
2032 LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
2033 (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
2034 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
2035 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
2036 LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
2037 (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
2038 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
2039 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
2040 LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
2041 (long long)(int)offsetof(struct mds_rec_rename, rn_time));
2042 LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
2043 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
2045 /* Checks for struct lov_desc */
2046 LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
2047 (long long)(int)sizeof(struct lov_desc));
2048 LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
2049 (long long)(int)offsetof(struct lov_desc, ld_tgt_count));
2050 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
2051 (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
2052 LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
2053 (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count));
2054 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
2055 (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
2056 LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
2057 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count));
2058 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
2059 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
2060 LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
2061 (long long)(int)offsetof(struct lov_desc, ld_pattern));
2062 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
2063 (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
2064 LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
2065 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size));
2066 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
2067 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
2068 LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
2069 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
2070 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
2071 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
2072 LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
2073 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
2074 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
2075 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
2076 LASSERTF((int)offsetof(struct lov_desc, ld_padding_1) == 32, " found %lld\n",
2077 (long long)(int)offsetof(struct lov_desc, ld_padding_1));
2078 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_1) == 4, " found %lld\n",
2079 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_1));
2080 LASSERTF((int)offsetof(struct lov_desc, ld_padding_2) == 36, " found %lld\n",
2081 (long long)(int)offsetof(struct lov_desc, ld_padding_2));
2082 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_2) == 4, " found %lld\n",
2083 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_2));
2084 LASSERTF((int)offsetof(struct lov_desc, ld_padding_3) == 40, " found %lld\n",
2085 (long long)(int)offsetof(struct lov_desc, ld_padding_3));
2086 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_3) == 4, " found %lld\n",
2087 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_3));
2088 LASSERTF((int)offsetof(struct lov_desc, ld_padding_4) == 44, " found %lld\n",
2089 (long long)(int)offsetof(struct lov_desc, ld_padding_4));
2090 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_4) == 4, " found %lld\n",
2091 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_4));
2092 LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 48, " found %lld\n",
2093 (long long)(int)offsetof(struct lov_desc, ld_uuid));
2094 LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
2095 (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
2097 /* Checks for struct ldlm_res_id */
2098 LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
2099 (long long)(int)sizeof(struct ldlm_res_id));
2100 LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
2101 (long long)(int)offsetof(struct ldlm_res_id, name[4]));
2102 LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
2103 (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
2105 /* Checks for struct ldlm_extent */
2106 LASSERTF((int)sizeof(struct ldlm_extent) == 24, " found %lld\n",
2107 (long long)(int)sizeof(struct ldlm_extent));
2108 LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
2109 (long long)(int)offsetof(struct ldlm_extent, start));
2110 LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
2111 (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
2112 LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
2113 (long long)(int)offsetof(struct ldlm_extent, end));
2114 LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
2115 (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
2116 LASSERTF((int)offsetof(struct ldlm_extent, gid) == 16, " found %lld\n",
2117 (long long)(int)offsetof(struct ldlm_extent, gid));
2118 LASSERTF((int)sizeof(((struct ldlm_extent *)0)->gid) == 8, " found %lld\n",
2119 (long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
2121 /* Checks for struct ldlm_flock */
2122 LASSERTF((int)sizeof(struct ldlm_flock) == 32, " found %lld\n",
2123 (long long)(int)sizeof(struct ldlm_flock));
2124 LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
2125 (long long)(int)offsetof(struct ldlm_flock, start));
2126 LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
2127 (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
2128 LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
2129 (long long)(int)offsetof(struct ldlm_flock, end));
2130 LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
2131 (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
2132 LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
2133 (long long)(int)offsetof(struct ldlm_flock, blocking_pid));
2134 LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4, " found %lld\n",
2135 (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
2136 LASSERTF((int)offsetof(struct ldlm_flock, pid) == 28, " found %lld\n",
2137 (long long)(int)offsetof(struct ldlm_flock, pid));
2138 LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 4, " found %lld\n",
2139 (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
2141 /* Checks for struct ldlm_intent */
2142 LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
2143 (long long)(int)sizeof(struct ldlm_intent));
2144 LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
2145 (long long)(int)offsetof(struct ldlm_intent, opc));
2146 LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
2147 (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
2149 /* Checks for struct ldlm_resource_desc */
2150 LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
2151 (long long)(int)sizeof(struct ldlm_resource_desc));
2152 LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
2153 (long long)(int)offsetof(struct ldlm_resource_desc, lr_type));
2154 LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
2155 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
2156 LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_padding) == 4, " found %lld\n",
2157 (long long)(int)offsetof(struct ldlm_resource_desc, lr_padding));
2158 LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding) == 4, " found %lld\n",
2159 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding));
2160 LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
2161 (long long)(int)offsetof(struct ldlm_resource_desc, lr_name));
2162 LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
2163 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
2165 /* Checks for struct ldlm_lock_desc */
2166 LASSERTF((int)sizeof(struct ldlm_lock_desc) == 80, " found %lld\n",
2167 (long long)(int)sizeof(struct ldlm_lock_desc));
2168 LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
2169 (long long)(int)offsetof(struct ldlm_lock_desc, l_resource));
2170 LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
2171 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
2172 LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
2173 (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode));
2174 LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
2175 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
2176 LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
2177 (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode));
2178 LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
2179 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
2180 LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
2181 (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data));
2182 LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32, " found %lld\n",
2183 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
2185 /* Checks for struct ldlm_request */
2186 LASSERTF((int)sizeof(struct ldlm_request) == 104, " found %lld\n",
2187 (long long)(int)sizeof(struct ldlm_request));
2188 LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
2189 (long long)(int)offsetof(struct ldlm_request, lock_flags));
2190 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
2191 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
2192 LASSERTF((int)offsetof(struct ldlm_request, lock_padding) == 4, " found %lld\n",
2193 (long long)(int)offsetof(struct ldlm_request, lock_padding));
2194 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_padding) == 4, " found %lld\n",
2195 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_padding));
2196 LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
2197 (long long)(int)offsetof(struct ldlm_request, lock_desc));
2198 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
2199 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
2200 LASSERTF((int)offsetof(struct ldlm_request, lock_handle1) == 88, " found %lld\n",
2201 (long long)(int)offsetof(struct ldlm_request, lock_handle1));
2202 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle1) == 8, " found %lld\n",
2203 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle1));
2204 LASSERTF((int)offsetof(struct ldlm_request, lock_handle2) == 96, " found %lld\n",
2205 (long long)(int)offsetof(struct ldlm_request, lock_handle2));
2206 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle2) == 8, " found %lld\n",
2207 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle2));
2209 /* Checks for struct ldlm_reply */
2210 LASSERTF((int)sizeof(struct ldlm_reply) == 112, " found %lld\n",
2211 (long long)(int)sizeof(struct ldlm_reply));
2212 LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
2213 (long long)(int)offsetof(struct ldlm_reply, lock_flags));
2214 LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
2215 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
2216 LASSERTF((int)offsetof(struct ldlm_request, lock_padding) == 4, " found %lld\n",
2217 (long long)(int)offsetof(struct ldlm_request, lock_padding));
2218 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_padding) == 4, " found %lld\n",
2219 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_padding));
2220 LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
2221 (long long)(int)offsetof(struct ldlm_request, lock_desc));
2222 LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
2223 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
2224 LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n",
2225 (long long)(int)offsetof(struct ldlm_reply, lock_handle));
2226 LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
2227 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
2228 LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n",
2229 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1));
2230 LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
2231 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
2232 LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n",
2233 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2));
2234 LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
2235 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
2237 /* Checks for struct ost_lvb */
2238 LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
2239 (long long)(int)sizeof(struct ost_lvb));
2240 LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
2241 (long long)(int)offsetof(struct ost_lvb, lvb_size));
2242 LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
2243 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
2244 LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
2245 (long long)(int)offsetof(struct ost_lvb, lvb_mtime));
2246 LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
2247 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
2248 LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
2249 (long long)(int)offsetof(struct ost_lvb, lvb_atime));
2250 LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
2251 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
2252 LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
2253 (long long)(int)offsetof(struct ost_lvb, lvb_ctime));
2254 LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
2255 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
2256 LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
2257 (long long)(int)offsetof(struct ost_lvb, lvb_blocks));
2258 LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
2259 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
2261 /* Checks for struct llog_logid */
2262 LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
2263 (long long)(int)sizeof(struct llog_logid));
2264 LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
2265 (long long)(int)offsetof(struct llog_logid, lgl_oid));
2266 LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
2267 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
2268 LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
2269 (long long)(int)offsetof(struct llog_logid, lgl_ogr));
2270 LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
2271 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
2272 LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
2273 (long long)(int)offsetof(struct llog_logid, lgl_ogen));
2274 LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
2275 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
2276 LASSERTF(OST_SZ_REC == 274730752, " found %lld\n",
2277 (long long)OST_SZ_REC);
2278 LASSERTF(OST_RAID1_REC == 274731008, " found %lld\n",
2279 (long long)OST_RAID1_REC);
2280 LASSERTF(MDS_UNLINK_REC == 274801668, " found %lld\n",
2281 (long long)MDS_UNLINK_REC);
2282 LASSERTF(MDS_SETATTR_REC == 274801665, " found %lld\n",
2283 (long long)MDS_SETATTR_REC);
2284 LASSERTF(OBD_CFG_REC == 274857984, " found %lld\n",
2285 (long long)OBD_CFG_REC);
2286 LASSERTF(PTL_CFG_REC == 274923520, " found %lld\n",
2287 (long long)PTL_CFG_REC);
2288 LASSERTF(LLOG_GEN_REC == 274989056, " found %lld\n",
2289 (long long)LLOG_GEN_REC);
2290 LASSERTF(LLOG_HDR_MAGIC == 275010873, " found %lld\n",
2291 (long long)LLOG_HDR_MAGIC);
2292 LASSERTF(LLOG_LOGID_MAGIC == 275010875, " found %lld\n",
2293 (long long)LLOG_LOGID_MAGIC);
2295 /* Checks for struct llog_catid */
2296 LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
2297 (long long)(int)sizeof(struct llog_catid));
2298 LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
2299 (long long)(int)offsetof(struct llog_catid, lci_logid));
2300 LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
2301 (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
2302 LASSERTF((int)offsetof(struct llog_catid, lci_padding1) == 20, " found %lld\n",
2303 (long long)(int)offsetof(struct llog_catid, lci_padding1));
2304 LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding1) == 4, " found %lld\n",
2305 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding1));
2306 LASSERTF((int)offsetof(struct llog_catid, lci_padding2) == 24, " found %lld\n",
2307 (long long)(int)offsetof(struct llog_catid, lci_padding2));
2308 LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding2) == 4, " found %lld\n",
2309 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding2));
2310 LASSERTF((int)offsetof(struct llog_catid, lci_padding3) == 28, " found %lld\n",
2311 (long long)(int)offsetof(struct llog_catid, lci_padding3));
2312 LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding3) == 4, " found %lld\n",
2313 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding3));
2315 /* Checks for struct llog_rec_hdr */
2316 LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
2317 (long long)(int)sizeof(struct llog_rec_hdr));
2318 LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
2319 (long long)(int)offsetof(struct llog_rec_hdr, lrh_len));
2320 LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
2321 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
2322 LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
2323 (long long)(int)offsetof(struct llog_rec_hdr, lrh_index));
2324 LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
2325 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
2326 LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
2327 (long long)(int)offsetof(struct llog_rec_hdr, lrh_type));
2328 LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
2329 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
2330 LASSERTF((int)offsetof(struct llog_rec_hdr, padding) == 12, " found %lld\n",
2331 (long long)(int)offsetof(struct llog_rec_hdr, padding));
2332 LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->padding) == 4, " found %lld\n",
2333 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->padding));
2335 /* Checks for struct llog_rec_tail */
2336 LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
2337 (long long)(int)sizeof(struct llog_rec_tail));
2338 LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
2339 (long long)(int)offsetof(struct llog_rec_tail, lrt_len));
2340 LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
2341 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
2342 LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
2343 (long long)(int)offsetof(struct llog_rec_tail, lrt_index));
2344 LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
2345 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
2347 /* Checks for struct llog_logid_rec */
2348 LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
2349 (long long)(int)sizeof(struct llog_logid_rec));
2350 LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
2351 (long long)(int)offsetof(struct llog_logid_rec, lid_hdr));
2352 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
2353 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
2354 LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
2355 (long long)(int)offsetof(struct llog_logid_rec, lid_id));
2356 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
2357 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
2358 LASSERTF((int)offsetof(struct llog_logid_rec, padding1) == 36, " found %lld\n",
2359 (long long)(int)offsetof(struct llog_logid_rec, padding1));
2360 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding1) == 4, " found %lld\n",
2361 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding1));
2362 LASSERTF((int)offsetof(struct llog_logid_rec, padding2) == 40, " found %lld\n",
2363 (long long)(int)offsetof(struct llog_logid_rec, padding2));
2364 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding2) == 4, " found %lld\n",
2365 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding2));
2366 LASSERTF((int)offsetof(struct llog_logid_rec, padding3) == 44, " found %lld\n",
2367 (long long)(int)offsetof(struct llog_logid_rec, padding3));
2368 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding3) == 4, " found %lld\n",
2369 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding3));
2370 LASSERTF((int)offsetof(struct llog_logid_rec, padding4) == 48, " found %lld\n",
2371 (long long)(int)offsetof(struct llog_logid_rec, padding4));
2372 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding4) == 4, " found %lld\n",
2373 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding4));
2374 LASSERTF((int)offsetof(struct llog_logid_rec, padding5) == 52, " found %lld\n",
2375 (long long)(int)offsetof(struct llog_logid_rec, padding5));
2376 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding5) == 4, " found %lld\n",
2377 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding5));
2378 LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
2379 (long long)(int)offsetof(struct llog_logid_rec, lid_tail));
2380 LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
2381 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
2383 /* Checks for struct llog_create_rec */
2384 LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n",
2385 (long long)(int)sizeof(struct llog_create_rec));
2386 LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
2387 (long long)(int)offsetof(struct llog_create_rec, lcr_hdr));
2388 LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
2389 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
2390 LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
2391 (long long)(int)offsetof(struct llog_create_rec, lcr_fid));
2392 LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n",
2393 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
2394 LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n",
2395 (long long)(int)offsetof(struct llog_create_rec, lcr_oid));
2396 LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
2397 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
2398 LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n",
2399 (long long)(int)offsetof(struct llog_create_rec, lcr_ogen));
2400 LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
2401 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
2402 LASSERTF((int)offsetof(struct llog_create_rec, padding) == 44, " found %lld\n",
2403 (long long)(int)offsetof(struct llog_create_rec, padding));
2404 LASSERTF((int)sizeof(((struct llog_create_rec *)0)->padding) == 4, " found %lld\n",
2405 (long long)(int)sizeof(((struct llog_create_rec *)0)->padding));
2407 /* Checks for struct llog_orphan_rec */
2408 LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
2409 (long long)(int)sizeof(struct llog_orphan_rec));
2410 LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
2411 (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr));
2412 LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
2413 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
2414 LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
2415 (long long)(int)offsetof(struct llog_orphan_rec, lor_oid));
2416 LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
2417 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
2418 LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
2419 (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen));
2420 LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
2421 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
2422 LASSERTF((int)offsetof(struct llog_orphan_rec, padding) == 28, " found %lld\n",
2423 (long long)(int)offsetof(struct llog_orphan_rec, padding));
2424 LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->padding) == 4, " found %lld\n",
2425 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->padding));
2426 LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
2427 (long long)(int)offsetof(struct llog_orphan_rec, lor_tail));
2428 LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
2429 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
2431 /* Checks for struct llog_unlink_rec */
2432 LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
2433 (long long)(int)sizeof(struct llog_unlink_rec));
2434 LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
2435 (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr));
2436 LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
2437 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
2438 LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
2439 (long long)(int)offsetof(struct llog_unlink_rec, lur_oid));
2440 LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
2441 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
2442 LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
2443 (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen));
2444 LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
2445 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
2446 LASSERTF((int)offsetof(struct llog_unlink_rec, padding) == 28, " found %lld\n",
2447 (long long)(int)offsetof(struct llog_unlink_rec, padding));
2448 LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->padding) == 4, " found %lld\n",
2449 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->padding));
2450 LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
2451 (long long)(int)offsetof(struct llog_unlink_rec, lur_tail));
2452 LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
2453 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
2455 /* Checks for struct llog_setattr_rec */
2456 LASSERTF((int)sizeof(struct llog_setattr_rec) == 48, " found %lld\n",
2457 (long long)(int)sizeof(struct llog_setattr_rec));
2458 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_hdr) == 0, " found %lld\n",
2459 (long long)(int)offsetof(struct llog_setattr_rec, lsr_hdr));
2460 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr) == 16, " found %lld\n",
2461 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr));
2462 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_oid) == 16, " found %lld\n",
2463 (long long)(int)offsetof(struct llog_setattr_rec, lsr_oid));
2464 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid) == 8, " found %lld\n",
2465 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid));
2466 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_ogen) == 24, " found %lld\n",
2467 (long long)(int)offsetof(struct llog_setattr_rec, lsr_ogen));
2468 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen) == 4, " found %lld\n",
2469 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen));
2470 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_uid) == 28, " found %lld\n",
2471 (long long)(int)offsetof(struct llog_setattr_rec, lsr_uid));
2472 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid) == 4, " found %lld\n",
2473 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid));
2474 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_gid) == 32, " found %lld\n",
2475 (long long)(int)offsetof(struct llog_setattr_rec, lsr_gid));
2476 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid) == 4, " found %lld\n",
2477 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid));
2478 LASSERTF((int)offsetof(struct llog_setattr_rec, padding) == 36, " found %lld\n",
2479 (long long)(int)offsetof(struct llog_setattr_rec, padding));
2480 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->padding) == 4, " found %lld\n",
2481 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->padding));
2482 LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_tail) == 40, " found %lld\n",
2483 (long long)(int)offsetof(struct llog_setattr_rec, lsr_tail));
2484 LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail) == 8, " found %lld\n",
2485 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail));
2487 /* Checks for struct llog_size_change_rec */
2488 LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n",
2489 (long long)(int)sizeof(struct llog_size_change_rec));
2490 LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
2491 (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr));
2492 LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
2493 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
2494 LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
2495 (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid));
2496 LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n",
2497 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
2498 LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n",
2499 (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch));
2500 LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
2501 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
2502 LASSERTF((int)offsetof(struct llog_size_change_rec, padding) == 36, " found %lld\n",
2503 (long long)(int)offsetof(struct llog_size_change_rec, padding));
2504 LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->padding) == 4, " found %lld\n",
2505 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->padding));
2506 LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n",
2507 (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail));
2508 LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
2509 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
2511 /* Checks for struct llog_gen */
2512 LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
2513 (long long)(int)sizeof(struct llog_gen));
2514 LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
2515 (long long)(int)offsetof(struct llog_gen, mnt_cnt));
2516 LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
2517 (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
2518 LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
2519 (long long)(int)offsetof(struct llog_gen, conn_cnt));
2520 LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
2521 (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
2523 /* Checks for struct llog_gen_rec */
2524 LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
2525 (long long)(int)sizeof(struct llog_gen_rec));
2526 LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
2527 (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr));
2528 LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
2529 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
2530 LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
2531 (long long)(int)offsetof(struct llog_gen_rec, lgr_gen));
2532 LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
2533 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
2534 LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
2535 (long long)(int)offsetof(struct llog_gen_rec, lgr_tail));
2536 LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
2537 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
2539 /* Checks for struct llog_log_hdr */
2540 LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
2541 (long long)(int)sizeof(struct llog_log_hdr));
2542 LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
2543 (long long)(int)offsetof(struct llog_log_hdr, llh_hdr));
2544 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
2545 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
2546 LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
2547 (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp));
2548 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
2549 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
2550 LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
2551 (long long)(int)offsetof(struct llog_log_hdr, llh_count));
2552 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
2553 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
2554 LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
2555 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset));
2556 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
2557 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
2558 LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
2559 (long long)(int)offsetof(struct llog_log_hdr, llh_size));
2560 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
2561 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
2562 LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
2563 (long long)(int)offsetof(struct llog_log_hdr, llh_flags));
2564 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
2565 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
2566 LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
2567 (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx));
2568 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
2569 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
2570 LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
2571 (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid));
2572 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
2573 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
2574 LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
2575 (long long)(int)offsetof(struct llog_log_hdr, llh_reserved));
2576 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
2577 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
2578 LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
2579 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
2580 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
2581 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
2582 LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
2583 (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
2584 LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
2585 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
2587 /* Checks for struct llog_cookie */
2588 LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
2589 (long long)(int)sizeof(struct llog_cookie));
2590 LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
2591 (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
2592 LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
2593 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
2594 LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
2595 (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
2596 LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
2597 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
2598 LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
2599 (long long)(int)offsetof(struct llog_cookie, lgc_index));
2600 LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
2601 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
2602 LASSERTF((int)offsetof(struct llog_cookie, lgc_padding) == 28, " found %lld\n",
2603 (long long)(int)offsetof(struct llog_cookie, lgc_padding));
2604 LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_padding) == 4, " found %lld\n",
2605 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_padding));
2607 /* Checks for struct llogd_body */
2608 LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
2609 (long long)(int)sizeof(struct llogd_body));
2610 LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
2611 (long long)(int)offsetof(struct llogd_body, lgd_logid));
2612 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
2613 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
2614 LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
2615 (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx));
2616 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
2617 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
2618 LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
2619 (long long)(int)offsetof(struct llogd_body, lgd_llh_flags));
2620 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
2621 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
2622 LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
2623 (long long)(int)offsetof(struct llogd_body, lgd_index));
2624 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
2625 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
2626 LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
2627 (long long)(int)offsetof(struct llogd_body, lgd_saved_index));
2628 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
2629 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
2630 LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
2631 (long long)(int)offsetof(struct llogd_body, lgd_len));
2632 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
2633 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
2634 LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
2635 (long long)(int)offsetof(struct llogd_body, lgd_cur_offset));
2636 LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
2637 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
2638 LASSERTF(LLOG_ORIGIN_HANDLE_CREATE == 501, " found %lld\n",
2639 (long long)LLOG_ORIGIN_HANDLE_CREATE);
2640 LASSERTF(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502, " found %lld\n",
2641 (long long)LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
2642 LASSERTF(LLOG_ORIGIN_HANDLE_READ_HEADER == 503, " found %lld\n",
2643 (long long)LLOG_ORIGIN_HANDLE_READ_HEADER);
2644 LASSERTF(LLOG_ORIGIN_HANDLE_WRITE_REC == 504, " found %lld\n",
2645 (long long)LLOG_ORIGIN_HANDLE_WRITE_REC);
2646 LASSERTF(LLOG_ORIGIN_HANDLE_CLOSE == 505, " found %lld\n",
2647 (long long)LLOG_ORIGIN_HANDLE_CLOSE);
2648 LASSERTF(LLOG_ORIGIN_CONNECT == 506, " found %lld\n",
2649 (long long)LLOG_ORIGIN_CONNECT);
2650 LASSERTF(LLOG_CATINFO == 507, " found %lld\n",
2651 (long long)LLOG_CATINFO);
2653 /* Checks for struct llogd_conn_body */
2654 LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
2655 (long long)(int)sizeof(struct llogd_conn_body));
2656 LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
2657 (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen));
2658 LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
2659 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
2660 LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
2661 (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid));
2662 LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
2663 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
2664 LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
2665 (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
2666 LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
2667 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
2669 /* Checks for struct qunit_data */
2670 LASSERTF((int)sizeof(struct qunit_data) == 16, " found %lld\n",
2671 (long long)(int)sizeof(struct qunit_data));
2672 LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, " found %lld\n",
2673 (long long)(int)offsetof(struct qunit_data, qd_id));
2674 LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, " found %lld\n",
2675 (long long)(int)sizeof(((struct qunit_data *)0)->qd_id));
2676 LASSERTF((int)offsetof(struct qunit_data, qd_type) == 4, " found %lld\n",
2677 (long long)(int)offsetof(struct qunit_data, qd_type));
2678 LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_type) == 4, " found %lld\n",
2679 (long long)(int)sizeof(((struct qunit_data *)0)->qd_type));
2680 LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, " found %lld\n",
2681 (long long)(int)offsetof(struct qunit_data, qd_count));
2682 LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 4, " found %lld\n",
2683 (long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
2684 LASSERTF((int)offsetof(struct qunit_data, qd_isblk) == 12, " found %lld\n",
2685 (long long)(int)offsetof(struct qunit_data, qd_isblk));
2686 LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_isblk) == 4, " found %lld\n",
2687 (long long)(int)sizeof(((struct qunit_data *)0)->qd_isblk));