LASSERTF(LU_SEQ_RANGE_OST == 1, "found %lld\n",
(long long)LU_SEQ_RANGE_OST);
+ /* 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));
+
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct lustre_mdt_attrs */
LASSERTF((int)sizeof(struct lustre_mdt_attrs) == 24, "found %lld\n",
(long long)(int)sizeof(struct lustre_mdt_attrs));
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",
(long long)(int)sizeof(struct hsm_attrs));
(long long)(int)offsetof(struct hsm_attrs, hsm_arch_ver));
LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver) == 8, "found %lld\n",
(long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct ost_id */
LASSERTF((int)sizeof(struct ost_id) == 16, "found %lld\n",
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_DAOS == 0x0000da05UL, "found 0x%.8xUL\n",
+ (unsigned)LU_FOREIGN_TYPE_DAOS);
+ 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));
(long long)LCM_FL_SYNC_PENDING);
LASSERTF(LCM_FL_PCC_RDONLY == 8, "found %lld\n",
(long long)LCM_FL_PCC_RDONLY);
+ LASSERTF(LCM_FL_FLR_MASK == 11, "found %lld\n",
+ (long long)LCM_FL_FLR_MASK);
/* Checks for struct lmv_mds_md_v1 */
LASSERTF((int)sizeof(struct lmv_mds_md_v1) == 56, "found %lld\n",
BUILD_BUG_ON(LMV_HASH_FLAG_LOST_LMV != 0x10000000);
BUILD_BUG_ON(LMV_HASH_FLAG_BAD_TYPE != 0x20000000);
BUILD_BUG_ON(LMV_HASH_FLAG_MIGRATION != 0x80000000);
- BUILD_BUG_ON(LMV_HASH_FLAG_MIGRATION != 0x80000000);
BUILD_BUG_ON(LMV_CRUSH_PG_COUNT != 4096);
/* Checks for struct obd_statfs */
LASSERTF((int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted));
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct idx_info */
LASSERTF((int)sizeof(struct idx_info) == 80, "found %lld\n",
(long long)(int)sizeof(struct idx_info));
BUILD_BUG_ON(II_FL_VARREC != 0x00000004);
BUILD_BUG_ON(II_FL_NONUNQ != 0x00000008);
BUILD_BUG_ON(II_FL_NOKEY != 0x00000010);
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct niobuf_remote */
LASSERTF((int)sizeof(struct niobuf_remote) == 16, "found %lld\n",
LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2));
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct ldlm_gl_barrier_desc */
LASSERTF((int)sizeof(struct ldlm_gl_barrier_desc) == 16, "found %lld\n",
(long long)(int)sizeof(struct ldlm_gl_barrier_desc));
(long long)(int)offsetof(struct barrier_lvb, lvb_padding));
LASSERTF((int)sizeof(((struct barrier_lvb *)0)->lvb_padding) == 8, "found %lld\n",
(long long)(int)sizeof(((struct barrier_lvb *)0)->lvb_padding));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_send_param */
LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_archive_id) == 4, "found %lld\n",
(long long)(int)sizeof(((struct hsm_user_import *)0)->hui_archive_id));
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+
/* Checks for struct netobj_s */
LASSERTF((int)sizeof(struct netobj_s) == 4, "found %lld\n",
(long long)(int)sizeof(struct netobj_s));
(long long)(int)offsetof(struct gss_wire_ctx, gw_handle));
LASSERTF((int)sizeof(((struct gss_wire_ctx *)0)->gw_handle) == 16, "found %lld\n",
(long long)(int)sizeof(((struct gss_wire_ctx *)0)->gw_handle));
+#endif /* HAVE_NATIVE_LINUX_CLIENT */
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct object_update_param */
LASSERTF((int)sizeof(struct object_update_param) == 8, "found %lld\n",
(long long)(int)offsetof(struct nodemap_cluster_rec, ncr_name[16 + 1]));
LASSERTF((int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_name[16 + 1]) == 1, "found %lld\n",
(long long)(int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_name[16 + 1]));
- /* ncr_flags' address and size cannot be taken because it is a bit-field (8 bits) */
- /* ncr_flags2' address and size cannot be taken because it is a bit-field (8 bits) */
+ /* nodemap_cluster_rec.ncr_flags is a bitfield and cannot be checked */
+ /* nodemap_cluster_rec.ncr_flags2 is a bitfield and cannot be checked */
LASSERTF((int)offsetof(struct nodemap_cluster_rec, ncr_padding1) == 19, "found %lld\n",
(long long)(int)offsetof(struct nodemap_cluster_rec, ncr_padding1));
LASSERTF((int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_padding1) == 1, "found %lld\n",
(long long)NODEMAP_CLUSTER_REC);
LASSERTF(NODEMAP_CLUSTER_ROLES == 1, "found %lld\n",
(long long)NODEMAP_CLUSTER_ROLES);
- LASSERTF(NM_TYPE_MASK == 0x0FFFFFFFUL, "found 0x%.8llxUL\n",
- (long long)NM_TYPE_MASK);
+ LASSERTF(NM_TYPE_MASK == 0x0fffffffUL, "found 0x%.8xUL\n",
+ (unsigned)NM_TYPE_MASK);
LASSERTF(NM_TYPE_SHIFT == 28, "found %lld\n",
(long long)NM_TYPE_SHIFT);
- LASSERTF(NM_FL_ALLOW_ROOT_ACCESS == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_ALLOW_ROOT_ACCESS);
- LASSERTF(NM_FL_TRUST_CLIENT_IDS == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_TRUST_CLIENT_IDS);
- LASSERTF(NM_FL_DENY_UNKNOWN == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_DENY_UNKNOWN);
- LASSERTF(NM_FL_MAP_UID == 0x00000008UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_UID);
- LASSERTF(NM_FL_MAP_GID == 0x00000010UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_GID);
- LASSERTF(NM_FL_ENABLE_AUDIT == 0x00000020UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_ENABLE_AUDIT);
- LASSERTF(NM_FL_FORBID_ENCRYPT == 0x00000040UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_FORBID_ENCRYPT);
- LASSERTF(NM_FL_MAP_PROJID == 0x00000080UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_PROJID);
- LASSERTF(NM_FL2_READONLY_MOUNT == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NM_FL2_READONLY_MOUNT);
+ LASSERTF(NM_FL_ALLOW_ROOT_ACCESS == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_ALLOW_ROOT_ACCESS);
+ LASSERTF(NM_FL_TRUST_CLIENT_IDS == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_TRUST_CLIENT_IDS);
+ LASSERTF(NM_FL_DENY_UNKNOWN == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_DENY_UNKNOWN);
+ LASSERTF(NM_FL_MAP_UID == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_UID);
+ LASSERTF(NM_FL_MAP_GID == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_GID);
+ LASSERTF(NM_FL_ENABLE_AUDIT == 0x00000020UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_ENABLE_AUDIT);
+ LASSERTF(NM_FL_FORBID_ENCRYPT == 0x00000040UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_FORBID_ENCRYPT);
+ LASSERTF(NM_FL_MAP_PROJID == 0x00000080UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_PROJID);
+ LASSERTF(NM_FL2_READONLY_MOUNT == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL2_READONLY_MOUNT);
LASSERTF(NODEMAP_UID == 0, "found %lld\n",
(long long)NODEMAP_UID);
LASSERTF(NODEMAP_GID == 1, "found %lld\n",
(long long)NODEMAP_FS_TO_CLIENT);
LASSERTF(NODEMAP_CLIENT_TO_FS == 1, "found %lld\n",
(long long)NODEMAP_CLIENT_TO_FS);
- LASSERTF(NODEMAP_MAP_BOTH_LEGACY == 0x00000000UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_BOTH_LEGACY);
- LASSERTF(NODEMAP_MAP_UID == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_UID);
- LASSERTF(NODEMAP_MAP_GID == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_GID);
- LASSERTF(NODEMAP_MAP_BOTH == 0x00000003UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_BOTH);
- LASSERTF(NODEMAP_MAP_PROJID == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_PROJID);
- LASSERTF(NODEMAP_MAP_ALL == 0x00000007UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_ALL);
- LASSERTF(NODEMAP_RBAC_FILE_PERMS == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_FILE_PERMS);
- LASSERTF(NODEMAP_RBAC_DNE_OPS == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_DNE_OPS);
- LASSERTF(NODEMAP_RBAC_QUOTA_OPS == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_QUOTA_OPS);
- LASSERTF(NODEMAP_RBAC_BYFID_OPS == 0x00000008UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_BYFID_OPS);
- LASSERTF(NODEMAP_RBAC_CHLG_OPS == 0x00000010UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_CHLG_OPS);
- LASSERTF(NODEMAP_RBAC_FSCRYPT_ADMIN == 0x00000020UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_FSCRYPT_ADMIN);
- LASSERTF(NODEMAP_RBAC_NONE == 0xFFFFFFC0UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_NONE);
- LASSERTF(NODEMAP_RBAC_ALL == 0xFFFFFFFFUL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_ALL);
+ LASSERTF(NODEMAP_MAP_BOTH_LEGACY == 0x00000000UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_BOTH_LEGACY);
+ LASSERTF(NODEMAP_MAP_UID == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_UID);
+ LASSERTF(NODEMAP_MAP_GID == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_GID);
+ LASSERTF(NODEMAP_MAP_BOTH == 0x00000003UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_BOTH);
+ LASSERTF(NODEMAP_MAP_PROJID == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_PROJID);
+ LASSERTF(NODEMAP_MAP_ALL == 0x00000007UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_ALL);
+ LASSERTF(NODEMAP_RBAC_FILE_PERMS == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_FILE_PERMS);
+ LASSERTF(NODEMAP_RBAC_DNE_OPS == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_DNE_OPS);
+ LASSERTF(NODEMAP_RBAC_QUOTA_OPS == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_QUOTA_OPS);
+ LASSERTF(NODEMAP_RBAC_BYFID_OPS == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_BYFID_OPS);
+ LASSERTF(NODEMAP_RBAC_CHLG_OPS == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_CHLG_OPS);
+ LASSERTF(NODEMAP_RBAC_FSCRYPT_ADMIN == 0x00000020UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_FSCRYPT_ADMIN);
+ LASSERTF(NODEMAP_RBAC_NONE == 0xffffffc0UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_NONE);
+ LASSERTF(NODEMAP_RBAC_ALL == 0xffffffffUL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_ALL);
LASSERTF(OFD_ACCESS_READ == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OFD_ACCESS_READ);
(long long)(int)offsetof(struct llog_update_record, lur_update_rec));
LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
(long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct lustre_cfg */
LASSERTF((int)sizeof(struct lustre_cfg) == 32, "found %lld\n",
LASSERTF(LCFG_NODEMAP_ADMIN == 0x000ce049UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_ADMIN);
LASSERTF(LCFG_NODEMAP_ADD_PROJIDMAP == 0x000ce04aUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_ADD_PROJIDMAP);
+ (unsigned)LCFG_NODEMAP_ADD_PROJIDMAP);
LASSERTF(LCFG_NODEMAP_DEL_PROJIDMAP == 0x000ce04bUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_DEL_PROJIDMAP);
+ (unsigned)LCFG_NODEMAP_DEL_PROJIDMAP);
LASSERTF(LCFG_NODEMAP_TRUSTED == 0x000ce050UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_TRUSTED);
LASSERTF(LCFG_NODEMAP_SQUASH_UID == 0x000ce051UL, "found 0x%.8xUL\n",
LASSERTF(LCFG_NODEMAP_SET_SEPOL == 0x000ce05bUL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_SET_SEPOL);
LASSERTF(LCFG_NODEMAP_FORBID_ENCRYPT == 0x000ce05cUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_FORBID_ENCRYPT);
+ (unsigned)LCFG_NODEMAP_FORBID_ENCRYPT);
LASSERTF(LCFG_NODEMAP_SQUASH_PROJID == 0x000ce05dUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_SQUASH_PROJID);
+ (unsigned)LCFG_NODEMAP_SQUASH_PROJID);
LASSERTF(LCFG_NODEMAP_READONLY_MOUNT == 0x000ce05eUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_READONLY_MOUNT);
+ (unsigned)LCFG_NODEMAP_READONLY_MOUNT);
LASSERTF(LCFG_NODEMAP_RBAC == 0x000ce05fUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_RBAC);
+ (unsigned)LCFG_NODEMAP_RBAC);
LASSERTF(PORTALS_CFG_TYPE == 1, "found %lld\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",
(int)sizeof(((struct s2 *)0)->m)); \
} while (0)
+/* could maybe check this in the future, just add a comment for now */
+#define CHECK_BITFIELD(s, m) \
+ COMMENT(""#s"."#m" is a bitfield and cannot be checked")
+
+#define CHECK_COND_START(cond) printf("\n#ifdef "#cond"\n")
+#define CHECK_COND_STARTN(cond) printf("\n#ifndef "#cond"\n")
+#define CHECK_COND_FINISH(cond) printf("#endif /* "#cond" */\n")
+
static void
check_lu_seq_range(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);
CHECK_VALUE(LCM_FL_RDONLY);
CHECK_VALUE(LCM_FL_WRITE_PENDING);
CHECK_VALUE(LCM_FL_SYNC_PENDING);
+ CHECK_VALUE(LCM_FL_PCC_RDONLY);
+ CHECK_VALUE(LCM_FL_FLR_MASK);
}
static void
CHECK_STRUCT(nodemap_cluster_rec);
CHECK_CDEFINE(LUSTRE_NODEMAP_NAME_LENGTH);
CHECK_MEMBER(nodemap_cluster_rec, ncr_name[LUSTRE_NODEMAP_NAME_LENGTH + 1]);
- CHECK_MEMBER(nodemap_cluster_rec, ncr_flags);
- CHECK_MEMBER(nodemap_cluster_rec, ncr_flags2);
+ CHECK_BITFIELD(nodemap_cluster_rec, ncr_flags);
+ CHECK_BITFIELD(nodemap_cluster_rec, ncr_flags2);
CHECK_MEMBER(nodemap_cluster_rec, ncr_padding1);
CHECK_MEMBER(nodemap_cluster_rec, ncr_squash_projid);
CHECK_MEMBER(nodemap_cluster_rec, ncr_squash_uid);
BLANK_LINE();
CHECK_STRUCT(nodemap_key);
CHECK_MEMBER(nodemap_key, nk_nodemap_id);
+ CHECK_MEMBER(nodemap_key, nk_cluster_subid);
+ CHECK_MEMBER(nodemap_key, nk_range_id);
+ CHECK_MEMBER(nodemap_key, nk_id_client);
+ CHECK_MEMBER(nodemap_key, nk_unused);
CHECK_VALUE(NODEMAP_EMPTY_IDX);
CHECK_VALUE(NODEMAP_CLUSTER_IDX);
BLANK_LINE();
CHECK_STRUCT(obd_uuid);
check_lu_seq_range();
+ check_som_attrs();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ CHECK_COND_START(HAVE_SERVER_SUPPORT);
check_lustre_mdt_attrs();
check_lustre_ost_attrs();
CHECK_VALUE(OUT_NOOP);
CHECK_VALUE(OUT_XATTR_LIST);
- check_som_attrs();
check_hsm_attrs();
+ CHECK_COND_FINISH(HAVE_SERVER_SUPPORT);
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_ost_id();
check_lu_dirent();
check_luda_type();
check_obd_statfs();
check_obd_ioobj();
check_obd_quotactl();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ CHECK_COND_START(HAVE_SERVER_SUPPORT);
check_obd_idx_read();
+ CHECK_COND_FINISH(HAVE_SERVER_SUPPORT);
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_niobuf_remote();
check_ost_body();
check_ll_fid();
check_ldlm_ost_lvb();
check_ldlm_lquota_lvb();
check_ldlm_gl_lquota_desc();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ CHECK_COND_START(HAVE_SERVER_SUPPORT);
check_ldlm_gl_barrier_desc();
check_ldlm_barrier_lvb();
+ CHECK_COND_FINISH(HAVE_SERVER_SUPPORT);
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 18, 53, 0)
check_mgs_send_param();
#endif
check_hsm_user_request();
check_hsm_user_import();
+ CHECK_COND_STARTN(HAVE_NATIVE_LINUX_CLIENT);
check_netobj_s();
check_rawobj_s();
check_gss_header();
check_gss_rep_header();
check_gss_err_header();
check_gss_wire_ctx();
+ CHECK_COND_FINISH(HAVE_NATIVE_LINUX_CLIENT);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ CHECK_COND_START(HAVE_SERVER_SUPPORT);
check_object_update_param();
check_object_update();
check_object_update_request();
check_update_ops();
check_update_records();
check_llog_update_record();
-
+ CHECK_COND_FINISH(HAVE_SERVER_SUPPORT);
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_lustre_cfg();
printf("}\n");
#include <linux/lustre/lustre_access_log.h>
#ifdef HAVE_SERVER_SUPPORT
#include <linux/lustre/lustre_lfsck_user.h>
+#include <linux/lustre/lustre_disk.h>
#ifdef CONFIG_FS_POSIX_ACL
#include <linux/posix_acl_xattr.h>
#ifdef HAVE_STRUCT_POSIX_ACL_XATTR
#endif /* HAVE_STRUCT_POSIX_ACL_XATTR */
#endif /* CONFIG_FS_POSIX_ACL */
#endif /* HAVE_SERVER_SUPPORT */
-#include <linux/lustre/lustre_disk.h>
#include <linux/lustre/lustre_cfg.h>
#ifndef BUILD_BUG_ON
LASSERTF(LU_SEQ_RANGE_OST == 1, "found %lld\n",
(long long)LU_SEQ_RANGE_OST);
+ /* 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));
+
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct lustre_mdt_attrs */
LASSERTF((int)sizeof(struct lustre_mdt_attrs) == 24, "found %lld\n",
(long long)(int)sizeof(struct lustre_mdt_attrs));
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",
(long long)(int)sizeof(struct hsm_attrs));
(long long)(int)offsetof(struct hsm_attrs, hsm_arch_ver));
LASSERTF((int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver) == 8, "found %lld\n",
(long long)(int)sizeof(((struct hsm_attrs *)0)->hsm_arch_ver));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct ost_id */
LASSERTF((int)sizeof(struct ost_id) == 16, "found %lld\n",
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_DAOS == 0x0000da05UL, "found 0x%.8xUL\n",
+ (unsigned)LU_FOREIGN_TYPE_DAOS);
+ 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));
(long long)LCM_FL_SYNC_PENDING);
LASSERTF(LCM_FL_PCC_RDONLY == 8, "found %lld\n",
(long long)LCM_FL_PCC_RDONLY);
+ LASSERTF(LCM_FL_FLR_MASK == 11, "found %lld\n",
+ (long long)LCM_FL_FLR_MASK);
/* Checks for struct lmv_mds_md_v1 */
LASSERTF((int)sizeof(struct lmv_mds_md_v1) == 56, "found %lld\n",
LASSERTF((int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lquota_slv_rec *)0)->qsr_granted));
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct idx_info */
LASSERTF((int)sizeof(struct idx_info) == 80, "found %lld\n",
(long long)(int)sizeof(struct idx_info));
BUILD_BUG_ON(II_FL_VARREC != 0x00000004);
BUILD_BUG_ON(II_FL_NONUNQ != 0x00000008);
BUILD_BUG_ON(II_FL_NOKEY != 0x00000010);
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct niobuf_remote */
LASSERTF((int)sizeof(struct niobuf_remote) == 16, "found %lld\n",
LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad2));
+#ifdef HAVE_SERVER_SUPPORT
+
/* Checks for struct ldlm_gl_barrier_desc */
LASSERTF((int)sizeof(struct ldlm_gl_barrier_desc) == 16, "found %lld\n",
(long long)(int)sizeof(struct ldlm_gl_barrier_desc));
(long long)(int)offsetof(struct barrier_lvb, lvb_padding));
LASSERTF((int)sizeof(((struct barrier_lvb *)0)->lvb_padding) == 8, "found %lld\n",
(long long)(int)sizeof(((struct barrier_lvb *)0)->lvb_padding));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_send_param */
LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
LASSERTF((int)sizeof(((struct hsm_user_import *)0)->hui_archive_id) == 4, "found %lld\n",
(long long)(int)sizeof(((struct hsm_user_import *)0)->hui_archive_id));
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+
/* Checks for struct netobj_s */
LASSERTF((int)sizeof(struct netobj_s) == 4, "found %lld\n",
(long long)(int)sizeof(struct netobj_s));
(long long)(int)offsetof(struct gss_wire_ctx, gw_handle));
LASSERTF((int)sizeof(((struct gss_wire_ctx *)0)->gw_handle) == 16, "found %lld\n",
(long long)(int)sizeof(((struct gss_wire_ctx *)0)->gw_handle));
+#endif /* HAVE_NATIVE_LINUX_CLIENT */
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct object_update_param */
LASSERTF((int)sizeof(struct object_update_param) == 8, "found %lld\n",
(long long)(int)offsetof(struct nodemap_cluster_rec, ncr_name[16 + 1]));
LASSERTF((int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_name[16 + 1]) == 1, "found %lld\n",
(long long)(int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_name[16 + 1]));
- /* ncr_flags' address and size cannot be taken because it is a bit-field (8 bits) */
- /* ncr_flags2' address and size cannot be taken because it is a bit-field (8 bits) */
+ /* nodemap_cluster_rec.ncr_flags is a bitfield and cannot be checked */
+ /* nodemap_cluster_rec.ncr_flags2 is a bitfield and cannot be checked */
LASSERTF((int)offsetof(struct nodemap_cluster_rec, ncr_padding1) == 19, "found %lld\n",
(long long)(int)offsetof(struct nodemap_cluster_rec, ncr_padding1));
LASSERTF((int)sizeof(((struct nodemap_cluster_rec *)0)->ncr_padding1) == 1, "found %lld\n",
(long long)NODEMAP_CLUSTER_REC);
LASSERTF(NODEMAP_CLUSTER_ROLES == 1, "found %lld\n",
(long long)NODEMAP_CLUSTER_ROLES);
- LASSERTF(NM_TYPE_MASK == 0x0FFFFFFFUL, "found 0x%.8llxUL\n",
- (long long)NM_TYPE_MASK);
+ LASSERTF(NM_TYPE_MASK == 0x0fffffffUL, "found 0x%.8xUL\n",
+ (unsigned)NM_TYPE_MASK);
LASSERTF(NM_TYPE_SHIFT == 28, "found %lld\n",
(long long)NM_TYPE_SHIFT);
- LASSERTF(NM_FL_ALLOW_ROOT_ACCESS == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_ALLOW_ROOT_ACCESS);
- LASSERTF(NM_FL_TRUST_CLIENT_IDS == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_TRUST_CLIENT_IDS);
- LASSERTF(NM_FL_DENY_UNKNOWN == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_DENY_UNKNOWN);
- LASSERTF(NM_FL_MAP_UID == 0x00000008UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_UID);
- LASSERTF(NM_FL_MAP_GID == 0x00000010UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_GID);
- LASSERTF(NM_FL_ENABLE_AUDIT == 0x00000020UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_ENABLE_AUDIT);
- LASSERTF(NM_FL_FORBID_ENCRYPT == 0x00000040UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_FORBID_ENCRYPT);
- LASSERTF(NM_FL_MAP_PROJID == 0x00000080UL, "found 0x%.8llxUL\n",
- (long long)NM_FL_MAP_PROJID);
- LASSERTF(NM_FL2_READONLY_MOUNT == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NM_FL2_READONLY_MOUNT);
+ LASSERTF(NM_FL_ALLOW_ROOT_ACCESS == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_ALLOW_ROOT_ACCESS);
+ LASSERTF(NM_FL_TRUST_CLIENT_IDS == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_TRUST_CLIENT_IDS);
+ LASSERTF(NM_FL_DENY_UNKNOWN == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_DENY_UNKNOWN);
+ LASSERTF(NM_FL_MAP_UID == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_UID);
+ LASSERTF(NM_FL_MAP_GID == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_GID);
+ LASSERTF(NM_FL_ENABLE_AUDIT == 0x00000020UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_ENABLE_AUDIT);
+ LASSERTF(NM_FL_FORBID_ENCRYPT == 0x00000040UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_FORBID_ENCRYPT);
+ LASSERTF(NM_FL_MAP_PROJID == 0x00000080UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL_MAP_PROJID);
+ LASSERTF(NM_FL2_READONLY_MOUNT == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NM_FL2_READONLY_MOUNT);
LASSERTF(NODEMAP_UID == 0, "found %lld\n",
(long long)NODEMAP_UID);
LASSERTF(NODEMAP_GID == 1, "found %lld\n",
(long long)NODEMAP_FS_TO_CLIENT);
LASSERTF(NODEMAP_CLIENT_TO_FS == 1, "found %lld\n",
(long long)NODEMAP_CLIENT_TO_FS);
- LASSERTF(NODEMAP_MAP_BOTH_LEGACY == 0x00000000UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_BOTH_LEGACY);
- LASSERTF(NODEMAP_MAP_UID == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_UID);
- LASSERTF(NODEMAP_MAP_GID == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_GID);
- LASSERTF(NODEMAP_MAP_BOTH == 0x00000003UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_BOTH);
- LASSERTF(NODEMAP_MAP_PROJID == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_PROJID);
- LASSERTF(NODEMAP_MAP_ALL == 0x00000007UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_MAP_ALL);
- LASSERTF(NODEMAP_RBAC_FILE_PERMS == 0x00000001UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_FILE_PERMS);
- LASSERTF(NODEMAP_RBAC_DNE_OPS == 0x00000002UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_DNE_OPS);
- LASSERTF(NODEMAP_RBAC_QUOTA_OPS == 0x00000004UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_QUOTA_OPS);
- LASSERTF(NODEMAP_RBAC_BYFID_OPS == 0x00000008UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_BYFID_OPS);
- LASSERTF(NODEMAP_RBAC_CHLG_OPS == 0x00000010UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_CHLG_OPS);
- LASSERTF(NODEMAP_RBAC_FSCRYPT_ADMIN == 0x00000020UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_FSCRYPT_ADMIN);
- LASSERTF(NODEMAP_RBAC_NONE == 0xFFFFFFC0UL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_NONE);
- LASSERTF(NODEMAP_RBAC_ALL == 0xFFFFFFFFUL, "found 0x%.8llxUL\n",
- (long long)NODEMAP_RBAC_ALL);
+ LASSERTF(NODEMAP_MAP_BOTH_LEGACY == 0x00000000UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_BOTH_LEGACY);
+ LASSERTF(NODEMAP_MAP_UID == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_UID);
+ LASSERTF(NODEMAP_MAP_GID == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_GID);
+ LASSERTF(NODEMAP_MAP_BOTH == 0x00000003UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_BOTH);
+ LASSERTF(NODEMAP_MAP_PROJID == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_PROJID);
+ LASSERTF(NODEMAP_MAP_ALL == 0x00000007UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_MAP_ALL);
+ LASSERTF(NODEMAP_RBAC_FILE_PERMS == 0x00000001UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_FILE_PERMS);
+ LASSERTF(NODEMAP_RBAC_DNE_OPS == 0x00000002UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_DNE_OPS);
+ LASSERTF(NODEMAP_RBAC_QUOTA_OPS == 0x00000004UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_QUOTA_OPS);
+ LASSERTF(NODEMAP_RBAC_BYFID_OPS == 0x00000008UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_BYFID_OPS);
+ LASSERTF(NODEMAP_RBAC_CHLG_OPS == 0x00000010UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_CHLG_OPS);
+ LASSERTF(NODEMAP_RBAC_FSCRYPT_ADMIN == 0x00000020UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_FSCRYPT_ADMIN);
+ LASSERTF(NODEMAP_RBAC_NONE == 0xffffffc0UL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_NONE);
+ LASSERTF(NODEMAP_RBAC_ALL == 0xffffffffUL, "found 0x%.8xUL\n",
+ (unsigned)NODEMAP_RBAC_ALL);
LASSERTF(OFD_ACCESS_READ == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OFD_ACCESS_READ);
(long long)(int)offsetof(struct llog_update_record, lur_update_rec));
LASSERTF((int)sizeof(((struct llog_update_record *)0)->lur_update_rec) == 32, "found %lld\n",
(long long)(int)sizeof(((struct llog_update_record *)0)->lur_update_rec));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct lustre_cfg */
LASSERTF((int)sizeof(struct lustre_cfg) == 32, "found %lld\n",
LASSERTF(LCFG_NODEMAP_ADMIN == 0x000ce049UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_ADMIN);
LASSERTF(LCFG_NODEMAP_ADD_PROJIDMAP == 0x000ce04aUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_ADD_PROJIDMAP);
+ (unsigned)LCFG_NODEMAP_ADD_PROJIDMAP);
LASSERTF(LCFG_NODEMAP_DEL_PROJIDMAP == 0x000ce04bUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_DEL_PROJIDMAP);
+ (unsigned)LCFG_NODEMAP_DEL_PROJIDMAP);
LASSERTF(LCFG_NODEMAP_TRUSTED == 0x000ce050UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_TRUSTED);
LASSERTF(LCFG_NODEMAP_SQUASH_UID == 0x000ce051UL, "found 0x%.8xUL\n",
LASSERTF(LCFG_NODEMAP_SET_SEPOL == 0x000ce05bUL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_SET_SEPOL);
LASSERTF(LCFG_NODEMAP_FORBID_ENCRYPT == 0x000ce05cUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_FORBID_ENCRYPT);
+ (unsigned)LCFG_NODEMAP_FORBID_ENCRYPT);
LASSERTF(LCFG_NODEMAP_SQUASH_PROJID == 0x000ce05dUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_SQUASH_PROJID);
+ (unsigned)LCFG_NODEMAP_SQUASH_PROJID);
LASSERTF(LCFG_NODEMAP_READONLY_MOUNT == 0x000ce05eUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_READONLY_MOUNT);
+ (unsigned)LCFG_NODEMAP_READONLY_MOUNT);
LASSERTF(LCFG_NODEMAP_RBAC == 0x000ce05fUL, "found 0x%.8xUL\n",
- (unsigned)LCFG_NODEMAP_RBAC);
+ (unsigned)LCFG_NODEMAP_RBAC);
LASSERTF(PORTALS_CFG_TYPE == 1, "found %lld\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",