Whamcloud - gitweb
LU-1187 osp: add osp_md_object for remote directory.
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index b14eb56..ff1f7bd 100644 (file)
 #include <obd_class.h>
 #include <lustre_net.h>
 #include <lustre_disk.h>
+
 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-279.2.1.el6-head #0 SMP Thu Aug 9 23:25:09 CEST 2012 x
-         * with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)  */
+         * running on Linux testnode 2.6.32-279.5.1.el6_lustre.g53f705f.x86_64 #1 SMP Mon Oct 8 05:12
+         * with gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)  */
 
 
        /* Constants... */
@@ -333,6 +334,10 @@ void lustre_assert_wire_constants(void)
        CLASSERT(LDLM_MAX_TYPE == 14);
        CLASSERT(LUSTRE_RES_ID_SEQ_OFF == 0);
        CLASSERT(LUSTRE_RES_ID_VER_OID_OFF == 1);
+       LASSERTF(UPDATE_OBJ == 1000, "found %lld\n",
+                (long long)UPDATE_OBJ);
+       LASSERTF(UPDATE_LAST_OPC == 1001, "found %lld\n",
+                (long long)UPDATE_LAST_OPC);
        CLASSERT(LUSTRE_RES_ID_QUOTA_SEQ_OFF == 2);
        CLASSERT(LUSTRE_RES_ID_QUOTA_VER_OID_OFF == 3);
        CLASSERT(LUSTRE_RES_ID_HSH_OFF == 3);
@@ -433,6 +438,30 @@ void lustre_assert_wire_constants(void)
                (unsigned)LMAC_HSM);
        LASSERTF(LMAC_SOM == 0x00000002UL, "found 0x%.8xUL\n",
                (unsigned)LMAC_SOM);
+       LASSERTF(OBJ_CREATE == 1, "found %lld\n",
+                (long long)OBJ_CREATE);
+       LASSERTF(OBJ_DESTROY == 2, "found %lld\n",
+                (long long)OBJ_DESTROY);
+       LASSERTF(OBJ_REF_ADD == 3, "found %lld\n",
+                (long long)OBJ_REF_ADD);
+       LASSERTF(OBJ_REF_DEL == 4, "found %lld\n",
+                (long long)OBJ_REF_DEL);
+       LASSERTF(OBJ_ATTR_SET == 5, "found %lld\n",
+                (long long)OBJ_ATTR_SET);
+       LASSERTF(OBJ_ATTR_GET == 6, "found %lld\n",
+                (long long)OBJ_ATTR_GET);
+       LASSERTF(OBJ_XATTR_SET == 7, "found %lld\n",
+                (long long)OBJ_XATTR_SET);
+       LASSERTF(OBJ_XATTR_GET == 8, "found %lld\n",
+                (long long)OBJ_XATTR_GET);
+       LASSERTF(OBJ_INDEX_LOOKUP == 9, "found %lld\n",
+                (long long)OBJ_INDEX_LOOKUP);
+       LASSERTF(OBJ_INDEX_LOOKUP == 9, "found %lld\n",
+                (long long)OBJ_INDEX_LOOKUP);
+       LASSERTF(OBJ_INDEX_INSERT == 10, "found %lld\n",
+                (long long)OBJ_INDEX_INSERT);
+       LASSERTF(OBJ_INDEX_DELETE == 11, "found %lld\n",
+                (long long)OBJ_INDEX_DELETE);
 
        /* Checks for struct som_attrs */
        LASSERTF((int)sizeof(struct som_attrs) == 40, "found %lld\n",
@@ -4422,5 +4451,61 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct hsm_user_request, hur_user_item));
        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 update_buf */
+       LASSERTF((int)sizeof(struct update_buf) == 8, "found %lld\n",
+                (long long)(int)sizeof(struct update_buf));
+       LASSERTF((int)offsetof(struct update_buf, ub_magic) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct update_buf, ub_magic));
+       LASSERTF((int)sizeof(((struct update_buf *)0)->ub_magic) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update_buf *)0)->ub_magic));
+       LASSERTF((int)offsetof(struct update_buf, ub_count) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct update_buf, ub_count));
+       LASSERTF((int)sizeof(((struct update_buf *)0)->ub_count) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update_buf *)0)->ub_count));
+       LASSERTF((int)offsetof(struct update_buf, ub_bufs) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct update_buf, ub_bufs));
+       LASSERTF((int)sizeof(((struct update_buf *)0)->ub_bufs) == 0, "found %lld\n",
+                (long long)(int)sizeof(((struct update_buf *)0)->ub_bufs));
+
+       /* Checks for struct update_reply */
+       LASSERTF((int)sizeof(struct update_reply) == 8, "found %lld\n",
+                (long long)(int)sizeof(struct update_reply));
+       LASSERTF((int)offsetof(struct update_reply, ur_version) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct update_reply, ur_version));
+       LASSERTF((int)sizeof(((struct update_reply *)0)->ur_version) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update_reply *)0)->ur_version));
+       LASSERTF((int)offsetof(struct update_reply, ur_count) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct update_reply, ur_count));
+       LASSERTF((int)sizeof(((struct update_reply *)0)->ur_count) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update_reply *)0)->ur_count));
+       LASSERTF((int)offsetof(struct update_reply, ur_lens) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct update_reply, ur_lens));
+       LASSERTF((int)sizeof(((struct update_reply *)0)->ur_lens) == 0, "found %lld\n",
+                (long long)(int)sizeof(((struct update_reply *)0)->ur_lens));
+
+       /* Checks for struct update */
+       LASSERTF((int)sizeof(struct update) == 56, "found %lld\n",
+                (long long)(int)sizeof(struct update));
+       LASSERTF((int)offsetof(struct update, u_type) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct update, u_type));
+       LASSERTF((int)sizeof(((struct update *)0)->u_type) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update *)0)->u_type));
+       LASSERTF((int)offsetof(struct update, u_padding) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct update, u_padding));
+       LASSERTF((int)sizeof(((struct update *)0)->u_padding) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct update *)0)->u_padding));
+       LASSERTF((int)offsetof(struct update, u_fid) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct update, u_fid));
+       LASSERTF((int)sizeof(((struct update *)0)->u_fid) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct update *)0)->u_fid));
+       LASSERTF((int)offsetof(struct update, u_lens) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct update, u_lens));
+       LASSERTF((int)sizeof(((struct update *)0)->u_lens) == 32, "found %lld\n",
+                (long long)(int)sizeof(((struct update *)0)->u_lens));
+       LASSERTF((int)offsetof(struct update, u_bufs) == 56, "found %lld\n",
+                (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));
 }