Whamcloud - gitweb
LU-5319 ptlrpc: Add OBD_CONNECT_MULTIMODRPCS flag
[fs/lustre-release.git] / lustre / utils / wiretest.c
index 006bdf6..0d69df8 100644 (file)
@@ -795,7 +795,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding) == 32, "found %lld\n",
                 (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding));
-       CLASSERT(JOBSTATS_JOBID_SIZE == 32);
+       CLASSERT(LUSTRE_JOBID_SIZE == 32);
        LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_jobid) == 152, "found %lld\n",
                 (long long)(int)offsetof(struct ptlrpc_body_v3, pb_jobid));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_jobid) == 32, "found %lld\n",
@@ -1016,9 +1016,17 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct obd_connect_data, ocd_maxbytes));
        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxbytes));
-       LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 72, "found %lld\n",
+       LASSERTF((int)offsetof(struct obd_connect_data, ocd_maxmodrpcs) == 72, "found %lld\n",
+                (long long)(int)offsetof(struct obd_connect_data, ocd_maxmodrpcs));
+       LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs));
+       LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 74, "found %lld\n",
+                (long long)(int)offsetof(struct obd_connect_data, padding0));
+       LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct obd_connect_data *)0)->padding0));
+       LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 76, "found %lld\n",
                 (long long)(int)offsetof(struct obd_connect_data, padding1));
-       LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, "found %lld\n",
+       LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
        LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 80, "found %lld\n",
                 (long long)(int)offsetof(struct obd_connect_data, padding2));
@@ -1186,6 +1194,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_LFSCK);
        LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_UNLINK_CLOSE);
+       LASSERTF(OBD_CONNECT_MULTIMODRPCS == 0x200000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_MULTIMODRPCS);
        LASSERTF(OBD_CONNECT_DIR_STRIPE == 0x400000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
@@ -1506,7 +1516,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_layout_gen));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen) == 2, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_layout_gen));
-       CLASSERT(LOV_MAXPOOLNAME == 16);
+       CLASSERT(LOV_MAXPOOLNAME == 15);
        LASSERTF((int)offsetof(struct lov_mds_md_v3, lmm_pool_name[16]) == 48, "found %lld\n",
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_pool_name[16]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_pool_name[16]) == 1, "found %lld\n",
@@ -1573,6 +1583,8 @@ void lustre_assert_wire_constants(void)
        CLASSERT(LMV_HASH_TYPE_MASK == 0x0000ffff);
        CLASSERT(LMV_HASH_FLAG_MIGRATION == 0x80000000);
        CLASSERT(LMV_HASH_FLAG_DEAD == 0x40000000);
+       CLASSERT(LMV_HASH_FLAG_BAD_TYPE == 0x20000000);
+       CLASSERT(LMV_HASH_FLAG_LOST_LMV == 0x10000000);
 
        /* Checks for struct obd_statfs */
        LASSERTF((int)sizeof(struct obd_statfs) == 144, "found %lld\n",
@@ -3597,49 +3609,25 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct changelog_rec *)0)->cr_pfid) == 16, "found %lld\n",
                 (long long)(int)sizeof(((struct changelog_rec *)0)->cr_pfid));
 
-       /* Checks for struct changelog_ext_rec */
-       LASSERTF((int)sizeof(struct changelog_ext_rec) == 96, "found %lld\n",
-                (long long)(int)sizeof(struct changelog_ext_rec));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_namelen) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_namelen));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_namelen) == 2, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_namelen));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_flags) == 2, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_flags));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_flags) == 2, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_flags));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_type) == 4, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_type));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_type) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_type));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_index) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_index));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_index) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_index));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_prev) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_prev));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_prev) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_prev));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_time) == 24, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_time));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_time) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_time));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_tfid) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_tfid));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_tfid) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_tfid));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_pfid) == 48, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_pfid));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_pfid) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_pfid));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_sfid) == 64, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_sfid));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_sfid) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_sfid));
-       LASSERTF((int)offsetof(struct changelog_ext_rec, cr_spfid) == 80, "found %lld\n",
-                (long long)(int)offsetof(struct changelog_ext_rec, cr_spfid));
-       LASSERTF((int)sizeof(((struct changelog_ext_rec *)0)->cr_spfid) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct changelog_ext_rec *)0)->cr_spfid));
+       /* Checks for struct changelog_ext_rename */
+       LASSERTF((int)sizeof(struct changelog_ext_rename) == 32, "found %lld\n",
+                (long long)(int)sizeof(struct changelog_ext_rename));
+       LASSERTF((int)offsetof(struct changelog_ext_rename, cr_sfid) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct changelog_ext_rename, cr_sfid));
+       LASSERTF((int)sizeof(((struct changelog_ext_rename *)0)->cr_sfid) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct changelog_ext_rename *)0)->cr_sfid));
+       LASSERTF((int)offsetof(struct changelog_ext_rename, cr_spfid) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct changelog_ext_rename, cr_spfid));
+       LASSERTF((int)sizeof(((struct changelog_ext_rename *)0)->cr_spfid) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct changelog_ext_rename *)0)->cr_spfid));
+
+       /* Checks for struct changelog_ext_jobid */
+       LASSERTF((int)sizeof(struct changelog_ext_jobid) == 32, "found %lld\n",
+                (long long)(int)sizeof(struct changelog_ext_jobid));
+       LASSERTF((int)offsetof(struct changelog_ext_jobid, cr_jobid) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct changelog_ext_jobid, cr_jobid));
+       LASSERTF((int)sizeof(((struct changelog_ext_jobid *)0)->cr_jobid) == 32, "found %lld\n",
+                (long long)(int)sizeof(((struct changelog_ext_jobid *)0)->cr_jobid));
 
        /* Checks for struct changelog_setinfo */
        LASSERTF((int)sizeof(struct changelog_setinfo) == 12, "found %lld\n",
@@ -3664,10 +3652,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct llog_changelog_rec, cr));
        LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr) == 64, "found %lld\n",
                 (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr));
-       LASSERTF((int)offsetof(struct llog_changelog_rec, cr_tail) == 80, "found %lld\n",
-                (long long)(int)offsetof(struct llog_changelog_rec, cr_tail));
-       LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_tail) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_tail));
+       LASSERTF((int)offsetof(struct llog_changelog_rec, cr_do_not_use) == 80, "found %lld\n",
+                (long long)(int)offsetof(struct llog_changelog_rec, cr_do_not_use));
+       LASSERTF((int)sizeof(((struct llog_changelog_rec *)0)->cr_do_not_use) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct llog_changelog_rec *)0)->cr_do_not_use));
 
        /* Checks for struct llog_changelog_user_rec */
        LASSERTF((int)sizeof(struct llog_changelog_user_rec) == 40, "found %lld\n",
@@ -4713,14 +4701,14 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lfsck_request, lr_fid3));
        LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid3) == 16, "found %lld\n",
                 (long long)(int)sizeof(((struct lfsck_request *)0)->lr_fid3));
-       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 80, "found %lld\n",
+       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 80, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_padding_1));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_1) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_1));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_2) == 88, "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) == 88, "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));
        LASSERTF(LFSCK_TYPE_SCRUB == 0x00000000UL, "found 0x%.8xUL\n",
                (unsigned)LFSCK_TYPE_SCRUB);
        LASSERTF(LFSCK_TYPE_LAYOUT == 0x00000001UL, "found 0x%.8xUL\n",
@@ -4749,10 +4737,24 @@ void lustre_assert_wire_constants(void)
                 (long long)LE_CONDITIONAL_DESTROY);
        LASSERTF(LE_PAIRS_VERIFY == 11, "found %lld\n",
                 (long long)LE_PAIRS_VERIFY);
+       LASSERTF(LE_SKIP_NLINK_DECLARE == 13, "found %lld\n",
+                (long long)LE_SKIP_NLINK_DECLARE);
+       LASSERTF(LE_SKIP_NLINK == 14, "found %lld\n",
+                (long long)LE_SKIP_NLINK);
+       LASSERTF(LE_SET_LMV_MASTER == 15, "found %lld\n",
+                (long long)LE_SET_LMV_MASTER);
+       LASSERTF(LE_SET_LMV_SLAVE == 16, "found %lld\n",
+                (long long)LE_SET_LMV_SLAVE);
        LASSERTF(LEF_TO_OST == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LEF_TO_OST);
        LASSERTF(LEF_FROM_OST == 0x00000002UL, "found 0x%.8xUL\n",
                (unsigned)LEF_FROM_OST);
+       LASSERTF(LEF_SET_LMV_HASH == 0x00000004UL, "found 0x%.8xUL\n",
+               (unsigned)LEF_SET_LMV_HASH);
+       LASSERTF(LEF_SET_LMV_ALL == 0x00000008UL, "found 0x%.8xUL\n",
+               (unsigned)LEF_SET_LMV_ALL);
+       LASSERTF(LEF_RECHECK_NAME_HASH == 0x00000010UL, "found 0x%.8xUL\n",
+               (unsigned)LEF_RECHECK_NAME_HASH);
 
        /* Checks for struct lfsck_reply */
        LASSERTF((int)sizeof(struct lfsck_reply) == 16, "found %lld\n",