Whamcloud - gitweb
LU-1267 lfsck: framework (3) for MDT-OST consistency
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index 9d6a17b..f6569b3 100644 (file)
@@ -54,9 +54,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * 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)  */
-
+         * running on Linux deva 2.6.32-358.18.1.el6_lustre.gdf685d2.x86_64 #1 SMP Sat Aug 31 20:41:4
+         * with gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)  */
 
        /* Constants... */
        LASSERTF(PTL_RPC_MSG_REQUEST == 4711, "found %lld\n",
@@ -278,9 +277,11 @@ void lustre_assert_wire_constants(void)
                        (long long)MDS_ATTR_BLOCKS);
        LASSERTF(FLD_QUERY == 900, "found %lld\n",
                 (long long)FLD_QUERY);
+       LASSERTF(FLD_READ == 901, "found %lld\n",
+                (long long)FLD_READ);
        LASSERTF(FLD_FIRST_OPC == 900, "found %lld\n",
                 (long long)FLD_FIRST_OPC);
-       LASSERTF(FLD_LAST_OPC == 901, "found %lld\n",
+       LASSERTF(FLD_LAST_OPC == 902, "found %lld\n",
                 (long long)FLD_LAST_OPC);
        LASSERTF(SEQ_QUERY == 700, "found %lld\n",
                 (long long)SEQ_QUERY);
@@ -1159,7 +1160,9 @@ void lustre_assert_wire_constants(void)
        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);
+                OBD_CONNECT_FLOCK_DEAD);
+       LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_OPEN_BY_FID);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
@@ -1398,6 +1401,8 @@ void lustre_assert_wire_constants(void)
        CLASSERT(OBD_FL_MMAP == 0x00040000);
        CLASSERT(OBD_FL_RECOV_RESEND == 0x00080000);
        CLASSERT(OBD_FL_NOSPC_BLK == 0x00100000);
+       CLASSERT(OBD_FL_FLUSH == 0x00200000);
+       CLASSERT(OBD_FL_SHORT_IO == 0x00400000);
        CLASSERT(OBD_FL_LOCAL_MASK == 0xf0000000);
 
        /* Checks for struct lov_ost_data_v1 */
@@ -2892,35 +2897,6 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct lmv_desc *)0)->ld_uuid) == 40, "found %lld\n",
                 (long long)(int)sizeof(((struct lmv_desc *)0)->ld_uuid));
 
-       /* Checks for struct lmv_stripe_md */
-       LASSERTF((int)sizeof(struct lmv_stripe_md) == 32, "found %lld\n",
-                (long long)(int)sizeof(struct lmv_stripe_md));
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_magic) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_magic));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_magic) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_magic));
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_count) == 4, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_count));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_count) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_count));
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_master) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_master));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_master) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_master));
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_padding) == 12, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_padding));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_padding) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_padding));
-       CLASSERT(LOV_MAXPOOLNAME == 16);
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_pool_name[16]) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_pool_name[16]));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_pool_name[16]) == 1, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_pool_name[16]));
-       LASSERTF((int)offsetof(struct lmv_stripe_md, mea_ids[0]) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct lmv_stripe_md, mea_ids[0]));
-       LASSERTF((int)sizeof(((struct lmv_stripe_md *)0)->mea_ids[0]) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct lmv_stripe_md *)0)->mea_ids[0]));
-
        /* Checks for struct lov_desc */
        LASSERTF((int)sizeof(struct lov_desc) == 88, "found %lld\n",
                 (long long)(int)sizeof(struct lov_desc));
@@ -4532,5 +4508,77 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct update, u_bufs));
        LASSERTF((int)sizeof(((struct update *)0)->u_bufs) == 0, "found %lld\n",
                 (long long)(int)sizeof(((struct update *)0)->u_bufs));
+
+       /* Checks for struct lfsck_request */
+       LASSERTF((int)sizeof(struct lfsck_request) == 64, "found %lld\n",
+                (long long)(int)sizeof(struct lfsck_request));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_event) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_event));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_event) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_event));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_index) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_index));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_index) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_index));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_flags) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_flags));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_flags));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_valid) == 12, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_valid));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_valid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_valid));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_speed) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_speed));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_speed) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_speed));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_version) == 20, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_version));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_version) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_version));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_active) == 22, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_active));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_active) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_active));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_param) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_param));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_param) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_param));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_async_windows) == 26, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_async_windows));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_async_windows) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_async_windows));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 28, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_padding_1));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_1) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_1));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_fid) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_fid));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 48, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_padding_2));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_2) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_2));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_3) == 56, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_padding_3));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_3) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_3));
+
+       /* Checks for struct lfsck_reply */
+       LASSERTF((int)sizeof(struct lfsck_reply) == 16, "found %lld\n",
+                (long long)(int)sizeof(struct lfsck_reply));
+       LASSERTF((int)offsetof(struct lfsck_reply, lr_status) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_reply, lr_status));
+       LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_status) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_status));
+       LASSERTF((int)offsetof(struct lfsck_reply, lr_padding_1) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_reply, lr_padding_1));
+       LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_padding_1) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_padding_1));
+       LASSERTF((int)offsetof(struct lfsck_reply, lr_padding_2) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_reply, lr_padding_2));
+       LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_padding_2) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_padding_2));
 }