Whamcloud - gitweb
LU-1770 ptlrpc: introducing OBD_CONNECT_FLOCK_OWNER flag
[fs/lustre-release.git] / lustre / utils / wiretest.c
index f5fd813..a3a66e5 100644 (file)
@@ -234,22 +234,6 @@ void lustre_assert_wire_constants(void)
                  (unsigned)MF_SOM_AU);
         LASSERTF(MF_GETATTR_LOCK == 0x00000100UL, "found 0x%.8xUL\n",
                  (unsigned)MF_GETATTR_LOCK);
-        LASSERTF(LQUOTA_FLAGS_GRP == 1, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_GRP);
-        LASSERTF(LQUOTA_FLAGS_BLK == 2, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_BLK);
-        LASSERTF(LQUOTA_FLAGS_ADJBLK == 4, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_ADJBLK);
-        LASSERTF(LQUOTA_FLAGS_ADJINO == 8, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_ADJINO);
-        LASSERTF(LQUOTA_FLAGS_CHG_QS == 16, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_CHG_QS);
-        LASSERTF(LQUOTA_FLAGS_RECOVERY == 32, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_RECOVERY);
-        LASSERTF(LQUOTA_FLAGS_SETQUOTA == 64, "found %lld\n",
-                 (long long)LQUOTA_FLAGS_SETQUOTA);
-        LASSERTF(LQUOTA_QAQ_CREATE_LQS == 0x80000000UL, "found 0x%.8xUL\n",
-                 (unsigned)LQUOTA_QAQ_CREATE_LQS);
         LASSERTF(MDS_ATTR_MODE == 0x0000000000000001ULL, "found 0x%.16llxULL\n",
                  (long long)MDS_ATTR_MODE);
         LASSERTF(MDS_ATTR_UID == 0x0000000000000002ULL, "found 0x%.16llxULL\n",
@@ -343,6 +327,8 @@ 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);
+       CLASSERT(LUSTRE_RES_ID_QUOTA_SEQ_OFF == 2);
+       CLASSERT(LUSTRE_RES_ID_QUOTA_VER_OID_OFF == 3);
         CLASSERT(LUSTRE_RES_ID_HSH_OFF == 3);
        CLASSERT(LQUOTA_TYPE_USR == 0);
        CLASSERT(LQUOTA_TYPE_GRP == 1);
@@ -1091,8 +1077,16 @@ void lustre_assert_wire_constants(void)
                  OBD_CONNECT_EINPROGRESS);
         LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n",
                  OBD_CONNECT_GRANT_PARAM);
-        LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n",
+        LASSERTF(OBD_CONNECT_FLOCK_OWNER == 0x200000000000ULL, "found 0x%.16llxULL\n",
+                 OBD_CONNECT_FLOCK_OWNER);
+        LASSERTF(OBD_CONNECT_LVB_TYPE == 0x400000000000ULL, "found 0x%.16llxULL\n",
+                 OBD_CONNECT_LVB_TYPE);
+        LASSERTF(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL, "found 0x%.16llxULL\n",
+                 OBD_CONNECT_NANOSEC_TIME);
+       LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n",
                  OBD_CONNECT_LIGHTWEIGHT);
+       LASSERTF(OBD_CONNECT_SHORTIO == 0x2000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_SHORTIO);
         LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                  (unsigned)OBD_CKSUM_CRC32);
         LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
@@ -1483,10 +1477,10 @@ void lustre_assert_wire_constants(void)
                  (long long)(int)offsetof(struct obd_statfs, os_state));
         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, "found %lld\n",
                  (long long)(int)sizeof(((struct obd_statfs *)0)->os_state));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare1) == 108, "found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare1));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare1) == 4, "found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare1));
+       LASSERTF((int)offsetof(struct obd_statfs, os_fprecreated) == 108, "found %lld\n",
+                (long long)(int)offsetof(struct obd_statfs, os_fprecreated));
+       LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fprecreated) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct obd_statfs *)0)->os_fprecreated));
         LASSERTF((int)offsetof(struct obd_statfs, os_spare2) == 112, "found %lld\n",
                  (long long)(int)offsetof(struct obd_statfs, os_spare2));
         LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare2) == 4, "found %lld\n",
@@ -1544,6 +1538,11 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(union lquota_id) == 16, "found %lld\n",
                  (long long)(int)sizeof(union lquota_id));
 
+       LASSERTF(QUOTABLOCK_BITS == 10, "found %lld\n",
+                (long long)QUOTABLOCK_BITS);
+       LASSERTF(QUOTABLOCK_SIZE == 1024, "found %lld\n",
+                (long long)QUOTABLOCK_SIZE);
+
         /* Checks for struct obd_quotactl */
         LASSERTF((int)sizeof(struct obd_quotactl) == 112, "found %lld\n",
                  (long long)(int)sizeof(struct obd_quotactl));
@@ -3087,6 +3086,64 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, "found %lld\n",
                  (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
 
+        /* Checks for struct lquota_lvb */
+        LASSERTF((int)sizeof(struct lquota_lvb) == 40, "found %lld\n",
+                 (long long)(int)sizeof(struct lquota_lvb));
+        LASSERTF((int)offsetof(struct lquota_lvb, lvb_flags) == 0, "found %lld\n",
+                 (long long)(int)offsetof(struct lquota_lvb, lvb_flags));
+        LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_flags) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_flags));
+        LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_may_rel) == 8, "found %lld\n",
+                 (long long)(int)offsetof(struct lquota_lvb, lvb_id_may_rel));
+        LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel));
+        LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_rel) == 16, "found %lld\n",
+                 (long long)(int)offsetof(struct lquota_lvb, lvb_id_rel));
+        LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel));
+        LASSERTF(LQUOTA_FL_EDQUOT == 1, "found %lld\n",
+                 (long long)LQUOTA_FL_EDQUOT);
+        LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_qunit) == 24, "found %lld\n",
+                 (long long)(int)offsetof(struct lquota_lvb, lvb_id_qunit));
+        LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit));
+        LASSERTF((int)offsetof(struct lquota_lvb, lvb_pad1) == 32, "found %lld\n",
+                 (long long)(int)offsetof(struct lquota_lvb, lvb_pad1));
+        LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_pad1) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_pad1));
+
+        /* Checks for struct ldlm_gl_lquota_desc */
+        LASSERTF((int)sizeof(struct ldlm_gl_lquota_desc) == 64, "found %lld\n",
+                 (long long)(int)sizeof(struct ldlm_gl_lquota_desc));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_id) == 0, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_id));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id) == 16, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_flags) == 16, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_flags));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_ver) == 24, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_ver));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit) == 32, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit) == 40, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1) == 48, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1));
+        LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2) == 56, "found %lld\n",
+                 (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2));
+        LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2) == 8, "found %lld\n",
+                 (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2));
+
         /* Checks for struct mgs_send_param */
         LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
                  (long long)(int)sizeof(struct mgs_send_param));
@@ -3668,30 +3725,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap) == 32, "found %lld\n",
                  (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap));
 
-        /* Checks for struct qunit_data */
-        LASSERTF((int)sizeof(struct qunit_data) == 32, "found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data));
-        LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, "found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, "found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data, qd_flags) == 4, "found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_flags));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_flags) == 4, "found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_flags));
-        LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, "found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
-        LASSERTF((int)offsetof(struct qunit_data, qd_qunit) == 16, "found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_qunit));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_qunit) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_qunit));
-        LASSERTF((int)offsetof(struct qunit_data, padding) == 24, "found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, padding));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->padding) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->padding));
-
         /* Checks for struct quota_body */
         LASSERTF((int)sizeof(struct quota_body) == 112, "found %lld\n",
                  (long long)(int)sizeof(struct quota_body));
@@ -3736,30 +3769,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct quota_body *)0)->qb_padding1[4]) == 8, "found %lld\n",
                  (long long)(int)sizeof(((struct quota_body *)0)->qb_padding1[4]));
 
-        /* Checks for struct quota_adjust_qunit */
-        LASSERTF((int)sizeof(struct quota_adjust_qunit) == 32, "found %lld\n",
-                 (long long)(int)sizeof(struct quota_adjust_qunit));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_flags) == 0, "found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_flags));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags) == 4, "found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_id) == 4, "found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_id));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id) == 4, "found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz) == 8, "found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz) == 16, "found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, padding1) == 24, "found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, padding1));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->padding1) == 8, "found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->padding1));
-
         /* Checks for struct mgs_target_info */
         LASSERTF((int)sizeof(struct mgs_target_info) == 4544, "found %lld\n",
                  (long long)(int)sizeof(struct mgs_target_info));