Whamcloud - gitweb
LU-1267 lfsck: framework (3) for MDT-OST consistency
[fs/lustre-release.git] / lustre / utils / wiretest.c
index 31e7cd4..1dee792 100644 (file)
@@ -58,13 +58,13 @@ int main()
 
         return ret;
 }
+
 void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * 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)  */
-
+         * running on Linux testnode 2.6.32 #3 SMP Thu Sep 13 12:42:57 PDT 2012 x86_64 x86_64 x86_64 
+         * with gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)  */
 
        /* Constants... */
        LASSERTF(PTL_RPC_MSG_REQUEST == 4711, "found %lld\n",
@@ -286,9 +286,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);
@@ -2904,35 +2906,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));
@@ -4544,5 +4517,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));
 }