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