Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Landing b_bug974 onto HEAD (20040213_1538).
[fs/lustre-release.git]
/
lustre
/
utils
/
wiretest.c
diff --git
a/lustre/utils/wiretest.c
b/lustre/utils/wiretest.c
index
3535aaa
..
9f8bcd0
100644
(file)
--- a/
lustre/utils/wiretest.c
+++ b/
lustre/utils/wiretest.c
@@
-14,11
+14,18
@@
int main()
{
lustre_assert_wire_constants();
+ if (ret == 0)
+ printf("wire constants OK\n");
+
return ret;
}
+
void lustre_assert_wire_constants(void)
{
- /* Wire protocol assertions generated by 'wirecheck' */
+ /* Wire protocol assertions generated by 'wirecheck'
+ * running on Linux schnapps.adilger.int 2.4.22-l32 #4 Thu Jan 8 14:32:57 MST 2004 i686 i686
+ * with gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) */
+
/* Constants... */
LASSERT(PTLRPC_MSG_MAGIC == 0x0BD00BD0);
@@
-157,8
+164,8
@@
void lustre_assert_wire_constants(void)
LASSERT((int)sizeof(((struct obdo *)0)->o_size) == 8);
LASSERT(offsetof(struct obdo, o_blocks) == 48);
LASSERT((int)sizeof(((struct obdo *)0)->o_blocks) == 8);
- LASSERT(offsetof(struct obdo, o_
rdev
) == 56);
- LASSERT((int)sizeof(((struct obdo *)0)->o_
rdev
) == 8);
+ LASSERT(offsetof(struct obdo, o_
grant
) == 56);
+ LASSERT((int)sizeof(((struct obdo *)0)->o_
grant
) == 8);
LASSERT(offsetof(struct obdo, o_blksize) == 64);
LASSERT((int)sizeof(((struct obdo *)0)->o_blksize) == 4);
LASSERT(offsetof(struct obdo, o_mode) == 68);
@@
-175,8
+182,8
@@
void lustre_assert_wire_constants(void)
LASSERT((int)sizeof(((struct obdo *)0)->o_generation) == 4);
LASSERT(offsetof(struct obdo, o_valid) == 92);
LASSERT((int)sizeof(((struct obdo *)0)->o_valid) == 4);
- LASSERT(offsetof(struct obdo, o_
obdflags
) == 96);
- LASSERT((int)sizeof(((struct obdo *)0)->o_
obdflags
) == 4);
+ LASSERT(offsetof(struct obdo, o_
misc
) == 96);
+ LASSERT((int)sizeof(((struct obdo *)0)->o_
misc
) == 4);
LASSERT(offsetof(struct obdo, o_easize) == 100);
LASSERT((int)sizeof(((struct obdo *)0)->o_easize) == 4);
LASSERT(offsetof(struct obdo, o_inline) == 104);
@@
-193,7
+200,6
@@
void lustre_assert_wire_constants(void)
LASSERT(OBD_MD_FLUID == 512);
LASSERT(OBD_MD_FLGID == 1024);
LASSERT(OBD_MD_FLFLAGS == 2048);
- LASSERT(OBD_MD_FLOBDFLG == 4096);
LASSERT(OBD_MD_FLNLINK == 8192);
LASSERT(OBD_MD_FLGENER == 16384);
LASSERT(OBD_MD_FLINLINE == 32768);
@@
-211,6
+217,7
@@
void lustre_assert_wire_constants(void)
LASSERT(OBD_FL_DELORPHAN == 4);
LASSERT(OBD_FL_NORPC == 8);
LASSERT(OBD_FL_IDONLY == 16);
+ LASSERT(OBD_FL_RECREATE_OBJS == 32);
/* Checks for struct lov_mds_md_v1 */
LASSERT((int)sizeof(struct lov_mds_md_v1) == 32);
@@
-286,7
+293,6
@@
void lustre_assert_wire_constants(void)
LASSERT((int)sizeof(((struct niobuf_remote *)0)->flags) == 4);
LASSERT(OBD_BRW_READ == 1);
LASSERT(OBD_BRW_WRITE == 2);
- LASSERT(OBD_BRW_CREATE == 4);
LASSERT(OBD_BRW_SYNC == 8);
LASSERT(OBD_BRW_FROM_GRANT == 32);
@@
-653,6
+659,75
@@
void lustre_assert_wire_constants(void)
LASSERT(offsetof(struct llog_rec_tail, lrt_index) == 4);
LASSERT((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4);
+ /* Checks for struct llog_logid_rec */
+ LASSERT((int)sizeof(struct llog_logid_rec) == 48);
+ LASSERT(offsetof(struct llog_logid_rec, lid_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16);
+ LASSERT(offsetof(struct llog_logid_rec, lid_id) == 16);
+ LASSERT((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20);
+ LASSERT(offsetof(struct llog_logid_rec, lid_tail) == 40);
+ LASSERT((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8);
+
+ /* Checks for struct llog_create_rec */
+ LASSERT((int)sizeof(struct llog_create_rec) == 56);
+ LASSERT(offsetof(struct llog_create_rec, lcr_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16);
+ LASSERT(offsetof(struct llog_create_rec, lcr_fid) == 16);
+ LASSERT((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16);
+ LASSERT(offsetof(struct llog_create_rec, lcr_oid) == 32);
+ LASSERT((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8);
+ LASSERT(offsetof(struct llog_create_rec, lcr_ogen) == 40);
+ LASSERT((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4);
+
+ /* Checks for struct llog_orphan_rec */
+ LASSERT((int)sizeof(struct llog_orphan_rec) == 40);
+ LASSERT(offsetof(struct llog_orphan_rec, lor_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16);
+ LASSERT(offsetof(struct llog_orphan_rec, lor_oid) == 16);
+ LASSERT((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8);
+ LASSERT(offsetof(struct llog_orphan_rec, lor_ogen) == 24);
+ LASSERT((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4);
+ LASSERT(offsetof(struct llog_orphan_rec, lor_tail) == 32);
+ LASSERT((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8);
+
+ /* Checks for struct llog_unlink_rec */
+ LASSERT((int)sizeof(struct llog_unlink_rec) == 40);
+ LASSERT(offsetof(struct llog_unlink_rec, lur_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16);
+ LASSERT(offsetof(struct llog_unlink_rec, lur_oid) == 16);
+ LASSERT((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8);
+ LASSERT(offsetof(struct llog_unlink_rec, lur_ogen) == 24);
+ LASSERT((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4);
+ LASSERT(offsetof(struct llog_unlink_rec, lur_tail) == 32);
+ LASSERT((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8);
+
+ /* Checks for struct llog_size_change_rec */
+ LASSERT((int)sizeof(struct llog_size_change_rec) == 48);
+ LASSERT(offsetof(struct llog_size_change_rec, lsc_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16);
+ LASSERT(offsetof(struct llog_size_change_rec, lsc_fid) == 16);
+ LASSERT((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16);
+ LASSERT(offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32);
+ LASSERT((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4);
+ LASSERT(offsetof(struct llog_size_change_rec, lsc_tail) == 40);
+ LASSERT((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8);
+
+ /* Checks for struct llog_gen */
+ LASSERT((int)sizeof(struct llog_gen) == 16);
+ LASSERT(offsetof(struct llog_gen, mnt_cnt) == 0);
+ LASSERT((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8);
+ LASSERT(offsetof(struct llog_gen, conn_cnt) == 8);
+ LASSERT((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8);
+
+ /* Checks for struct llog_gen_rec */
+ LASSERT((int)sizeof(struct llog_gen_rec) == 40);
+ LASSERT(offsetof(struct llog_gen_rec, lgr_hdr) == 0);
+ LASSERT((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16);
+ LASSERT(offsetof(struct llog_gen_rec, lgr_gen) == 16);
+ LASSERT((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16);
+ LASSERT(offsetof(struct llog_gen_rec, lgr_tail) == 32);
+ LASSERT((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8);
+
/* Checks for struct llog_log_hdr */
LASSERT((int)sizeof(struct llog_log_hdr) == 4096);
LASSERT(offsetof(struct llog_log_hdr, llh_hdr) == 0);