Whamcloud - gitweb
LU-11014 mdc: remove obsolete intent opcodes
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index cdb23de..2883dc9 100644 (file)
@@ -194,7 +194,7 @@ void lustre_assert_wire_constants(void)
                 (long long)REINT_RMENTRY);
        LASSERTF(REINT_MIGRATE == 9, "found %lld\n",
                 (long long)REINT_MIGRATE);
-       LASSERTF(REINT_MAX == 10, "found %lld\n",
+       LASSERTF(REINT_MAX == 11, "found %lld\n",
                 (long long)REINT_MAX);
        LASSERTF(DISP_IT_EXECD == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)DISP_IT_EXECD);
@@ -254,6 +254,10 @@ void lustre_assert_wire_constants(void)
                        (long long)MDS_ATTR_BLOCKS);
        LASSERTF(MDS_ATTR_PROJID == 0x0000000000010000ULL, "found 0x%.16llxULL\n",
                        (long long)MDS_ATTR_PROJID);
+       LASSERTF(MDS_ATTR_LSIZE == 0x0000000000020000ULL, "found 0x%.16llxULL\n",
+                       (long long)MDS_ATTR_LSIZE);
+       LASSERTF(MDS_ATTR_LBLOCKS == 0x0000000000040000ULL, "found 0x%.16llxULL\n",
+                       (long long)MDS_ATTR_LBLOCKS);
        LASSERTF(FLD_QUERY == 900, "found %lld\n",
                 (long long)FLD_QUERY);
        LASSERTF(FLD_READ == 901, "found %lld\n",
@@ -338,10 +342,6 @@ void lustre_assert_wire_constants(void)
        CLASSERT(LQUOTA_RES_DT == 2);
        LASSERTF(OBD_PING == 400, "found %lld\n",
                 (long long)OBD_PING);
-       LASSERTF(OBD_LOG_CANCEL == 401, "found %lld\n",
-                (long long)OBD_LOG_CANCEL);
-       LASSERTF(OBD_QC_CALLBACK == 402, "found %lld\n",
-                (long long)OBD_QC_CALLBACK);
        LASSERTF(OBD_IDX_READ == 403, "found %lld\n",
                 (long long)OBD_IDX_READ);
        LASSERTF(OBD_LAST_OPC == 404, "found %lld\n",
@@ -364,6 +364,8 @@ void lustre_assert_wire_constants(void)
                 (long long)MGS_TARGET_DEL);
        LASSERTF(MGS_SET_INFO == 255, "found %lld\n",
                 (long long)MGS_SET_INFO);
+       LASSERTF(MGS_CONFIG_READ == 256, "found %lld\n",
+                (long long)MGS_CONFIG_READ);
        LASSERTF(MGS_LAST_OPC == 257, "found %lld\n",
                 (long long)MGS_LAST_OPC);
        LASSERTF(SEC_CTX_INIT == 801, "found %lld\n",
@@ -499,6 +501,30 @@ void lustre_assert_wire_constants(void)
                 (long long)OUT_PUNCH);
        LASSERTF(OUT_READ == 15, "found %lld\n",
                 (long long)OUT_READ);
+       LASSERTF(OUT_NOOP == 16, "found %lld\n",
+                (long long)OUT_NOOP);
+       LASSERTF(OUT_XATTR_LIST == 17, "found %lld\n",
+                (long long)OUT_XATTR_LIST);
+
+       /* Checks for struct lustre_som_attrs */
+       LASSERTF((int)sizeof(struct lustre_som_attrs) == 24, "found %lld\n",
+                (long long)(int)sizeof(struct lustre_som_attrs));
+       LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_valid) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lustre_som_attrs, lsa_valid));
+       LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_valid) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_valid));
+       LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_reserved) == 2, "found %lld\n",
+                (long long)(int)offsetof(struct lustre_som_attrs, lsa_reserved));
+       LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_reserved) == 6, "found %lld\n",
+                (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_reserved));
+       LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_size) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lustre_som_attrs, lsa_size));
+       LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_size) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_size));
+       LASSERTF((int)offsetof(struct lustre_som_attrs, lsa_blocks) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lustre_som_attrs, lsa_blocks));
+       LASSERTF((int)sizeof(((struct lustre_som_attrs *)0)->lsa_blocks) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lustre_som_attrs *)0)->lsa_blocks));
 
        /* Checks for struct hsm_attrs */
        LASSERTF((int)sizeof(struct hsm_attrs) == 24, "found %lld\n",
@@ -774,10 +800,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0]));
        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]));
-       LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0BD00BD3, "found 0x%.8x\n",
-               LUSTRE_MSG_MAGIC_V2);
-       LASSERTF(LUSTRE_MSG_MAGIC_V2_SWABBED == 0xD30BD00B, "found 0x%.8x\n",
-               LUSTRE_MSG_MAGIC_V2_SWABBED);
+       LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0bd00bd3UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_MSG_MAGIC_V2);
+       LASSERTF(LUSTRE_MSG_MAGIC_V2_SWABBED == 0xd30bd00bUL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_MSG_MAGIC_V2_SWABBED);
 
        /* Checks for struct ptlrpc_body */
        LASSERTF((int)sizeof(struct ptlrpc_body_v3) == 184, "found %lld\n",
@@ -992,42 +1018,30 @@ void lustre_assert_wire_constants(void)
                 (long long)DLM_REPLY_REC_OFF);
        LASSERTF(MSG_PTLRPC_HEADER_OFF == 31, "found %lld\n",
                 (long long)MSG_PTLRPC_HEADER_OFF);
-       LASSERTF(PTLRPC_MSG_VERSION == 0x00000003, "found 0x%.8x\n",
-               PTLRPC_MSG_VERSION);
-       LASSERTF(LUSTRE_VERSION_MASK == 0xffff0000, "found 0x%.8x\n",
-               LUSTRE_VERSION_MASK);
-       LASSERTF(LUSTRE_OBD_VERSION == 0x00010000, "found 0x%.8x\n",
-               LUSTRE_OBD_VERSION);
-       LASSERTF(LUSTRE_MDS_VERSION == 0x00020000, "found 0x%.8x\n",
-               LUSTRE_MDS_VERSION);
-       LASSERTF(LUSTRE_OST_VERSION == 0x00030000, "found 0x%.8x\n",
-               LUSTRE_OST_VERSION);
-       LASSERTF(LUSTRE_DLM_VERSION == 0x00040000, "found 0x%.8x\n",
-               LUSTRE_DLM_VERSION);
-       LASSERTF(LUSTRE_LOG_VERSION == 0x00050000, "found 0x%.8x\n",
-               LUSTRE_LOG_VERSION);
-       LASSERTF(LUSTRE_MGS_VERSION == 0x00060000, "found 0x%.8x\n",
-               LUSTRE_MGS_VERSION);
+       LASSERTF(PTLRPC_MSG_VERSION == 0x00000003UL, "found 0x%.8xUL\n",
+               (unsigned)PTLRPC_MSG_VERSION);
+       LASSERTF(LUSTRE_VERSION_MASK == 0xffff0000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_VERSION_MASK);
+       LASSERTF(LUSTRE_OBD_VERSION == 0x00010000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_OBD_VERSION);
+       LASSERTF(LUSTRE_MDS_VERSION == 0x00020000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_MDS_VERSION);
+       LASSERTF(LUSTRE_OST_VERSION == 0x00030000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_OST_VERSION);
+       LASSERTF(LUSTRE_DLM_VERSION == 0x00040000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_DLM_VERSION);
+       LASSERTF(LUSTRE_LOG_VERSION == 0x00050000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_LOG_VERSION);
+       LASSERTF(LUSTRE_MGS_VERSION == 0x00060000UL, "found 0x%.8xUL\n",
+               (unsigned)LUSTRE_MGS_VERSION);
        LASSERTF(MSGHDR_AT_SUPPORT == 1, "found %lld\n",
                 (long long)MSGHDR_AT_SUPPORT);
        LASSERTF(MSGHDR_CKSUM_INCOMPAT18 == 2, "found %lld\n",
                 (long long)MSGHDR_CKSUM_INCOMPAT18);
-       LASSERTF(MSG_OP_FLAG_MASK == 0xffff0000UL, "found 0x%.8xUL\n",
-               (unsigned)MSG_OP_FLAG_MASK);
-       LASSERTF(MSG_OP_FLAG_SHIFT == 16, "found %lld\n",
-                (long long)MSG_OP_FLAG_SHIFT);
-       LASSERTF(MSG_GEN_FLAG_MASK == 0x0000ffffUL, "found 0x%.8xUL\n",
-               (unsigned)MSG_GEN_FLAG_MASK);
-       LASSERTF(MSG_LAST_REPLAY == 0x00000001UL, "found 0x%.8xUL\n",
-               (unsigned)MSG_LAST_REPLAY);
        LASSERTF(MSG_RESENT == 0x00000002UL, "found 0x%.8xUL\n",
                (unsigned)MSG_RESENT);
        LASSERTF(MSG_REPLAY == 0x00000004UL, "found 0x%.8xUL\n",
                (unsigned)MSG_REPLAY);
-       LASSERTF(MSG_DELAY_REPLAY == 0x00000010UL, "found 0x%.8xUL\n",
-               (unsigned)MSG_DELAY_REPLAY);
-       LASSERTF(MSG_VERSION_REPLAY == 0x00000020UL, "found 0x%.8xUL\n",
-               (unsigned)MSG_VERSION_REPLAY);
        LASSERTF(MSG_REQ_REPLAY_DONE == 0x00000040UL, "found 0x%.8xUL\n",
                (unsigned)MSG_REQ_REPLAY_DONE);
        LASSERTF(MSG_LOCK_REPLAY_DONE == 0x00000080UL, "found 0x%.8xUL\n",
@@ -1042,8 +1056,6 @@ void lustre_assert_wire_constants(void)
                (unsigned)MSG_CONNECT_LIBCLIENT);
        LASSERTF(MSG_CONNECT_INITIAL == 0x00000020UL, "found 0x%.8xUL\n",
                (unsigned)MSG_CONNECT_INITIAL);
-       LASSERTF(MSG_CONNECT_ASYNC == 0x00000040UL, "found 0x%.8xUL\n",
-               (unsigned)MSG_CONNECT_ASYNC);
        LASSERTF(MSG_CONNECT_NEXT_VER == 0x00000080UL, "found 0x%.8xUL\n",
                (unsigned)MSG_CONNECT_NEXT_VER);
        LASSERTF(MSG_CONNECT_TRANSNO == 0x00000100UL, "found 0x%.8xUL\n",
@@ -1312,12 +1324,34 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_FILE_SECCTX);
        LASSERTF(OBD_CONNECT2_LOCKAHEAD == 0x2ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_LOCKAHEAD);
+       LASSERTF(OBD_CONNECT2_DIR_MIGRATE == 0x4ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_DIR_MIGRATE);
+       LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_FLR);
+       LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_WBC_INTENTS);
+       LASSERTF(OBD_CONNECT2_LOCK_CONVERT == 0x80ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_LOCK_CONVERT);
+       LASSERTF(OBD_CONNECT2_ARCHIVE_ID_ARRAY == 0x100ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_ARCHIVE_ID_ARRAY);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_ADLER);
        LASSERTF(OBD_CKSUM_CRC32C == 0x00000004UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32C);
+       LASSERTF(OBD_CKSUM_RESERVED == 0x00000008UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_RESERVED);
+       LASSERTF(OBD_CKSUM_T10IP512 == 0x00000010UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_T10IP512);
+       LASSERTF(OBD_CKSUM_T10IP4K == 0x00000020UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_T10IP4K);
+       LASSERTF(OBD_CKSUM_T10CRC512 == 0x00000040UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_T10CRC512);
+       LASSERTF(OBD_CKSUM_T10CRC4K == 0x00000080UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_T10CRC4K);
+       LASSERTF(OBD_CKSUM_T10_TOP == 0x00000002UL, "found 0x%.8xUL\n",
+               (unsigned)OBD_CKSUM_T10_TOP);
 
        /* Checks for struct ost_layout */
        LASSERTF((int)sizeof(struct ost_layout) == 28, "found %lld\n",
@@ -1434,10 +1468,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct obdo, o_layout));
        LASSERTF((int)sizeof(((struct obdo *)0)->o_layout) == 28, "found %lld\n",
                 (long long)(int)sizeof(((struct obdo *)0)->o_layout));
-       LASSERTF((int)offsetof(struct obdo, o_padding_3) == 164, "found %lld\n",
-                (long long)(int)offsetof(struct obdo, o_padding_3));
-       LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_3) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct obdo *)0)->o_padding_3));
+       LASSERTF((int)offsetof(struct obdo, o_layout_version) == 164, "found %lld\n",
+                (long long)(int)offsetof(struct obdo, o_layout_version));
+       LASSERTF((int)sizeof(((struct obdo *)0)->o_layout_version) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct obdo *)0)->o_layout_version));
        LASSERTF((int)offsetof(struct obdo, o_uid_h) == 168, "found %lld\n",
                 (long long)(int)offsetof(struct obdo, o_uid_h));
        LASSERTF((int)sizeof(((struct obdo *)0)->o_uid_h) == 4, "found %lld\n",
@@ -1542,8 +1576,6 @@ void lustre_assert_wire_constants(void)
                 OBD_MD_FLMDSCAPA);
        LASSERTF(OBD_MD_FLOSSCAPA == (0x0000040000000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLOSSCAPA);
-       LASSERTF(OBD_MD_FLCKSPLIT == (0x0000080000000000ULL), "found 0x%.16llxULL\n",
-                OBD_MD_FLCKSPLIT);
        LASSERTF(OBD_MD_FLCROSSREF == (0x0000100000000000ULL), "found 0x%.16llxULL\n",
                 OBD_MD_FLCROSSREF);
        LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n",
@@ -1572,7 +1604,10 @@ void lustre_assert_wire_constants(void)
        CLASSERT(OBD_FL_CKSUM_CRC32 == 0x00001000);
        CLASSERT(OBD_FL_CKSUM_ADLER == 0x00002000);
        CLASSERT(OBD_FL_CKSUM_CRC32C == 0x00004000);
-       CLASSERT(OBD_FL_CKSUM_RSVD2 == 0x00008000);
+       CLASSERT(OBD_FL_CKSUM_T10IP512 == 0x00005000);
+       CLASSERT(OBD_FL_CKSUM_T10IP4K == 0x00006000);
+       CLASSERT(OBD_FL_CKSUM_T10CRC512 == 0x00007000);
+       CLASSERT(OBD_FL_CKSUM_T10CRC4K == 0x00008000);
        CLASSERT(OBD_FL_CKSUM_RSVD3 == 0x00010000);
        CLASSERT(OBD_FL_SHRINK_GRANT == 0x00020000);
        CLASSERT(OBD_FL_MMAP == 0x00040000);
@@ -1699,10 +1734,18 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_size));
        LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_size));
-       LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding));
-       LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding));
+       LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_layout_gen));
+       LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_layout_gen));
+       LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1) == 36, "found %lld\n",
+                (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_1));
+       LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_1));
+       LASSERTF((int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_padding_2));
+       LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding_2));
        LASSERTF(LCME_FL_INIT == 0x00000010UL, "found 0x%.8xUL\n",
                (unsigned)LCME_FL_INIT);
        LASSERTF(LCME_FL_NEG == 0x80000000UL, "found 0x%.8xUL\n",
@@ -1748,8 +1791,8 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]) == 48, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_comp_md_v1 *)0)->lcm_entries[0]));
        CLASSERT(LOV_MAGIC_COMP_V1 == (0x0BD60000 | 0x0BD0));
-       LASSERTF(LCM_FL_NOT_FLR == 0, "found %lld\n",
-                (long long)LCM_FL_NOT_FLR);
+       LASSERTF(LCM_FL_NONE == 0, "found %lld\n",
+                (long long)LCM_FL_NONE);
        LASSERTF(LCM_FL_RDONLY == 1, "found %lld\n",
                 (long long)LCM_FL_RDONLY);
        LASSERTF(LCM_FL_WRITE_PENDING == 2, "found %lld\n",
@@ -2213,6 +2256,33 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
 
+       LASSERTF(MDS_CROSS_REF == 0x00000002UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CROSS_REF);
+       LASSERTF(MDS_PERM_BYPASS == 0x00000008UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_PERM_BYPASS);
+       LASSERTF(MDS_QUOTA_IGNORE == 0x00000020UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_QUOTA_IGNORE);
+       LASSERTF(MDS_KEEP_ORPHAN == 0x00000080UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_KEEP_ORPHAN);
+       LASSERTF(MDS_RECOV_OPEN == 0x00000100UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_RECOV_OPEN);
+       LASSERTF(MDS_DATA_MODIFIED == 0x00000200UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_DATA_MODIFIED);
+       LASSERTF(MDS_CREATE_VOLATILE == 0x00000400UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CREATE_VOLATILE);
+       LASSERTF(MDS_OWNEROVERRIDE == 0x00000800UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_OWNEROVERRIDE);
+       LASSERTF(MDS_HSM_RELEASE == 0x00001000UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_HSM_RELEASE);
+       LASSERTF(MDS_CLOSE_LAYOUT_SWAP == 0x00004000UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CLOSE_LAYOUT_SWAP);
+       LASSERTF(MDS_CLOSE_LAYOUT_MERGE == 0x00008000UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CLOSE_LAYOUT_MERGE);
+       LASSERTF(MDS_CLOSE_RESYNC_DONE == 0x00010000UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CLOSE_RESYNC_DONE);
+       LASSERTF(MDS_CLOSE_LAYOUT_SPLIT == 0x00020000UL, "found 0x%.8xUL\n",
+               (unsigned)MDS_CLOSE_LAYOUT_SPLIT);
+
        /* Checks for struct mdt_body */
        LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_body));
@@ -2252,6 +2322,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_body, mbo_blocks));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_blocks) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_body *)0)->mbo_blocks));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_version) == 88, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_version));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_version) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_version));
        LASSERTF((int)offsetof(struct mdt_body, mbo_t_state) == 96, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_body, mbo_t_state));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_t_state) == 8, "found %lld\n",
@@ -2292,10 +2366,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct mdt_body, mbo_nlink));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_nlink) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_body *)0)->mbo_nlink));
-       LASSERTF((int)offsetof(struct mdt_body, mbo_unused2) == 140, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mbo_unused2));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused2) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused2));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_layout_gen) == 140, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_layout_gen));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_layout_gen) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_layout_gen));
        LASSERTF((int)offsetof(struct mdt_body, mbo_suppgid) == 144, "found %lld\n",
                 (long long)(int)offsetof(struct mdt_body, mbo_suppgid));
        LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_suppgid) == 4, "found %lld\n",
@@ -3031,6 +3105,98 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct mdt_rec_setxattr *)0)->sx_padding_11) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct mdt_rec_setxattr *)0)->sx_padding_11));
 
+       /* Checks for struct mdt_rec_resync */
+       LASSERTF((int)sizeof(struct mdt_rec_resync) == 136, "found %lld\n",
+                (long long)(int)sizeof(struct mdt_rec_resync));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_opcode) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_opcode));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_opcode) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_opcode));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_cap) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_cap));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_cap) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_cap));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_fsuid) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_fsuid));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_fsuid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_fsuid));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_fsuid_h) == 12, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_fsuid_h));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_fsuid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_fsuid_h));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_fsgid) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_fsgid));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_fsgid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_fsgid));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_fsgid_h) == 20, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_fsgid_h));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_fsgid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_fsgid_h));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_suppgid1) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_suppgid1));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid1) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid1));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_suppgid1_h) == 28, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_suppgid1_h));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid1_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid1_h));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_suppgid2) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_suppgid2));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid2) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid2));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_suppgid2_h) == 36, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_suppgid2_h));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid2_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_suppgid2_h));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_fid) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_fid));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_fid) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_fid));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding0) == 56, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding0));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding0) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding0));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding1) == 80, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding1));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding1) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding1));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding2) == 88, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding2));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding2) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding2));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding3) == 96, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding3));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding3) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding3));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding4) == 104, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding4));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding4) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding4));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_bias) == 112, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_bias));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_bias) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_bias));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding5) == 116, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding5));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding5) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding5));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding6) == 120, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding6));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding6) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding6));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding7) == 124, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding7));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding7) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding7));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding8) == 128, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding8));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding8) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding8));
+       LASSERTF((int)offsetof(struct mdt_rec_resync, rs_padding9) == 132, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_rec_resync, rs_padding9));
+       LASSERTF((int)sizeof(((struct mdt_rec_resync *)0)->rs_padding9) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_rec_resync *)0)->rs_padding9));
+
        /* Checks for struct mdt_rec_reint */
        LASSERTF((int)sizeof(struct mdt_rec_reint) == 136, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_rec_reint));
@@ -3302,24 +3468,14 @@ void lustre_assert_wire_constants(void)
                 (long long)IT_GETATTR);
        LASSERTF(IT_LOOKUP == 16, "found %lld\n",
                 (long long)IT_LOOKUP);
-       LASSERTF(IT_UNLINK == 32, "found %lld\n",
-                (long long)IT_UNLINK);
-       LASSERTF(IT_TRUNC == 64, "found %lld\n",
-                (long long)IT_TRUNC);
        LASSERTF(IT_GETXATTR == 128, "found %lld\n",
                 (long long)IT_GETXATTR);
-       LASSERTF(IT_EXEC == 256, "found %lld\n",
-                (long long)IT_EXEC);
-       LASSERTF(IT_PIN == 512, "found %lld\n",
-                (long long)IT_PIN);
        LASSERTF(IT_LAYOUT == 1024, "found %lld\n",
                 (long long)IT_LAYOUT);
        LASSERTF(IT_QUOTA_DQACQ == 2048, "found %lld\n",
                 (long long)IT_QUOTA_DQACQ);
        LASSERTF(IT_QUOTA_CONN == 4096, "found %lld\n",
                 (long long)IT_QUOTA_CONN);
-       LASSERTF(IT_SETXATTR == 8192, "found %lld\n",
-                (long long)IT_SETXATTR);
 
        /* Checks for struct ldlm_resource_desc */
        LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, "found %lld\n",
@@ -3928,10 +4084,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct llog_changelog_user_rec, cur_id));
        LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_id) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct llog_changelog_user_rec *)0)->cur_id));
-       LASSERTF((int)offsetof(struct llog_changelog_user_rec, cur_padding) == 20, "found %lld\n",
-                (long long)(int)offsetof(struct llog_changelog_user_rec, cur_padding));
-       LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_padding) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct llog_changelog_user_rec *)0)->cur_padding));
+       LASSERTF((int)offsetof(struct llog_changelog_user_rec, cur_time) == 20, "found %lld\n",
+                (long long)(int)offsetof(struct llog_changelog_user_rec, cur_time));
+       LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_time) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct llog_changelog_user_rec *)0)->cur_time));
        LASSERTF((int)offsetof(struct llog_changelog_user_rec, cur_endrec) == 24, "found %lld\n",
                 (long long)(int)offsetof(struct llog_changelog_user_rec, cur_endrec));
        LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_endrec) == 8, "found %lld\n",
@@ -4039,12 +4195,7 @@ void lustre_assert_wire_constants(void)
        CLASSERT(LLOG_ORIGIN_HANDLE_CREATE == 501);
        CLASSERT(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502);
        CLASSERT(LLOG_ORIGIN_HANDLE_READ_HEADER == 503);
-       CLASSERT(LLOG_ORIGIN_HANDLE_WRITE_REC == 504);
-       CLASSERT(LLOG_ORIGIN_HANDLE_CLOSE == 505);
-       CLASSERT(LLOG_ORIGIN_CONNECT == 506);
-       CLASSERT(LLOG_CATINFO == 507);
        CLASSERT(LLOG_ORIGIN_HANDLE_PREV_BLOCK == 508);
-       CLASSERT(LLOG_ORIGIN_HANDLE_DESTROY == 509);
        CLASSERT(LLOG_FIRST_OPC == 501);
        CLASSERT(LLOG_LAST_OPC == 510);
        CLASSERT(LLOG_CONFIG_ORIG_CTXT == 0);
@@ -4456,10 +4607,12 @@ void lustre_assert_wire_constants(void)
                 (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));
+#ifndef HAVE_STRUCT_POSIX_ACL_XATTR
        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 /* HAVE_STRUCT_POSIX_ACL_XATTR */
 #endif /* CONFIG_FS_POSIX_ACL */
 
        /* Checks for struct link_ea_header */
@@ -4514,14 +4667,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct layout_intent, li_flags));
        LASSERTF((int)sizeof(((struct layout_intent *)0)->li_flags) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct layout_intent *)0)->li_flags));
-       LASSERTF((int)offsetof(struct layout_intent, li_start) == 8, "found %lld\n",
-                (long long)(int)offsetof(struct layout_intent, li_start));
-       LASSERTF((int)sizeof(((struct layout_intent *)0)->li_start) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct layout_intent *)0)->li_start));
-       LASSERTF((int)offsetof(struct layout_intent, li_end) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct layout_intent, li_end));
-       LASSERTF((int)sizeof(((struct layout_intent *)0)->li_end) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct layout_intent *)0)->li_end));
+       LASSERTF((int)offsetof(struct layout_intent, li_extent) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct layout_intent, li_extent));
+       LASSERTF((int)sizeof(((struct layout_intent *)0)->li_extent) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct layout_intent *)0)->li_extent));
        LASSERTF(LAYOUT_INTENT_ACCESS == 0, "found %lld\n",
                 (long long)LAYOUT_INTENT_ACCESS);
        LASSERTF(LAYOUT_INTENT_READ == 1, "found %lld\n",
@@ -5177,12 +5326,14 @@ void lustre_assert_wire_constants(void)
                 (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));
+#ifdef HAVE_SERVER_SUPPORT
        LASSERTF(LFSCK_TYPE_SCRUB == 0x00000000UL, "found 0x%.8xUL\n",
                (unsigned)LFSCK_TYPE_SCRUB);
        LASSERTF(LFSCK_TYPE_LAYOUT == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LFSCK_TYPE_LAYOUT);
        LASSERTF(LFSCK_TYPE_NAMESPACE == 0x00000004UL, "found 0x%.8xUL\n",
                (unsigned)LFSCK_TYPE_NAMESPACE);
+#endif
        LASSERTF(LE_LASTID_REBUILDING == 1, "found %lld\n",
                 (long long)LE_LASTID_REBUILDING);
        LASSERTF(LE_LASTID_REBUILT == 2, "found %lld\n",