Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / utils / wiretest.c
index 4eff64f..4360b19 100644 (file)
@@ -153,6 +153,8 @@ void lustre_assert_wire_constants(void)
                  (long long)MGS_TARGET_REG);
         LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
                  (long long)MGS_TARGET_DEL);
+        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
+                 (long long)MGS_SET_INFO);
         LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
                  (long long)DISP_IT_EXECD);
         LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
@@ -225,6 +227,8 @@ void lustre_assert_wire_constants(void)
                  (long long)MGS_TARGET_REG);
         LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
                  (long long)MGS_TARGET_DEL);
+        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
+                 (long long)MGS_SET_INFO);
         /* Sizes and Offsets */
 
         /* Checks for struct obd_uuid */
@@ -484,6 +488,7 @@ void lustre_assert_wire_constants(void)
         CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x02000000ULL);
         CLASSERT(OBD_CONNECT_MDS_MDS == 0x04000000ULL);
         CLASSERT(OBD_CONNECT_REAL == 0x08000000ULL);
+        CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
 
         /* Checks for struct obdo */
         LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
@@ -1161,6 +1166,22 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
         LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
+        CLASSERT(MDS_ATTR_MODE == 1);
+        CLASSERT(MDS_ATTR_UID == 2);
+        CLASSERT(MDS_ATTR_GID == 4);
+        CLASSERT(MDS_ATTR_SIZE == 8);
+        CLASSERT(MDS_ATTR_ATIME == 16);
+        CLASSERT(MDS_ATTR_MTIME == 32);
+        CLASSERT(MDS_ATTR_CTIME == 64);
+        CLASSERT(MDS_ATTR_ATIME_SET == 128);
+        CLASSERT(MDS_ATTR_MTIME_SET == 256);
+        CLASSERT(MDS_ATTR_FORCE == 512);
+        CLASSERT(MDS_ATTR_ATTR_FLAG == 1024);
+        CLASSERT(MDS_ATTR_KILL_SUID == 2048);
+        CLASSERT(MDS_ATTR_KILL_SGID == 4096);
+        CLASSERT(MDS_ATTR_CTIME_SET == 8192);
+        CLASSERT(MDS_ATTR_FROM_OPEN == 16384);
+        CLASSERT(MDS_ATTR_BLOCKS == 32768);
 
         /* Checks for struct mds_rec_create */
         LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
@@ -2120,5 +2141,36 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct lustre_disk_data, ldd_params));
         LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
                  (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
+
+#ifdef LIBLUSTRE_POSIX_ACL
+        /* Checks for type posix_acl_xattr_entry */
+        LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, " found %lld\n",
+                 (long long)(int)sizeof(posix_acl_xattr_entry));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_tag) == 0, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_tag));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_tag) == 2, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_tag));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_perm) == 2, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_perm));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_perm) == 2, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_perm));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_id) == 4, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_id));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_id) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_id));
+
+        /* Checks for type posix_acl_xattr_header */
+        LASSERTF((int)sizeof(posix_acl_xattr_header) == 4, " found %lld\n",
+                 (long long)(int)sizeof(posix_acl_xattr_header));
+        LASSERTF((int)offsetof(posix_acl_xattr_header, a_version) == 0, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_header, a_version));
+        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_version) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_version));
+        LASSERTF((int)offsetof(posix_acl_xattr_header, a_entries) == 4, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_header, a_entries));
+        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries));
+#endif
+
 }