Whamcloud - gitweb
LU-2139 osc: Use SOFT_SYNC to urge server commit
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index d5b4386..9d6a17b 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -54,8 +54,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux node7 2.6.32 #1 SMP Tue Dec 18 04:02:25 MSK 2012 x86_64 x86_64 x86_64 GNU
-         * with gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)  */
+         * running on Linux centos6-bis 2.6.32-358.0.1.el6-head #3 SMP Wed Apr 17 17:37:43 CEST 2013 
+         * with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)  */
 
 
        /* Constants... */
@@ -437,6 +437,10 @@ void lustre_assert_wire_constants(void)
                (unsigned)LMAC_HSM);
        LASSERTF(LMAC_SOM == 0x00000002UL, "found 0x%.8xUL\n",
                (unsigned)LMAC_SOM);
+       LASSERTF(LMAC_NOT_IN_OI == 0x00000004UL, "found 0x%.8xUL\n",
+               (unsigned)LMAC_NOT_IN_OI);
+       LASSERTF(LMAC_FID_ON_OST == 0x00000008UL, "found 0x%.8xUL\n",
+               (unsigned)LMAC_FID_ON_OST);
        LASSERTF(OBJ_CREATE == 1, "found %lld\n",
                 (long long)OBJ_CREATE);
        LASSERTF(OBJ_DESTROY == 2, "found %lld\n",
@@ -1154,6 +1158,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_SHORTIO);
        LASSERTF(OBD_CONNECT_PINGLESS == 0x4000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_PINGLESS);
+       LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_FLOCK_DEAD);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
@@ -1340,6 +1346,8 @@ void lustre_assert_wire_constants(void)
                 OBD_MD_REINT);
        LASSERTF(OBD_MD_MEA == (0x0000000400000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_MEA);
+       LASSERTF(OBD_MD_TSTATE == (0x0000000800000000ULL), "found 0x%.16llxULL\n",
+                OBD_MD_TSTATE);
        LASSERTF(OBD_MD_FLXATTR == (0x0000001000000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLXATTR);
        LASSERTF(OBD_MD_FLXATTRLS == (0x0000002000000000ULL), "found 0x%.16llxULL\n",
@@ -1859,6 +1867,12 @@ void lustre_assert_wire_constants(void)
                OBD_BRW_ASYNC);
        LASSERTF(OBD_BRW_MEMALLOC == 0x800, "found 0x%.8x\n",
                OBD_BRW_MEMALLOC);
+       LASSERTF(OBD_BRW_OVER_USRQUOTA == 0x1000, "found 0x%.8x\n",
+               OBD_BRW_OVER_USRQUOTA);
+       LASSERTF(OBD_BRW_OVER_GRPQUOTA == 0x2000, "found 0x%.8x\n",
+               OBD_BRW_OVER_GRPQUOTA);
+       LASSERTF(OBD_BRW_SOFT_SYNC == 0x4000, "found 0x%.8x\n",
+               OBD_BRW_SOFT_SYNC);
 
        /* Checks for struct ost_body */
        LASSERTF((int)sizeof(struct ost_body) == 208, "found %lld\n",
@@ -1923,10 +1937,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_body, blocks));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->blocks) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_body *)0)->blocks));
-       LASSERTF((int)offsetof(struct mdt_body, unused1) == 96, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, unused1));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->unused1) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->unused1));
+       LASSERTF((int)offsetof(struct mdt_body, t_state) == 96, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, t_state));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->t_state) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->t_state));
        LASSERTF((int)offsetof(struct mdt_body, fsuid) == 104, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_body, fsuid));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->fsuid) == 4, "found %lld\n",
@@ -2817,14 +2831,14 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_rec_reint, rr_flags));
        LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_flags) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_rec_reint *)0)->rr_flags));
-       LASSERTF((int)offsetof(struct mdt_rec_reint, rr_padding_2) == 124, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_rec_reint, rr_padding_2));
-       LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_padding_2) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_rec_reint *)0)->rr_padding_2));
-       LASSERTF((int)offsetof(struct mdt_rec_reint, rr_padding_3) == 128, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_rec_reint, rr_padding_3));
-       LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_padding_3) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_rec_reint *)0)->rr_padding_3));
+       LASSERTF((int)offsetof(struct mdt_rec_reint, rr_flags_h) == 124, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_reint, rr_flags_h));
+       LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_flags_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_reint *)0)->rr_flags_h));
+       LASSERTF((int)offsetof(struct mdt_rec_reint, rr_umask) == 128, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_reint, rr_umask));
+       LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_umask) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_reint *)0)->rr_umask));
        LASSERTF((int)offsetof(struct mdt_rec_reint, rr_padding_4) == 132, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_rec_reint, rr_padding_4));
        LASSERTF((int)sizeof(((struct mdt_rec_reint *)0)->rr_padding_4) == 4, "found %lld\n",
@@ -4423,6 +4437,46 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct hsm_user_request *)0)->hur_user_item) == 0, "found %lld\n",
                 (long long)(int)sizeof(((struct hsm_user_request *)0)->hur_user_item));
 
+       /* Checks for struct hsm_user_import */
+       LASSERTF((int)sizeof(struct hsm_user_import) == 48, "found %lld\n",
+                (long long)(int)sizeof(struct hsm_user_import));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_size) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_size));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_size) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_size));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_uid) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_uid));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_uid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_uid));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_gid) == 36, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_gid));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_gid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_gid));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_mode) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_mode));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_mode) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_mode));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_atime) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_atime));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_atime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_atime));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_atime_ns) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_atime_ns));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_atime_ns) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_atime_ns));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_mtime) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_mtime));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_mtime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_mtime));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_mtime_ns) == 28, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_mtime_ns));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_mtime_ns) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_mtime_ns));
+       LASSERTF((int)offsetof(struct hsm_user_import, hui_archive_id) == 44, "found %lld\n",
+                (long long)(int)offsetof(struct hsm_user_import, hui_archive_id));
+       LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_archive_id) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct hsm_user_import *)0)->hui_archive_id));
+
        /* Checks for struct update_buf */
        LASSERTF((int)sizeof(struct update_buf) == 8, "found %lld\n",
                 (long long)(int)sizeof(struct update_buf));