LAYOUT_INTENT_TRUNC = 4, /** truncate file, for comp layout */
LAYOUT_INTENT_RELEASE = 5, /** reserved for HSM release */
LAYOUT_INTENT_RESTORE = 6, /** reserved for HSM restore */
+ LAYOUT_INTENT_PCCRO_SET = 7, /** set read-only layout for PCC */
+ LAYOUT_INTENT_PCCRO_CLEAR = 8, /** clear read-only layout */
};
/* enqueue layout lock with intent */
(long long)LAYOUT_INTENT_RELEASE);
LASSERTF(LAYOUT_INTENT_RESTORE == 6, "found %lld\n",
(long long)LAYOUT_INTENT_RESTORE);
+ LASSERTF(LAYOUT_INTENT_PCCRO_SET == 7, "found %lld\n",
+ (long long)LAYOUT_INTENT_PCCRO_SET);
+ LASSERTF(LAYOUT_INTENT_PCCRO_CLEAR == 8, "found %lld\n",
+ (long long)LAYOUT_INTENT_PCCRO_CLEAR);
/* Checks for struct hsm_action_item */
LASSERTF((int)sizeof(struct hsm_action_item) == 72, "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);
LASSERTF(LCFG_NODEMAP_READONLY_MOUNT == 0x000ce05eUL, "found 0x%.8xUL\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",
(long long)LUSTRE_CFG_TYPE);
+
+ /* Checks for struct lu_pcc_attach */
+ LASSERTF((int)sizeof(struct lu_pcc_attach) == 8, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_attach));
+ LASSERTF((int)offsetof(struct lu_pcc_attach, pcca_type) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_attach, pcca_type));
+ LASSERTF((int)sizeof(((struct lu_pcc_attach *)0)->pcca_type) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_attach *)0)->pcca_type));
+ LASSERTF((int)offsetof(struct lu_pcc_attach, pcca_id) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_attach, pcca_id));
+ LASSERTF((int)sizeof(((struct lu_pcc_attach *)0)->pcca_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_attach *)0)->pcca_id));
+
+ /* Checks for struct lu_pcc_detach */
+ LASSERTF((int)sizeof(struct lu_pcc_detach) == 4, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_detach));
+ LASSERTF((int)offsetof(struct lu_pcc_detach, pccd_opt) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach, pccd_opt));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach *)0)->pccd_opt) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach *)0)->pccd_opt));
+
+ /* Checks for struct lu_pcc_detach_fid */
+ LASSERTF((int)sizeof(struct lu_pcc_detach_fid) == 20, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_detach_fid));
+ LASSERTF((int)offsetof(struct lu_pcc_detach_fid, pccd_fid) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach_fid, pccd_fid));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_fid) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_fid));
+ LASSERTF((int)offsetof(struct lu_pcc_detach_fid, pccd_opt) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach_fid, pccd_opt));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_opt) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_opt));
+
+ /* Checks for struct lu_pcc_state */
+ LASSERTF((int)sizeof(struct lu_pcc_state) == 4112, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_state));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_type) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_type));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_type) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_type));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_open_count) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_open_count));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_open_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_open_count));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_flags) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_flags));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_flags));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_padding) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_padding));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_padding) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_padding));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_path) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_path));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_path) == 4096, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_path));
}
CHECK_VALUE(LAYOUT_INTENT_TRUNC);
CHECK_VALUE(LAYOUT_INTENT_RELEASE);
CHECK_VALUE(LAYOUT_INTENT_RESTORE);
+ CHECK_VALUE(LAYOUT_INTENT_PCCRO_SET);
+ CHECK_VALUE(LAYOUT_INTENT_PCCRO_CLEAR);
}
static void check_hsm_state_set(void)
CHECK_VALUE(LUSTRE_CFG_TYPE);
}
+static void check_lu_pcc_attach(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(lu_pcc_attach);
+ CHECK_MEMBER(lu_pcc_attach, pcca_type);
+ CHECK_MEMBER(lu_pcc_attach, pcca_id);
+}
+
+static void check_lu_pcc_detach(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(lu_pcc_detach);
+ CHECK_MEMBER(lu_pcc_detach, pccd_opt);
+}
+
+static void check_lu_pcc_detach_fid(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(lu_pcc_detach_fid);
+ CHECK_MEMBER(lu_pcc_detach_fid, pccd_fid);
+ CHECK_MEMBER(lu_pcc_detach_fid, pccd_opt);
+}
+
+static void check_lu_pcc_state(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(lu_pcc_state);
+ CHECK_MEMBER(lu_pcc_state, pccs_type);
+ CHECK_MEMBER(lu_pcc_state, pccs_open_count);
+ CHECK_MEMBER(lu_pcc_state, pccs_flags);
+ CHECK_MEMBER(lu_pcc_state, pccs_padding);
+ CHECK_MEMBER(lu_pcc_state, pccs_path);
+}
+
int
main(int argc, char **argv)
{
#endif /* !HAVE_NATIVE_LINUX_CLIENT */
check_lustre_cfg();
+ check_lu_pcc_attach();
+ check_lu_pcc_detach();
+ check_lu_pcc_detach_fid();
+ check_lu_pcc_state();
+
printf("}\n");
return 0;
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);
LASSERTF(QIF_DQBLKSIZE_BITS == 10, "found %lld\n",
(long long)QIF_DQBLKSIZE_BITS);
LASSERTF(QIF_DQBLKSIZE == 1024, "found %lld\n",
- (long long)QIF_DQBLKSIZE_BITS);
+ (long long)QIF_DQBLKSIZE);
/* Checks for struct obd_quotactl */
LASSERTF((int)sizeof(struct obd_quotactl) == 112, "found %lld\n",
(long long)LAYOUT_INTENT_RELEASE);
LASSERTF(LAYOUT_INTENT_RESTORE == 6, "found %lld\n",
(long long)LAYOUT_INTENT_RESTORE);
+ LASSERTF(LAYOUT_INTENT_PCCRO_SET == 7, "found %lld\n",
+ (long long)LAYOUT_INTENT_PCCRO_SET);
+ LASSERTF(LAYOUT_INTENT_PCCRO_CLEAR == 8, "found %lld\n",
+ (long long)LAYOUT_INTENT_PCCRO_CLEAR);
/* Checks for struct hsm_action_item */
LASSERTF((int)sizeof(struct hsm_action_item) == 72, "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);
LASSERTF(LCFG_NODEMAP_READONLY_MOUNT == 0x000ce05eUL, "found 0x%.8xUL\n",
(long long)PORTALS_CFG_TYPE);
LASSERTF(LUSTRE_CFG_TYPE == 123, "found %lld\n",
(long long)LUSTRE_CFG_TYPE);
+
+ /* Checks for struct lu_pcc_attach */
+ LASSERTF((int)sizeof(struct lu_pcc_attach) == 8, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_attach));
+ LASSERTF((int)offsetof(struct lu_pcc_attach, pcca_type) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_attach, pcca_type));
+ LASSERTF((int)sizeof(((struct lu_pcc_attach *)0)->pcca_type) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_attach *)0)->pcca_type));
+ LASSERTF((int)offsetof(struct lu_pcc_attach, pcca_id) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_attach, pcca_id));
+ LASSERTF((int)sizeof(((struct lu_pcc_attach *)0)->pcca_id) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_attach *)0)->pcca_id));
+
+ /* Checks for struct lu_pcc_detach */
+ LASSERTF((int)sizeof(struct lu_pcc_detach) == 4, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_detach));
+ LASSERTF((int)offsetof(struct lu_pcc_detach, pccd_opt) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach, pccd_opt));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach *)0)->pccd_opt) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach *)0)->pccd_opt));
+
+ /* Checks for struct lu_pcc_detach_fid */
+ LASSERTF((int)sizeof(struct lu_pcc_detach_fid) == 20, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_detach_fid));
+ LASSERTF((int)offsetof(struct lu_pcc_detach_fid, pccd_fid) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach_fid, pccd_fid));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_fid) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_fid));
+ LASSERTF((int)offsetof(struct lu_pcc_detach_fid, pccd_opt) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_detach_fid, pccd_opt));
+ LASSERTF((int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_opt) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_detach_fid *)0)->pccd_opt));
+
+ /* Checks for struct lu_pcc_state */
+ LASSERTF((int)sizeof(struct lu_pcc_state) == 4112, "found %lld\n",
+ (long long)(int)sizeof(struct lu_pcc_state));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_type) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_type));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_type) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_type));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_open_count) == 4, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_open_count));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_open_count) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_open_count));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_flags) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_flags));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_flags) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_flags));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_padding) == 12, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_padding));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_padding) == 4, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_padding));
+ LASSERTF((int)offsetof(struct lu_pcc_state, pccs_path) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lu_pcc_state, pccs_path));
+ LASSERTF((int)sizeof(((struct lu_pcc_state *)0)->pccs_path) == 4096, "found %lld\n",
+ (long long)(int)sizeof(((struct lu_pcc_state *)0)->pccs_path));
}