Whamcloud - gitweb
LU-6349 ptlrpc: remove LUSTRE_MSG_MAGIC_V1 support
[fs/lustre-release.git] / lustre / ptlrpc / wiretest.c
index 4e3d903..54b866f 100644 (file)
  */
 
 #define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
 
-#ifdef __KERNEL__
-# ifdef CONFIG_FS_POSIX_ACL
-#  include <linux/fs.h>
-#  include <linux/posix_acl_xattr.h>
-# endif
-#endif
+#ifdef CONFIG_FS_POSIX_ACL
+# include <linux/fs.h>
+# include <linux/posix_acl_xattr.h>
+#endif /* CONFIG_FS_POSIX_ACL */
 
 #include <obd_support.h>
 #include <obd_class.h>
 #include <lustre/lustre_lfsck_user.h>
 #include <lustre_disk.h>
 
+#include "ptlrpc_internal.h"
+
 void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux t 2.6.32-358.18.1.el6.lustre.x86_64 #1 SMP Mon Sep 2 15:21:03 CDT 2013 x8
+         * running on Linux q 2.6.32-431.5.1.el6.lustre.x86_64 #1 SMP Wed Feb 12 11:01:08 CST 2014 x8
          * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)  */
 
 
@@ -704,12 +701,8 @@ 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_V1 == 0x0BD00BD0, "found 0x%.8x\n",
-               LUSTRE_MSG_MAGIC_V1);
        LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0BD00BD3, "found 0x%.8x\n",
                LUSTRE_MSG_MAGIC_V2);
-       LASSERTF(LUSTRE_MSG_MAGIC_V1_SWABBED == 0xD00BD00B, "found 0x%.8x\n",
-               LUSTRE_MSG_MAGIC_V1_SWABBED);
        LASSERTF(LUSTRE_MSG_MAGIC_V2_SWABBED == 0xD30BD00B, "found 0x%.8x\n",
                LUSTRE_MSG_MAGIC_V2_SWABBED);
 
@@ -740,10 +733,18 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct ptlrpc_body_v3, pb_last_xid));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid));
-       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_seen) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct ptlrpc_body_v3, pb_last_seen));
-       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_seen) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_seen));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_tag) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct ptlrpc_body_v3, pb_tag));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding0) == 34, "found %lld\n",
+                (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding0));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0) == 2, "found %lld\n",
+                (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding1) == 36, "found %lld\n",
+                (long long)(int)offsetof(struct ptlrpc_body_v3, pb_padding1));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1));
        LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_committed) == 40, "found %lld\n",
                 (long long)(int)offsetof(struct ptlrpc_body_v3, pb_last_committed));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed) == 8, "found %lld\n",
@@ -789,7 +790,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",
@@ -818,10 +819,18 @@ void lustre_assert_wire_constants(void)
                 (int)offsetof(struct ptlrpc_body_v3, pb_last_xid), (int)offsetof(struct ptlrpc_body_v2, pb_last_xid));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_xid), "%d != %d\n",
                 (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_xid), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_xid));
-       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_seen) == (int)offsetof(struct ptlrpc_body_v2, pb_last_seen), "%d != %d\n",
-                (int)offsetof(struct ptlrpc_body_v3, pb_last_seen), (int)offsetof(struct ptlrpc_body_v2, pb_last_seen));
-       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_seen) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_seen), "%d != %d\n",
-                (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_seen), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_seen));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_tag) == (int)offsetof(struct ptlrpc_body_v2, pb_tag), "%d != %d\n",
+                (int)offsetof(struct ptlrpc_body_v3, pb_tag), (int)offsetof(struct ptlrpc_body_v2, pb_tag));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_tag), "%d != %d\n",
+                (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_tag), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_tag));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding0) == (int)offsetof(struct ptlrpc_body_v2, pb_padding0), "%d != %d\n",
+                (int)offsetof(struct ptlrpc_body_v3, pb_padding0), (int)offsetof(struct ptlrpc_body_v2, pb_padding0));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding0), "%d != %d\n",
+                (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding0), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding0));
+       LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_padding1) == (int)offsetof(struct ptlrpc_body_v2, pb_padding1), "%d != %d\n",
+                (int)offsetof(struct ptlrpc_body_v3, pb_padding1), (int)offsetof(struct ptlrpc_body_v2, pb_padding1));
+       LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding1), "%d != %d\n",
+                (int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_padding1), (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_padding1));
        LASSERTF((int)offsetof(struct ptlrpc_body_v3, pb_last_committed) == (int)offsetof(struct ptlrpc_body_v2, pb_last_committed), "%d != %d\n",
                 (int)offsetof(struct ptlrpc_body_v3, pb_last_committed), (int)offsetof(struct ptlrpc_body_v2, pb_last_committed));
        LASSERTF((int)sizeof(((struct ptlrpc_body_v3 *)0)->pb_last_committed) == (int)sizeof(((struct ptlrpc_body_v2 *)0)->pb_last_committed), "%d != %d\n",
@@ -1010,9 +1019,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));
@@ -1180,6 +1197,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",
@@ -1500,7 +1519,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",
@@ -1567,6 +1586,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",
@@ -3591,49 +3612,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",
@@ -3658,10 +3655,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",
@@ -4120,6 +4117,38 @@ void lustre_assert_wire_constants(void)
        CLASSERT(FIEMAP_EXTENT_NO_DIRECT == 0x40000000);
        CLASSERT(FIEMAP_EXTENT_NET == 0x80000000);
 
+#ifdef CONFIG_FS_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));
+#endif /* CONFIG_FS_POSIX_ACL */
+
+#ifdef CONFIG_FS_POSIX_ACL
+       /* 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 /* CONFIG_FS_POSIX_ACL */
+
        /* Checks for struct link_ea_header */
        LASSERTF((int)sizeof(struct link_ea_header) == 24, "found %lld\n",
                 (long long)(int)sizeof(struct link_ea_header));
@@ -4659,10 +4688,10 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lfsck_request, lr_async_windows));
        LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_async_windows) == 2, "found %lld\n",
                 (long long)(int)sizeof(((struct lfsck_request *)0)->lr_async_windows));
-       LASSERTF((int)offsetof(struct lfsck_request, lr_padding_1) == 28, "found %lld\n",
-                (long long)(int)offsetof(struct lfsck_request, lr_padding_1));
-       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_padding_1) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_padding_1));
+       LASSERTF((int)offsetof(struct lfsck_request, lr_flags) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lfsck_request, lr_flags));
+       LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lfsck_request *)0)->lr_flags));
        LASSERTF((int)offsetof(struct lfsck_request, lr_fid) == 32, "found %lld\n",
                 (long long)(int)offsetof(struct lfsck_request, lr_fid));
        LASSERTF((int)sizeof(((struct lfsck_request *)0)->lr_fid) == 16, "found %lld\n",
@@ -4675,20 +4704,18 @@ 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",
                (unsigned)LFSCK_TYPE_LAYOUT);
-       LASSERTF(LFSCK_TYPE_DNE == 0x00000002UL, "found 0x%.8xUL\n",
-               (unsigned)LFSCK_TYPE_DNE);
        LASSERTF(LFSCK_TYPE_NAMESPACE == 0x00000004UL, "found 0x%.8xUL\n",
                (unsigned)LFSCK_TYPE_NAMESPACE);
        LASSERTF(LE_LASTID_REBUILDING == 1, "found %lld\n",
@@ -4713,10 +4740,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",
@@ -4734,4 +4775,3 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct lfsck_reply *)0)->lr_padding_2) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct lfsck_reply *)0)->lr_padding_2));
 }
-