FID_SEQ_OST_MDT0 = 0,
FID_SEQ_LLOG = 1, /* unnamed llogs */
FID_SEQ_ECHO = 2,
- FID_SEQ_UNUSED_START = 3,
- FID_SEQ_UNUSED_END = 9,
+ FID_SEQ_UNUSED_START = 3, /* Unused */
+ FID_SEQ_UNUSED_END = 9, /* Unused */
FID_SEQ_LLOG_NAME = 10, /* named llogs */
FID_SEQ_RSVD = 11,
FID_SEQ_IGIF = 12,
/* was OBD_CONNECT_TRUNCLOCK 0x400ULL *locks on server for punch */
#define OBD_CONNECT_TRANSNO 0x800ULL /*replay sends init transno */
#define OBD_CONNECT_IBITS 0x1000ULL /* not checked in 2.11+ */
-#define OBD_CONNECT_BARRIER 0x2000ULL /* write barrier */
+#define OBD_CONNECT_BARRIER 0x2000ULL /* write barrier. Resevered to
+ * avoid use on client.
+ */
#define OBD_CONNECT_ATTRFID 0x4000ULL /*Server can GetAttr By Fid*/
#define OBD_CONNECT_NODEVOH 0x8000ULL /*No open hndl on specl nodes*/
#define OBD_CONNECT_RMT_CLIENT 0x10000ULL /* Remote client, never used
/* for multiple changelog consumers */
LLOG_CHANGELOG_USER_ORIG_CTXT = 14,
LLOG_AGENT_ORIG_CTXT = 15, /**< agent requests generation on cdt */
- LLOG_UPDATELOG_ORIG_CTXT = 16, /* update log */
- LLOG_UPDATELOG_REPL_CTXT = 17, /* update log */
+ LLOG_UPDATELOG_ORIG_CTXT = 16, /* update log. reserve for the client */
+ LLOG_UPDATELOG_REPL_CTXT = 17, /* update log. reserve for the client */
LLOG_MAX_CTXTS
};
CHANGELOG_USER_REC = LLOG_OP_MAGIC | 0x70000,
CHANGELOG_USER_REC2 = LLOG_OP_MAGIC | 0x70002,
HSM_AGENT_REC = LLOG_OP_MAGIC | 0x80000,
- UPDATE_REC = LLOG_OP_MAGIC | 0xa0000,
+ UPDATE_REC = LLOG_OP_MAGIC | 0xa0000, /* Resevered to avoid
+ * use on client.
+ */
LLOG_HDR_MAGIC = LLOG_OP_MAGIC | 0x45539,
LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
};
(long long)SEQ_FIRST_OPC);
LASSERTF(SEQ_LAST_OPC == 701, "found %lld\n",
(long long)SEQ_LAST_OPC);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LFSCK_NOTIFY == 1101, "found %lld\n",
(long long)LFSCK_NOTIFY);
LASSERTF(LFSCK_QUERY == 1102, "found %lld\n",
(long long)LFSCK_FIRST_OPC);
LASSERTF(LFSCK_LAST_OPC == 1103, "found %lld\n",
(long long)LFSCK_LAST_OPC);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(SEQ_ALLOC_SUPER == 0, "found %lld\n",
(long long)SEQ_ALLOC_SUPER);
LASSERTF(SEQ_ALLOC_META == 1, "found %lld\n",
BUILD_BUG_ON(LDLM_MAX_TYPE != 14);
BUILD_BUG_ON(LUSTRE_RES_ID_SEQ_OFF != 0);
BUILD_BUG_ON(LUSTRE_RES_ID_VER_OID_OFF != 1);
+ BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_SEQ_OFF != 2);
+ BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_VER_OID_OFF != 3);
+ BUILD_BUG_ON(LUSTRE_RES_ID_HSH_OFF != 3);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(OUT_UPDATE == 1000, "found %lld\n",
(long long)OUT_UPDATE);
LASSERTF(OUT_UPDATE_LAST_OPC == 1001, "found %lld\n",
(long long)OUT_UPDATE_LAST_OPC);
- BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_SEQ_OFF != 2);
- BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_VER_OID_OFF != 3);
- BUILD_BUG_ON(LUSTRE_RES_ID_HSH_OFF != 3);
BUILD_BUG_ON(LQUOTA_TYPE_USR != 0);
BUILD_BUG_ON(LQUOTA_TYPE_GRP != 1);
BUILD_BUG_ON(LQUOTA_RES_MD != 1);
BUILD_BUG_ON(LQUOTA_RES_DT != 2);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(OBD_PING == 400, "found %lld\n",
(long long)OBD_PING);
LASSERTF(OBD_IDX_READ == 403, "found %lld\n",
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",
(long long)FID_SEQ_QUOTA_GLB);
LASSERTF(FID_SEQ_ROOT == 0x0000000200000007ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_ROOT);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(FID_SEQ_LAYOUT_RBTREE == 0x0000000200000008ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_LAYOUT_RBTREE);
LASSERTF(FID_SEQ_UPDATE_LOG == 0x0000000200000009ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_UPDATE_LOG);
LASSERTF(FID_SEQ_UPDATE_LOG_DIR == 0x000000020000000aULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_UPDATE_LOG_DIR);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(FID_SEQ_NORMAL == 0x0000000200000400ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_NORMAL);
LASSERTF(FID_SEQ_LOV_DEFAULT == 0xffffffffffffffffULL, "found 0x%.16llxULL\n",
(long long)LDF_COLLIDE);
LASSERTF(LU_PAGE_SIZE == 4096, "found %lld\n",
(long long)LU_PAGE_SIZE);
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for union lu_page */
LASSERTF((int)sizeof(union lu_page) == 4096, "found %lld\n",
(long long)(int)sizeof(union lu_page));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct lu_ladvise */
LASSERTF((int)sizeof(struct lu_ladvise) == 32, "found %lld\n",
OBD_MD_FLCROSSREF);
LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLGETATTRLOCK);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(OBD_MD_FLOBJCOUNT == (0x0000400000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLOBJCOUNT);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLDATAVERSION);
LASSERTF(OBD_MD_CLOSE_INTENT_EXECED == (0x0020000000000000ULL), "found 0x%.16llxULL\n",
(long long)(int)offsetof(struct lmv_mds_md_v1, lmv_padding3));
LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3));
- LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]) == 55, "found %lld\n",
- (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]));
- LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]) == 1, "found %lld\n",
- (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]));
+ LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15 + 1]) == 56, "found %lld\n",
+ (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15 + 1]));
+ LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15 + 1]) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15 + 1]));
LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]) == 56, "found %lld\n",
(long long)(int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]));
LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_fids[0]) == 16, "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 */
Q_GETOQUOTA);
LASSERTF(Q_FINVALIDATE == 0x800104, "found 0x%.8x\n",
Q_FINVALIDATE);
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct lquota_acct_rec */
LASSERTF((int)sizeof(struct lquota_acct_rec) == 16, "found %lld\n",
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",
(unsigned)LUSTRE_NOATIME_FL);
LASSERTF(LUSTRE_INDEX_FL == 0x00001000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_INDEX_FL);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LUSTRE_ORPHAN_FL == 0x00002000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_ORPHAN_FL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(LUSTRE_DIRSYNC_FL == 0x00010000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_DIRSYNC_FL);
LASSERTF(LUSTRE_TOPDIR_FL == 0x00020000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_TOPDIR_FL);
LASSERTF(LUSTRE_INLINE_DATA_FL == 0x10000000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_INLINE_DATA_FL);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LUSTRE_SET_SYNC_FL == 0x00040000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_SET_SYNC_FL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(LUSTRE_ENCRYPT_FL == 0x00800000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_ENCRYPT_FL);
LASSERTF(MDS_INODELOCK_LOOKUP == 0x00000001UL, "found 0x%.8xUL\n",
(long long)(int)offsetof(struct ldlm_inodebits, bits));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->bits) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_inodebits *)0)->bits));
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF((int)offsetof(struct ldlm_inodebits, try_bits) == 8, "found %lld\n",
(long long)(int)offsetof(struct ldlm_inodebits, try_bits));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->try_bits) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_inodebits *)0)->try_bits));
+#else
+ LASSERTF((int)offsetof(struct ldlm_inodebits, cancel_bits) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_inodebits, cancel_bits));
+ LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->cancel_bits) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_inodebits *)0)->cancel_bits));
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF((int)offsetof(struct ldlm_inodebits, li_gid) == 16, "found %lld\n",
(long long)(int)offsetof(struct ldlm_inodebits, li_gid));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->li_gid) == 8, "found %lld\n",
(long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2));
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)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 llog_unlink64_rec *)0)->lur_padding3) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_unlink64_rec *)0)->lur_padding3));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct llog_setattr64_rec */
LASSERTF((int)sizeof(struct llog_setattr64_rec) == 64, "found %lld\n",
(long long)(int)sizeof(struct llog_setattr64_rec));
(long long)(int)offsetof(struct llog_setattr64_rec_v2, lsr_tail));
LASSERTF((int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct llog_size_change_rec */
LASSERTF((int)sizeof(struct llog_size_change_rec) == 64, "found %lld\n",
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));
+#ifdef HAVE_SERVER_SUPPORT
/* 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));
(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));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct changelog_setinfo */
LASSERTF((int)sizeof(struct changelog_setinfo) == 12, "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));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct llog_changelog_user_rec */
LASSERTF((int)sizeof(struct llog_changelog_user_rec) == 40, "found %lld\n",
(long long)(int)offsetof(struct llog_changelog_user_rec, cur_tail));
LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_tail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_changelog_user_rec *)0)->cur_tail));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct llog_gen */
LASSERTF((int)sizeof(struct llog_gen) == 16, "found %lld\n",
(long long)(int)offsetof(struct ll_fiemap_info_key, lfik_fiemap));
LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap) == 32, "found %lld\n",
(long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct quota_body */
LASSERTF((int)sizeof(struct quota_body) == 112, "found %lld\n",
(long long)(int)offsetof(struct quota_body, qb_padding1[4]));
LASSERTF((int)sizeof(((struct quota_body *)0)->qb_padding1[4]) == 8, "found %lld\n",
(long long)(int)sizeof(((struct quota_body *)0)->qb_padding1[4]));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_target_info */
LASSERTF((int)sizeof(struct mgs_target_info) == 4544, "found %lld\n",
BUILD_BUG_ON(MGS_CFG_T_SPTLRPC != 1);
BUILD_BUG_ON(MGS_CFG_T_RECOVER != 2);
BUILD_BUG_ON(MGS_CFG_T_PARAMS != 3);
+#ifdef HAVE_SERVER_SUPPORT
BUILD_BUG_ON(MGS_CFG_T_NODEMAP != 4);
BUILD_BUG_ON(MGS_CFG_T_BARRIER != 5);
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_config_res */
LASSERTF((int)sizeof(struct mgs_config_res) == 16, "found %lld\n",
(long long)(int)offsetof(struct getinfo_fid2path, gf_pathlen));
LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_pathlen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_pathlen));
+#ifdef HAVE_FID2PATH_ANON_UNIONS
+ LASSERTF((int)offsetof(struct getinfo_fid2path, gf_path[0]) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct getinfo_fid2path, gf_path[0]));
+ LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]));
+#else
LASSERTF((int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]) == 32, "found %lld\n",
(long long)(int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]));
LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]) == 1, "found %lld\n",
(long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]));
+#endif /* HAVE_FID2PATH_ANON_UNIONS */
/* Checks for struct fiemap */
LASSERTF((int)sizeof(struct fiemap) == 32, "found %lld\n",
(long long)(int)offsetof(struct hsm_user_import, hui_archive_id));
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));
+#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 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",
(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",
(unsigned)LCFG_PRE_CLEANUP);
LASSERTF(LCFG_SET_PARAM == 0x000ce032UL, "found 0x%.8xUL\n",
(unsigned)LCFG_SET_PARAM);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LCFG_NODEMAP_ADD == 0x000ce040UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_ADD);
LASSERTF(LCFG_NODEMAP_DEL == 0x000ce041UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_AUDIT_MODE);
LASSERTF(LCFG_NODEMAP_SET_SEPOL == 0x000ce05bUL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_SET_SEPOL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(PORTALS_CFG_TYPE == 1, "found %lld\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",
static int fid_from_lma(const char *path, int fd, struct lu_fid *fid)
{
+#ifdef HAVE_SERVER_SUPPORT
struct lustre_mdt_attrs *lma;
char buf[512];
int rc = -1;
lma = (struct lustre_mdt_attrs *)buf;
memcpy(fid, &lma->lma_self_fid, sizeof(lma->lma_self_fid));
return 0;
+#else
+ return -ENOTSUP;
+#endif
}
int llapi_fd2fid(int fd, struct lu_fid *fid)
#include <sys/types.h>
#include <sys/wait.h>
#include <linux/lustre/lustre_idl.h>
+#ifndef HAVE_NATIVE_LINUX_CLIENT
#include <linux/lustre/lustre_access_log.h>
#include <linux/lustre/lustre_lfsck_user.h>
#include <linux/lustre/lustre_disk.h>
+#endif
#include <linux/lustre/lustre_cfg.h>
#define BLANK_LINE() \
CHECK_VALUE(LU_SEQ_RANGE_OST);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void
check_lustre_mdt_attrs(void)
{
CHECK_MEMBER(lustre_ost_attrs, loa_comp_end);
}
+static void
+check_hsm_attrs(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(hsm_attrs);
+ CHECK_MEMBER(hsm_attrs, hsm_compat);
+ CHECK_MEMBER(hsm_attrs, hsm_flags);
+ CHECK_MEMBER(hsm_attrs, hsm_arch_id);
+ CHECK_MEMBER(hsm_attrs, hsm_arch_ver);
+}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
static void
check_som_attrs(void)
}
static void
-check_hsm_attrs(void)
-{
- BLANK_LINE();
- CHECK_STRUCT(hsm_attrs);
- CHECK_MEMBER(hsm_attrs, hsm_compat);
- CHECK_MEMBER(hsm_attrs, hsm_flags);
- CHECK_MEMBER(hsm_attrs, hsm_arch_id);
- CHECK_MEMBER(hsm_attrs, hsm_arch_ver);
-}
-
-static void
check_ost_id(void)
{
BLANK_LINE();
CHECK_VALUE_64X(FID_SEQ_QUOTA);
CHECK_VALUE_64X(FID_SEQ_QUOTA_GLB);
CHECK_VALUE_64X(FID_SEQ_ROOT);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE_64X(FID_SEQ_LAYOUT_RBTREE);
CHECK_VALUE_64X(FID_SEQ_UPDATE_LOG);
CHECK_VALUE_64X(FID_SEQ_UPDATE_LOG_DIR);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE_64X(FID_SEQ_NORMAL);
CHECK_VALUE_64X(FID_SEQ_LOV_DEFAULT);
CHECK_VALUE(LDF_EMPTY);
CHECK_VALUE(LDF_COLLIDE);
CHECK_VALUE(LU_PAGE_SIZE);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_UNION(lu_page);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* HAVE_NATIVE_LINUX_CLIENT */
}
static void
CHECK_DEFINE_64X(OBD_MD_FLAGSTATFS);
CHECK_DEFINE_64X(OBD_MD_FLCROSSREF);
CHECK_DEFINE_64X(OBD_MD_FLGETATTRLOCK);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_DEFINE_64X(OBD_MD_FLOBJCOUNT);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* HAVE_NATIVE_LINUX_CLIENT */
CHECK_DEFINE_64X(OBD_MD_FLDATAVERSION);
CHECK_DEFINE_64X(OBD_MD_CLOSE_INTENT_EXECED);
CHECK_DEFINE_64X(OBD_MD_DEFAULT_MEA);
CHECK_VALUE(LCM_FL_RDONLY);
CHECK_VALUE(LCM_FL_WRITE_PENDING);
CHECK_VALUE(LCM_FL_SYNC_PENDING);
+ CHECK_VALUE(LCM_FL_PCC_RDONLY);
}
static void
CHECK_MEMBER(lmv_mds_md_v1, lmv_migrate_hash);
CHECK_MEMBER(lmv_mds_md_v1, lmv_padding2);
CHECK_MEMBER(lmv_mds_md_v1, lmv_padding3);
- CHECK_MEMBER(lmv_mds_md_v1, lmv_pool_name[LOV_MAXPOOLNAME]);
+ CHECK_MEMBER(lmv_mds_md_v1, lmv_pool_name[LOV_MAXPOOLNAME + 1]);
CHECK_MEMBER(lmv_mds_md_v1, lmv_stripe_fids[0]);
CHECK_CDEFINE(LMV_MAGIC_V1);
static void
check_obd_quotactl(void)
{
-
BLANK_LINE();
CHECK_UNION(lquota_id);
CHECK_DEFINE_X(Q_GETOINFO);
CHECK_DEFINE_X(Q_GETOQUOTA);
CHECK_DEFINE_X(Q_FINVALIDATE);
+}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+static void
+check_obd_quotactl_server(void)
+{
BLANK_LINE();
CHECK_STRUCT(lquota_acct_rec);
CHECK_MEMBER(lquota_acct_rec, bspace);
BLANK_LINE();
CHECK_STRUCT(lquota_slv_rec);
CHECK_MEMBER(lquota_slv_rec, qsr_granted);
-
}
static void
CHECK_CVALUE_X(II_FL_NONUNQ);
CHECK_CVALUE_X(II_FL_NOKEY);
}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
static void
check_niobuf_remote(void)
CHECK_VALUE_X(LUSTRE_NODUMP_FL);
CHECK_VALUE_X(LUSTRE_NOATIME_FL);
CHECK_VALUE_X(LUSTRE_INDEX_FL);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE_X(LUSTRE_ORPHAN_FL);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE_X(LUSTRE_DIRSYNC_FL);
CHECK_VALUE_X(LUSTRE_TOPDIR_FL);
CHECK_VALUE_X(LUSTRE_INLINE_DATA_FL);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE_X(LUSTRE_SET_SYNC_FL);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE_X(LUSTRE_ENCRYPT_FL);
CHECK_VALUE_X(MDS_INODELOCK_LOOKUP);
BLANK_LINE();
CHECK_STRUCT(ldlm_inodebits);
CHECK_MEMBER(ldlm_inodebits, bits);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_MEMBER(ldlm_inodebits, try_bits);
+ printf("#else\n");
+#endif
+ CHECK_MEMBER(ldlm_inodebits, cancel_bits);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif
CHECK_MEMBER(ldlm_inodebits, li_gid);
}
CHECK_MEMBER(ldlm_gl_lquota_desc, gl_pad2);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void check_ldlm_gl_barrier_desc(void)
{
BLANK_LINE();
CHECK_MEMBER(barrier_lvb, lvb_index);
CHECK_MEMBER(barrier_lvb, lvb_padding);
}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 18, 53, 0)
static void
CHECK_MEMBER(llog_unlink64_rec, lur_padding3);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void
check_llog_setattr64_rec(void)
{
BLANK_LINE();
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_STRUCT(llog_setattr64_rec);
CHECK_MEMBER(llog_setattr64_rec, lsr_hdr);
CHECK_MEMBER(llog_setattr64_rec, lsr_oi);
CHECK_MEMBER(llog_setattr64_rec_v2, lsr_padding2);
CHECK_MEMBER(llog_setattr64_rec_v2, lsr_padding3);
CHECK_MEMBER(llog_setattr64_rec_v2, lsr_tail);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
}
+#endif /* !CONFIG_FS_LUSTRE */
static void
check_llog_size_change_rec(void)
CHECK_MEMBER(changelog_ext_rename, cr_spfid);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void
check_changelog_ext_jobid(void)
{
BLANK_LINE();
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_STRUCT(changelog_ext_jobid);
CHECK_CDEFINE(LUSTRE_JOBID_SIZE);
CHECK_MEMBER(changelog_ext_jobid, cr_jobid);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
}
+#endif
static void
check_changelog_setinfo(void)
CHECK_MEMBER(llog_changelog_rec, cr_do_not_use);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void
check_llog_changelog_user_rec(void)
{
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
BLANK_LINE();
CHECK_STRUCT(llog_changelog_user_rec);
CHECK_MEMBER(llog_changelog_user_rec, cur_hdr);
CHECK_MEMBER(llog_changelog_user_rec, cur_time);
CHECK_MEMBER(llog_changelog_user_rec, cur_endrec);
CHECK_MEMBER(llog_changelog_user_rec, cur_tail);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
static void
check_llog_gen(void)
CHECK_MEMBER(ll_fiemap_info_key, lfik_fiemap);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void
check_quota_body(void)
{
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
BLANK_LINE();
CHECK_STRUCT(quota_body);
CHECK_MEMBER(quota_body, qb_fid);
CHECK_MEMBER(quota_body, qb_lockh);
CHECK_MEMBER(quota_body, qb_glb_lockh);
CHECK_MEMBER(quota_body, qb_padding1[4]);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
static void
check_mgs_target_info(void)
CHECK_CVALUE(MGS_CFG_T_SPTLRPC);
CHECK_CVALUE(MGS_CFG_T_RECOVER);
CHECK_CVALUE(MGS_CFG_T_PARAMS);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_CVALUE(MGS_CFG_T_NODEMAP);
CHECK_CVALUE(MGS_CFG_T_BARRIER);
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
}
static void
CHECK_MEMBER(getinfo_fid2path, gf_recno);
CHECK_MEMBER(getinfo_fid2path, gf_linkno);
CHECK_MEMBER(getinfo_fid2path, gf_pathlen);
+ printf("#ifdef HAVE_FID2PATH_ANON_UNIONS\n");
+#ifdef HAVE_FID2PATH_ANON_UNIONS
+ CHECK_MEMBER(getinfo_fid2path, gf_path[0]);
+ printf("#else\n");
+ printf(" LASSERTF((int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]) == 32, \"found %%lld\\n\",\n");
+ printf(" (long long)(int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]));\n");
+ printf(" LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]) == 1, \"found %%lld\\n\",\n");
+ printf(" (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]));\n");
+#else
+ printf(" LASSERTF((int)offsetof(struct getinfo_fid2path, gf_path[0]) == 32, \"found %%lld\\n\",\n");
+ printf(" (long long)(int)offsetof(struct getinfo_fid2path, gf_path[0]));\n");
+ printf(" LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]) == 1, \"found %%lld\\n\",\n");
+ printf(" (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]));\n");
+ printf("#else\n");
CHECK_MEMBER(getinfo_fid2path, gf_u.gf_path[0]);
+#endif
+ printf("#endif /* HAVE_FID2PATH_ANON_UNIONS */\n");
}
/* We don't control the definitions of posix_acl_xattr_{entry,header}
CHECK_MEMBER(hsm_user_import, hui_archive_id);
}
+#ifndef HAVE_NATIVE_LINUX_CLIENT
static void check_object_update_param(void)
{
BLANK_LINE();
CHECK_MEMBER(lfsck_request, lr_padding_1);
CHECK_MEMBER(lfsck_request, lr_padding_2);
CHECK_MEMBER(lfsck_request, lr_padding_3);
- printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE_X(LFSCK_TYPE_SCRUB);
CHECK_VALUE_X(LFSCK_TYPE_LAYOUT);
CHECK_VALUE_X(LFSCK_TYPE_NAMESPACE);
- printf("#endif\n");
CHECK_VALUE(LE_LASTID_REBUILDING);
CHECK_VALUE(LE_LASTID_REBUILT);
CHECK_VALUE(LE_PHASE1_DONE);
CHECK_MEMBER(llog_update_record, lur_hdr);
CHECK_MEMBER(llog_update_record, lur_update_rec);
}
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
static void
check_lustre_cfg(void)
CHECK_VALUE_X(LCFG_SET_LDLM_TIMEOUT);
CHECK_VALUE_X(LCFG_PRE_CLEANUP);
CHECK_VALUE_X(LCFG_SET_PARAM);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE_X(LCFG_NODEMAP_ADD);
CHECK_VALUE_X(LCFG_NODEMAP_DEL);
CHECK_VALUE_X(LCFG_NODEMAP_ADD_RANGE);
CHECK_VALUE_X(LCFG_NODEMAP_MAP_MODE);
CHECK_VALUE_X(LCFG_NODEMAP_AUDIT_MODE);
CHECK_VALUE_X(LCFG_NODEMAP_SET_SEPOL);
-
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE(PORTALS_CFG_TYPE);
CHECK_VALUE(LUSTRE_CFG_TYPE);
}
CHECK_VALUE(SEQ_FIRST_OPC);
CHECK_VALUE(SEQ_LAST_OPC);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
CHECK_VALUE(LFSCK_NOTIFY);
CHECK_VALUE(LFSCK_QUERY);
CHECK_VALUE(LFSCK_FIRST_OPC);
CHECK_VALUE(LFSCK_LAST_OPC);
-
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE(SEQ_ALLOC_SUPER);
CHECK_VALUE(SEQ_ALLOC_META);
CHECK_CVALUE(LUSTRE_RES_ID_SEQ_OFF);
CHECK_CVALUE(LUSTRE_RES_ID_VER_OID_OFF);
/* CHECK_CVALUE(LUSTRE_RES_ID_WAS_VER_OFF); packed with OID */
-
- CHECK_VALUE(OUT_UPDATE);
- CHECK_VALUE(OUT_UPDATE_LAST_OPC);
CHECK_CVALUE(LUSTRE_RES_ID_QUOTA_SEQ_OFF);
CHECK_CVALUE(LUSTRE_RES_ID_QUOTA_VER_OID_OFF);
CHECK_CVALUE(LUSTRE_RES_ID_HSH_OFF);
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
+ CHECK_VALUE(OUT_UPDATE);
+ CHECK_VALUE(OUT_UPDATE_LAST_OPC);
+
CHECK_CVALUE(LQUOTA_TYPE_USR);
CHECK_CVALUE(LQUOTA_TYPE_GRP);
-
CHECK_CVALUE(LQUOTA_RES_MD);
CHECK_CVALUE(LQUOTA_RES_DT);
-
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
CHECK_VALUE(OBD_PING);
CHECK_VALUE(OBD_IDX_READ);
CHECK_VALUE(OBD_LAST_OPC);
BLANK_LINE();
CHECK_STRUCT(obd_uuid);
check_lu_seq_range();
+ check_som_attrs();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
check_lustre_mdt_attrs();
check_lustre_ost_attrs();
CHECK_VALUE(OUT_NOOP);
CHECK_VALUE(OUT_XATTR_LIST);
- check_som_attrs();
check_hsm_attrs();
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#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
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
+ check_obd_quotactl_server();
check_obd_idx_read();
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#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
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
check_ldlm_gl_barrier_desc();
check_ldlm_barrier_lvb();
+printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 18, 53, 0)
check_mgs_send_param();
#endif
check_llog_logid_rec();
check_llog_unlink_rec();
check_llog_unlink64_rec();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
check_llog_setattr64_rec();
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_llog_size_change_rec();
check_changelog_rec();
check_changelog_ext_rename();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
check_changelog_ext_jobid();
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_changelog_setinfo();
check_llog_changelog_rec();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
check_llog_changelog_user_rec();
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_llog_gen();
check_llog_gen_rec();
check_llog_log_hdr();
check_llogd_body();
check_llogd_conn_body();
check_ll_fiemap_info_key();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
check_quota_body();
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_mgs_target_info();
check_mgs_nidtbl_entry();
check_mgs_config_body();
check_hsm_user_request();
check_hsm_user_import();
+#ifndef HAVE_NATIVE_LINUX_CLIENT
+ printf("#ifdef HAVE_SERVER_SUPPORT\n");
check_object_update_param();
check_object_update();
check_object_update_request();
check_update_ops();
check_update_records();
check_llog_update_record();
-
+ printf("#endif /* HAVE_SERVER_SUPPORT */\n");
+#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_lustre_cfg();
printf("}\n");
#include <string.h>
#include <linux/lustre/lustre_idl.h>
-#include <linux/lustre/lustre_access_log.h>
#ifdef HAVE_SERVER_SUPPORT
+#include <linux/lustre/lustre_access_log.h>
#include <linux/lustre/lustre_lfsck_user.h>
#include <linux/lustre/lustre_disk.h>
#ifdef CONFIG_FS_POSIX_ACL
#endif /* CONFIG_FS_POSIX_ACL */
#endif /* HAVE_SERVER_SUPPORT */
#include <linux/lustre/lustre_cfg.h>
+#include <lustre/lustreapi.h>
#ifndef BUILD_BUG_ON
#define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2*!!(cond)]))
#include <string.h>
#include <linux/lustre/lustre_idl.h>
-#include <linux/lustre/lustre_access_log.h>
#ifdef HAVE_SERVER_SUPPORT
+#include <linux/lustre/lustre_access_log.h>
#include <linux/lustre/lustre_lfsck_user.h>
#include <linux/lustre/lustre_disk.h>
#ifdef CONFIG_FS_POSIX_ACL
#endif /* CONFIG_FS_POSIX_ACL */
#endif /* HAVE_SERVER_SUPPORT */
#include <linux/lustre/lustre_cfg.h>
+#include <lustre/lustreapi.h>
#ifndef BUILD_BUG_ON
#define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2*!!(cond)]))
(long long)SEQ_FIRST_OPC);
LASSERTF(SEQ_LAST_OPC == 701, "found %lld\n",
(long long)SEQ_LAST_OPC);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LFSCK_NOTIFY == 1101, "found %lld\n",
(long long)LFSCK_NOTIFY);
LASSERTF(LFSCK_QUERY == 1102, "found %lld\n",
(long long)LFSCK_FIRST_OPC);
LASSERTF(LFSCK_LAST_OPC == 1103, "found %lld\n",
(long long)LFSCK_LAST_OPC);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(SEQ_ALLOC_SUPER == 0, "found %lld\n",
(long long)SEQ_ALLOC_SUPER);
LASSERTF(SEQ_ALLOC_META == 1, "found %lld\n",
BUILD_BUG_ON(LDLM_MAX_TYPE != 14);
BUILD_BUG_ON(LUSTRE_RES_ID_SEQ_OFF != 0);
BUILD_BUG_ON(LUSTRE_RES_ID_VER_OID_OFF != 1);
+ BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_SEQ_OFF != 2);
+ BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_VER_OID_OFF != 3);
+ BUILD_BUG_ON(LUSTRE_RES_ID_HSH_OFF != 3);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(OUT_UPDATE == 1000, "found %lld\n",
(long long)OUT_UPDATE);
LASSERTF(OUT_UPDATE_LAST_OPC == 1001, "found %lld\n",
(long long)OUT_UPDATE_LAST_OPC);
- BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_SEQ_OFF != 2);
- BUILD_BUG_ON(LUSTRE_RES_ID_QUOTA_VER_OID_OFF != 3);
- BUILD_BUG_ON(LUSTRE_RES_ID_HSH_OFF != 3);
BUILD_BUG_ON(LQUOTA_TYPE_USR != 0);
BUILD_BUG_ON(LQUOTA_TYPE_GRP != 1);
BUILD_BUG_ON(LQUOTA_RES_MD != 1);
BUILD_BUG_ON(LQUOTA_RES_DT != 2);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(OBD_PING == 400, "found %lld\n",
(long long)OBD_PING);
LASSERTF(OBD_IDX_READ == 403, "found %lld\n",
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",
(long long)FID_SEQ_QUOTA_GLB);
LASSERTF(FID_SEQ_ROOT == 0x0000000200000007ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_ROOT);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(FID_SEQ_LAYOUT_RBTREE == 0x0000000200000008ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_LAYOUT_RBTREE);
LASSERTF(FID_SEQ_UPDATE_LOG == 0x0000000200000009ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_UPDATE_LOG);
LASSERTF(FID_SEQ_UPDATE_LOG_DIR == 0x000000020000000aULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_UPDATE_LOG_DIR);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(FID_SEQ_NORMAL == 0x0000000200000400ULL, "found 0x%.16llxULL\n",
(long long)FID_SEQ_NORMAL);
LASSERTF(FID_SEQ_LOV_DEFAULT == 0xffffffffffffffffULL, "found 0x%.16llxULL\n",
(long long)LDF_COLLIDE);
LASSERTF(LU_PAGE_SIZE == 4096, "found %lld\n",
(long long)LU_PAGE_SIZE);
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for union lu_page */
LASSERTF((int)sizeof(union lu_page) == 4096, "found %lld\n",
(long long)(int)sizeof(union lu_page));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct lu_ladvise */
LASSERTF((int)sizeof(struct lu_ladvise) == 32, "found %lld\n",
OBD_MD_FLGID);
LASSERTF(OBD_MD_FLFLAGS == (0x00000800ULL), "found 0x%.16llxULL\n",
OBD_MD_FLFLAGS);
- LASSERTF(OBD_MD_DOM_SIZE == (0X00001000ULL), "found 0x%.16llxULL\n",
+ LASSERTF(OBD_MD_DOM_SIZE == (0x00001000ULL), "found 0x%.16llxULL\n",
OBD_MD_DOM_SIZE);
LASSERTF(OBD_MD_FLNLINK == (0x00002000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLNLINK);
OBD_MD_FLCROSSREF);
LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLGETATTRLOCK);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(OBD_MD_FLOBJCOUNT == (0x0000400000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLOBJCOUNT);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n",
OBD_MD_FLDATAVERSION);
LASSERTF(OBD_MD_CLOSE_INTENT_EXECED == (0x0020000000000000ULL), "found 0x%.16llxULL\n",
(long long)(int)offsetof(struct lmv_mds_md_v1, lmv_padding3));
LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3) == 8, "found %lld\n",
(long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_padding3));
- LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]) == 55, "found %lld\n",
- (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15]));
- LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]) == 1, "found %lld\n",
- (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15]));
+ LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15 + 1]) == 56, "found %lld\n",
+ (long long)(int)offsetof(struct lmv_mds_md_v1, lmv_pool_name[15 + 1]));
+ LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15 + 1]) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_pool_name[15 + 1]));
LASSERTF((int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]) == 56, "found %lld\n",
(long long)(int)offsetof(struct lmv_mds_md_v1, lmv_stripe_fids[0]));
LASSERTF((int)sizeof(((struct lmv_mds_md_v1 *)0)->lmv_stripe_fids[0]) == 16, "found %lld\n",
Q_GETOQUOTA);
LASSERTF(Q_FINVALIDATE == 0x800104, "found 0x%.8x\n",
Q_FINVALIDATE);
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct lquota_acct_rec */
LASSERTF((int)sizeof(struct lquota_acct_rec) == 16, "found %lld\n",
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",
(unsigned)LUSTRE_NOATIME_FL);
LASSERTF(LUSTRE_INDEX_FL == 0x00001000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_INDEX_FL);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LUSTRE_ORPHAN_FL == 0x00002000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_ORPHAN_FL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(LUSTRE_DIRSYNC_FL == 0x00010000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_DIRSYNC_FL);
LASSERTF(LUSTRE_TOPDIR_FL == 0x00020000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_TOPDIR_FL);
LASSERTF(LUSTRE_INLINE_DATA_FL == 0x10000000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_INLINE_DATA_FL);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LUSTRE_SET_SYNC_FL == 0x00040000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_SET_SYNC_FL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(LUSTRE_ENCRYPT_FL == 0x00800000UL, "found 0x%.8xUL\n",
(unsigned)LUSTRE_ENCRYPT_FL);
LASSERTF(MDS_INODELOCK_LOOKUP == 0x00000001UL, "found 0x%.8xUL\n",
(long long)(int)offsetof(struct ldlm_inodebits, bits));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->bits) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_inodebits *)0)->bits));
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF((int)offsetof(struct ldlm_inodebits, try_bits) == 8, "found %lld\n",
(long long)(int)offsetof(struct ldlm_inodebits, try_bits));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->try_bits) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ldlm_inodebits *)0)->try_bits));
+#else
+ LASSERTF((int)offsetof(struct ldlm_inodebits, cancel_bits) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_inodebits, cancel_bits));
+ LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->cancel_bits) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_inodebits *)0)->cancel_bits));
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF((int)offsetof(struct ldlm_inodebits, li_gid) == 16, "found %lld\n",
(long long)(int)offsetof(struct ldlm_inodebits, li_gid));
LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->li_gid) == 8, "found %lld\n",
(long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2));
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)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 llog_unlink64_rec *)0)->lur_padding3) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_unlink64_rec *)0)->lur_padding3));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct llog_setattr64_rec */
LASSERTF((int)sizeof(struct llog_setattr64_rec) == 64, "found %lld\n",
(long long)(int)sizeof(struct llog_setattr64_rec));
(long long)(int)offsetof(struct llog_setattr64_rec_v2, lsr_tail));
LASSERTF((int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_setattr64_rec_v2 *)0)->lsr_tail));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct llog_size_change_rec */
LASSERTF((int)sizeof(struct llog_size_change_rec) == 64, "found %lld\n",
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));
+#ifdef HAVE_SERVER_SUPPORT
/* 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));
(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));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct changelog_setinfo */
LASSERTF((int)sizeof(struct changelog_setinfo) == 12, "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));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct llog_changelog_user_rec */
LASSERTF((int)sizeof(struct llog_changelog_user_rec) == 40, "found %lld\n",
(long long)(int)offsetof(struct llog_changelog_user_rec, cur_tail));
LASSERTF((int)sizeof(((struct llog_changelog_user_rec *)0)->cur_tail) == 8, "found %lld\n",
(long long)(int)sizeof(((struct llog_changelog_user_rec *)0)->cur_tail));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct llog_gen */
LASSERTF((int)sizeof(struct llog_gen) == 16, "found %lld\n",
(long long)(int)offsetof(struct ll_fiemap_info_key, lfik_fiemap));
LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap) == 32, "found %lld\n",
(long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->lfik_fiemap));
+#ifdef HAVE_SERVER_SUPPORT
/* Checks for struct quota_body */
LASSERTF((int)sizeof(struct quota_body) == 112, "found %lld\n",
(long long)(int)offsetof(struct quota_body, qb_padding1[4]));
LASSERTF((int)sizeof(((struct quota_body *)0)->qb_padding1[4]) == 8, "found %lld\n",
(long long)(int)sizeof(((struct quota_body *)0)->qb_padding1[4]));
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_target_info */
LASSERTF((int)sizeof(struct mgs_target_info) == 4544, "found %lld\n",
BUILD_BUG_ON(MGS_CFG_T_SPTLRPC != 1);
BUILD_BUG_ON(MGS_CFG_T_RECOVER != 2);
BUILD_BUG_ON(MGS_CFG_T_PARAMS != 3);
+#ifdef HAVE_SERVER_SUPPORT
BUILD_BUG_ON(MGS_CFG_T_NODEMAP != 4);
BUILD_BUG_ON(MGS_CFG_T_BARRIER != 5);
+#endif /* HAVE_SERVER_SUPPORT */
/* Checks for struct mgs_config_res */
LASSERTF((int)sizeof(struct mgs_config_res) == 16, "found %lld\n",
(long long)(int)offsetof(struct getinfo_fid2path, gf_pathlen));
LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_pathlen) == 4, "found %lld\n",
(long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_pathlen));
+#ifdef HAVE_FID2PATH_ANON_UNIONS
+ LASSERTF((int)offsetof(struct getinfo_fid2path, gf_path[0]) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct getinfo_fid2path, gf_path[0]));
+ LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_path[0]));
+#else
LASSERTF((int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]) == 32, "found %lld\n",
(long long)(int)offsetof(struct getinfo_fid2path, gf_u.gf_path[0]));
LASSERTF((int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]) == 1, "found %lld\n",
(long long)(int)sizeof(((struct getinfo_fid2path *)0)->gf_u.gf_path[0]));
+#endif /* HAVE_FID2PATH_ANON_UNIONS */
/* Checks for struct fiemap */
LASSERTF((int)sizeof(struct fiemap) == 32, "found %lld\n",
(long long)(int)offsetof(struct hsm_user_import, hui_archive_id));
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));
+#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 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",
(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",
(unsigned)LCFG_PRE_CLEANUP);
LASSERTF(LCFG_SET_PARAM == 0x000ce032UL, "found 0x%.8xUL\n",
(unsigned)LCFG_SET_PARAM);
+#ifdef HAVE_SERVER_SUPPORT
LASSERTF(LCFG_NODEMAP_ADD == 0x000ce040UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_ADD);
LASSERTF(LCFG_NODEMAP_DEL == 0x000ce041UL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_AUDIT_MODE);
LASSERTF(LCFG_NODEMAP_SET_SEPOL == 0x000ce05bUL, "found 0x%.8xUL\n",
(unsigned)LCFG_NODEMAP_SET_SEPOL);
+#endif /* HAVE_SERVER_SUPPORT */
LASSERTF(PORTALS_CFG_TYPE == 1, "found %lld\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",