Whamcloud - gitweb
LU-17438 utils: fix build for wirecheck 16/53716/3
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Wed, 17 Jan 2024 16:51:58 +0000 (17:51 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:09:39 +0000 (07:09 +0000)
Fix wirecheck compilation and regenerate wiretest files.

Fixes: 6a20bdc ("LU-11376 lov: new foreign LOV format")
Fixes: 15d44e7 ("LU-12682 llite: fake symlink type of foreign file/dir")
Fixes: aebb405 ("LU-10499 pcc: use foreign layout for PCCRO on server side")
Fixes: 0ea23e0 ("LU-13307 nodemap: have nodemap_add_member support large NIDs")
Test-Parameters: trivial testlist=sanity env=ONLY=58
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I3a312136da00ba726887660575f6558faf167241
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53716
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/wirehdr.c
lustre/ptlrpc/wiretest.c
lustre/utils/Makefile.am
lustre/utils/wirecheck.c
lustre/utils/wirehdr.c
lustre/utils/wiretest.c

index c196eb2..a83bbbf 100644 (file)
@@ -43,4 +43,6 @@
 #include <uapi/linux/lustre/lustre_access_log.h>
 #include <uapi/linux/lustre/lustre_lfsck_user.h>
 #include <uapi/linux/lustre/lustre_cfg.h>
+#include <uapi/linux/lustre/lgss.h>
 
+#include "ptlrpc_internal.h"
index 2a9cb20..fca228a 100644 (file)
@@ -1822,6 +1822,95 @@ void lustre_assert_wire_constants(void)
        LASSERTF(LOV_PATTERN_OVERSTRIPING == 0x00000200UL, "found 0x%.8xUL\n",
                (unsigned)LOV_PATTERN_OVERSTRIPING);
 
+       /* Checks for struct lov_foreign_md */
+       LASSERTF((int)sizeof(struct lov_foreign_md) == 16, "found %lld\n",
+                (long long)(int)sizeof(struct lov_foreign_md));
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_magic) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_magic));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_magic) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_magic));
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_length) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_length));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_length) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_length));
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_type) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_type));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_type) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_type));
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_flags) == 12, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_flags));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_flags));
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_value[0]) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_value[0]));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_value[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_value[0]));
+       LASSERTF(LU_FOREIGN_TYPE_NONE == 0x00000000UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_NONE);
+       LASSERTF(LU_FOREIGN_TYPE_POSIX == 0x00000001UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_POSIX);
+       LASSERTF(LU_FOREIGN_TYPE_PCCRW == 0x00000002UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_PCCRW);
+       LASSERTF(LU_FOREIGN_TYPE_PCCRO == 0x00000003UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_PCCRO);
+       LASSERTF(LU_FOREIGN_TYPE_S3 == 0x00000004UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_S3);
+       LASSERTF(LU_FOREIGN_TYPE_SYMLINK == 0x0000da05UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_SYMLINK);
+       LASSERTF(LU_FOREIGN_TYPE_UNKNOWN == 0xffffffffUL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_UNKNOWN);
+       BUILD_BUG_ON(LOV_MAGIC_FOREIGN != (0x0BD70000 | 0x0BD0));
+       LASSERTF(LOV_PATTERN_FOREIGN == 0x00000400UL, "found 0x%.8xUL\n",
+               (unsigned)LOV_PATTERN_FOREIGN);
+
+       /* Checks for struct lov_hsm_base */
+       LASSERTF((int)sizeof(struct lov_hsm_base) == 56, "found %lld\n",
+                (long long)(int)sizeof(struct lov_hsm_base));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_archive_id) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_archive_id));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_id) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_id));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_archive_ver));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_ver));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_uuid[0]) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_uuid[0]));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_uuid[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_uuid[0]));
+
+       /* Checks for struct lov_hsm_md */
+       LASSERTF((int)sizeof(struct lov_hsm_md) == 72, "found %lld\n",
+                (long long)(int)sizeof(struct lov_hsm_md));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_magic) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_magic));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_magic) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_magic));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_length) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_length));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_length) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_length));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_type) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_type));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_type) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_type));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_flags) == 12, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_flags));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_flags));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_id) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_id));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_id) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_id));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_ver) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_ver));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_ver));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_uuid[0]) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_uuid[0]));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_uuid[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_uuid[0]));
+
        /* Checks for struct lov_comp_md_entry_v1 */
        LASSERTF((int)sizeof(struct lov_comp_md_entry_v1) == 48, "found %lld\n",
                 (long long)(int)sizeof(struct lov_comp_md_entry_v1));
@@ -1865,6 +1954,8 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_compr_type));
        LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_compr_type) == 1, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_compr_type));
+       /* lov_comp_md_entry_v1.lcme_compr_lvl is a bitfield and cannot be checked */
+       /* lov_comp_md_entry_v1.lcme_compr_chunk_log_bits is a bitfield and cannot be checked */
        BUILD_BUG_ON(LCME_FL_STALE != 0x00000001);
        BUILD_BUG_ON(LCME_FL_PREF_RD != 0x00000002);
        BUILD_BUG_ON(LCME_FL_PREF_WR != 0x00000004);
@@ -4479,13 +4570,13 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct rsc_downcall_data *)0)->scd_val) == 0, "found %lld\n",
                 (long long)(int)sizeof(((struct rsc_downcall_data *)0)->scd_val));
        LASSERTF(RSC_DATA_FLAG_REMOTE == 0x00000001UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_REMOTE);
+               (unsigned)RSC_DATA_FLAG_REMOTE);
        LASSERTF(RSC_DATA_FLAG_ROOT == 0x00000002UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_ROOT);
+               (unsigned)RSC_DATA_FLAG_ROOT);
        LASSERTF(RSC_DATA_FLAG_MDS == 0x00000004UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_MDS);
+               (unsigned)RSC_DATA_FLAG_MDS);
        LASSERTF(RSC_DATA_FLAG_OSS == 0x00000008UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_OSS);
+               (unsigned)RSC_DATA_FLAG_OSS);
 
        /* Checks for struct llog_gen */
        LASSERTF((int)sizeof(struct llog_gen) == 16, "found %lld\n",
index 8d1e9cd..30a28b6 100644 (file)
@@ -4,10 +4,6 @@ AM_CFLAGS  := -fPIC -D_GNU_SOURCE \
              -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 $(UTILS_CFLAGS)
 AM_LDFLAGS := $(UTILS_LDFLAGS)
 
-if TESTS
-EXTRA_PROGRAMS = wirecheck
-endif
-
 if UTILS
 
 if GSS
@@ -38,7 +34,7 @@ sbin_PROGRAMS = lctl l_getidentity llverdev llverfs lustre_rsync \
                ll_decode_linkea llsom_sync l_foreign_symlink
 
 if TESTS
-sbin_PROGRAMS += wiretest
+sbin_PROGRAMS += wirecheck wiretest
 endif # TESTS
 
 if SERVER
index 2fde5cf..1cdf551 100644 (file)
@@ -38,6 +38,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <linux/lustre/lustre_idl.h>
+#include <linux/lustre/lgss.h>
 #ifndef HAVE_NATIVE_LINUX_CLIENT
 #include <linux/lustre/lustre_access_log.h>
 #include <linux/lustre/lustre_lfsck_user.h>
@@ -878,7 +879,7 @@ check_lov_foreign_md(void)
        CHECK_VALUE_X(LU_FOREIGN_TYPE_PCCRW);
        CHECK_VALUE_X(LU_FOREIGN_TYPE_PCCRO);
        CHECK_VALUE_X(LU_FOREIGN_TYPE_S3);
-       CHECK_VALUE_X(LU_FOREIGN_TYPE_DAOS);
+       CHECK_VALUE_X(LU_FOREIGN_TYPE_SYMLINK);
        CHECK_VALUE_X(LU_FOREIGN_TYPE_UNKNOWN);
 
        CHECK_CDEFINE(LOV_MAGIC_FOREIGN);
@@ -888,7 +889,7 @@ check_lov_foreign_md(void)
 static void
 check_lov_hsm_base(void)
 {
-       BLANK_LINKE();
+       BLANK_LINE();
        CHECK_STRUCT(lov_hsm_base);
        CHECK_MEMBER(lov_hsm_base, lhb_archive_id);
        CHECK_MEMBER(lov_hsm_base, lhb_archive_ver);
@@ -3688,6 +3689,7 @@ main(int argc, char **argv)
 
        check_nodemap_cluster_rec();
        check_nodemap_range_rec();
+       check_nodemap_range2_rec();
        check_nodemap_id_rec();
        check_nodemap_global_rec();
        check_nodemap_cluster_roles_rec();
index 7fc30bf..d49a413 100644 (file)
@@ -48,6 +48,7 @@
 #endif /* CONFIG_FS_POSIX_ACL */
 #endif /* HAVE_SERVER_SUPPORT */
 #include <linux/lustre/lustre_cfg.h>
+#include <linux/lustre/lgss.h>
 #include <lustre/lustreapi.h>
 
 #ifndef BUILD_BUG_ON
index 0cc6acc..72dee0d 100644 (file)
@@ -1296,6 +1296,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct obd_connect_data, paddingF));
        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->paddingF) == 8, "found %lld\n",
                 (long long)(int)sizeof(((struct obd_connect_data *)0)->paddingF));
+
        LASSERTF(OBD_CONNECT_RDONLY == 0x1ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_RDONLY);
        LASSERTF(OBD_CONNECT_INDEX == 0x2ULL, "found 0x%.16llxULL\n",
@@ -1848,7 +1849,7 @@ void lustre_assert_wire_constants(void)
 
        /* Checks for struct lov_foreign_md */
        LASSERTF((int)sizeof(struct lov_foreign_md) == 16, "found %lld\n",
-               (long long)(int)sizeof(struct lov_foreign_md));
+                (long long)(int)sizeof(struct lov_foreign_md));
        LASSERTF((int)offsetof(struct lov_foreign_md, lfm_magic) == 0, "found %lld\n",
                 (long long)(int)offsetof(struct lov_foreign_md, lfm_magic));
        LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_magic) == 4, "found %lld\n",
@@ -1865,23 +1866,75 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_foreign_md, lfm_flags));
        LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_flags) == 4, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_flags));
-       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_value) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct lov_foreign_md, lfm_value));
-       LASSERTF(LU_FOREIGN_TYPE_NONE == 0, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_NONE);
-       LASSERTF(LU_FOREIGN_TYPE_POSIX == 1, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_POSIX);
-       LASSERTF(LU_FOREIGN_TYPE_PCCRW == 2, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_PCCRW);
-       LASSERTF(LU_FOREIGN_TYPE_PCCRO == 3, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_PCCRO);
-       LASSERTF(LU_FOREIGN_TYPE_S3 == 4, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_S3);
-       LASSERTF(LU_FOREIGN_TYPE_SYMLINK == 0x0000da05, "found 0x%.8xUL\n",
-                (unsigned)LU_FOREIGN_TYPE_SYMLINK);
+       LASSERTF((int)offsetof(struct lov_foreign_md, lfm_value[0]) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_foreign_md, lfm_value[0]));
+       LASSERTF((int)sizeof(((struct lov_foreign_md *)0)->lfm_value[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_foreign_md *)0)->lfm_value[0]));
+       LASSERTF(LU_FOREIGN_TYPE_NONE == 0x00000000UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_NONE);
+       LASSERTF(LU_FOREIGN_TYPE_POSIX == 0x00000001UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_POSIX);
+       LASSERTF(LU_FOREIGN_TYPE_PCCRW == 0x00000002UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_PCCRW);
+       LASSERTF(LU_FOREIGN_TYPE_PCCRO == 0x00000003UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_PCCRO);
+       LASSERTF(LU_FOREIGN_TYPE_S3 == 0x00000004UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_S3);
+       LASSERTF(LU_FOREIGN_TYPE_SYMLINK == 0x0000da05UL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_SYMLINK);
+       LASSERTF(LU_FOREIGN_TYPE_UNKNOWN == 0xffffffffUL, "found 0x%.8xUL\n",
+               (unsigned)LU_FOREIGN_TYPE_UNKNOWN);
        BUILD_BUG_ON(LOV_MAGIC_FOREIGN != (0x0BD70000 | 0x0BD0));
-       LASSERTF(LOV_PATTERN_FOREIGN == 0x00000400, "found 0x%.8xUL\n",
-                (unsigned)LOV_PATTERN_FOREIGN);
+       LASSERTF(LOV_PATTERN_FOREIGN == 0x00000400UL, "found 0x%.8xUL\n",
+               (unsigned)LOV_PATTERN_FOREIGN);
+
+       /* Checks for struct lov_hsm_base */
+       LASSERTF((int)sizeof(struct lov_hsm_base) == 56, "found %lld\n",
+                (long long)(int)sizeof(struct lov_hsm_base));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_archive_id) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_archive_id));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_id) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_id));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_archive_ver));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_archive_ver));
+       LASSERTF((int)offsetof(struct lov_hsm_base, lhb_uuid[0]) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_base, lhb_uuid[0]));
+       LASSERTF((int)sizeof(((struct lov_hsm_base *)0)->lhb_uuid[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_base *)0)->lhb_uuid[0]));
+
+       /* Checks for struct lov_hsm_md */
+       LASSERTF((int)sizeof(struct lov_hsm_md) == 72, "found %lld\n",
+                (long long)(int)sizeof(struct lov_hsm_md));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_magic) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_magic));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_magic) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_magic));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_length) == 4, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_length));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_length) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_length));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_type) == 8, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_type));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_type) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_type));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_flags) == 12, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_flags));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_flags));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_id) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_id));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_id) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_id));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_ver) == 24, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_archive_ver));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_ver) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_archive_ver));
+       LASSERTF((int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_uuid[0]) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct lov_hsm_md, lhm_hsm.lhb_uuid[0]));
+       LASSERTF((int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_uuid[0]) == 1, "found %lld\n",
+                (long long)(int)sizeof(((struct lov_hsm_md *)0)->lhm_hsm.lhb_uuid[0]));
 
        /* Checks for struct lov_comp_md_entry_v1 */
        LASSERTF((int)sizeof(struct lov_comp_md_entry_v1) == 48, "found %lld\n",
@@ -1926,6 +1979,8 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_comp_md_entry_v1, lcme_compr_type));
        LASSERTF((int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_compr_type) == 1, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_compr_type));
+       /* lov_comp_md_entry_v1.lcme_compr_lvl is a bitfield and cannot be checked */
+       /* lov_comp_md_entry_v1.lcme_compr_chunk_log_bits is a bitfield and cannot be checked */
        BUILD_BUG_ON(LCME_FL_STALE != 0x00000001);
        BUILD_BUG_ON(LCME_FL_PREF_RD != 0x00000002);
        BUILD_BUG_ON(LCME_FL_PREF_WR != 0x00000004);
@@ -4540,13 +4595,13 @@ void lustre_assert_wire_constants(void)
        LASSERTF((int)sizeof(((struct rsc_downcall_data *)0)->scd_val) == 0, "found %lld\n",
                 (long long)(int)sizeof(((struct rsc_downcall_data *)0)->scd_val));
        LASSERTF(RSC_DATA_FLAG_REMOTE == 0x00000001UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_REMOTE);
+               (unsigned)RSC_DATA_FLAG_REMOTE);
        LASSERTF(RSC_DATA_FLAG_ROOT == 0x00000002UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_ROOT);
+               (unsigned)RSC_DATA_FLAG_ROOT);
        LASSERTF(RSC_DATA_FLAG_MDS == 0x00000004UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_MDS);
+               (unsigned)RSC_DATA_FLAG_MDS);
        LASSERTF(RSC_DATA_FLAG_OSS == 0x00000008UL, "found 0x%.8xUL\n",
-                (unsigned)RSC_DATA_FLAG_OSS);
+               (unsigned)RSC_DATA_FLAG_OSS);
 
        /* Checks for struct llog_gen */
        LASSERTF((int)sizeof(struct llog_gen) == 16, "found %lld\n",