Whamcloud - gitweb
b=22755 Don't consume grant twice on recoverable resend
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index 4a8a879..81fe0ff 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -65,7 +65,7 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux vl1 2.6.18-prep #2 SMP Wed Jul 22 20:53:11 CDT 2009 x86_64 x86_64 x86_64 
+         * running on Linux vl1 2.6.18-prep #3 SMP Mon Apr 19 06:11:00 CDT 2010 x86_64 x86_64 x86_64 
          * with gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) */
 
 
@@ -501,14 +501,14 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct obdo, o_valid));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, " found %lld\n",
                  (long long)(int)sizeof(((struct obdo *)0)->o_valid));
-        LASSERTF((int)offsetof(struct obdo, o_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_id));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_id));
-        LASSERTF((int)offsetof(struct obdo, o_seq) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_seq));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_seq) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_seq));
+        LASSERTF((int)offsetof(struct obdo, o_oi.oi_id) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_oi.oi_id));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_oi.oi_id) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_oi.oi_id));
+        LASSERTF((int)offsetof(struct obdo, o_oi.oi_seq) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_oi.oi_seq));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_oi.oi_seq) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_oi.oi_seq));
         LASSERTF((int)offsetof(struct obdo, o_parent_seq) == 24, " found %lld\n",
                  (long long)(int)offsetof(struct obdo, o_parent_seq));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_parent_seq) == 8, " found %lld\n",
@@ -589,10 +589,14 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct obdo, o_lcookie));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_lcookie) == 32, " found %lld\n",
                  (long long)(int)sizeof(((struct obdo *)0)->o_lcookie));
-        LASSERTF((int)offsetof(struct obdo, o_padding_2) == 168, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_padding_2));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_2) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_2));
+        LASSERTF((int)offsetof(struct obdo, o_uid_h) == 168, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_uid_h));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_uid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_uid_h));
+        LASSERTF((int)offsetof(struct obdo, o_gid_h) == 172, " found %lld\n",
+                 (long long)(int)offsetof(struct obdo, o_gid_h));
+        LASSERTF((int)sizeof(((struct obdo *)0)->o_gid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct obdo *)0)->o_gid_h));
         LASSERTF((int)offsetof(struct obdo, o_padding_3) == 176, " found %lld\n",
                  (long long)(int)offsetof(struct obdo, o_padding_3));
         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 8, " found %lld\n",
@@ -657,6 +661,8 @@ void lustre_assert_wire_constants(void)
         CLASSERT(OBD_FL_CKSUM_CRC32 == 4096);
         CLASSERT(OBD_FL_CKSUM_ADLER == 8192);
         CLASSERT(OBD_FL_SHRINK_GRANT == 131072);
+        CLASSERT(OBD_FL_MMAP == (0x00040000));
+        CLASSERT(OBD_FL_RECOV_RESEND == (0x00080000));
         CLASSERT(OBD_CKSUM_CRC32 == 1);
         CLASSERT(OBD_CKSUM_ADLER == 2);
 
@@ -1356,14 +1362,14 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct mdt_rec_create, cr_bias));
         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_bias) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_bias));
-        LASSERTF((int)offsetof(struct mdt_rec_create, cr_flags) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct mdt_rec_create, cr_flags));
-        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_flags));
-        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_2) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_2));
-        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_flags_l) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_flags_l));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_flags_l) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_flags_l));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_flags_h) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_flags_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_flags_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_flags_h));
         LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_3) == 128, " found %lld\n",
                  (long long)(int)offsetof(struct mdt_rec_create, cr_padding_3));
         LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_3) == 4, " found %lld\n",
@@ -2042,6 +2048,10 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct llog_create_rec, padding));
         LASSERTF((int)sizeof(((struct llog_create_rec *)0)->padding) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct llog_create_rec *)0)->padding));
+        LASSERTF((int)offsetof(struct llog_create_rec, lcr_tail) == 48, " found %lld\n",
+                 (long long)(int)offsetof(struct llog_create_rec, lcr_tail));
+        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_tail) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_tail));
 
         /* Checks for struct llog_orphan_rec */
         LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",