This patch defines new LVB types for quota.
A new request buffer is also added to glimpse AST to allow the server
to pass additional information about the callback to the client.
This additional buffer will only be used in conjunction with quota
locks for the time being.
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: If5842bfff79d24e7d11ef33c47edb96fe6f11e76
Reviewed-on: http://review.whamcloud.com/4107
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* lock (IT_QUOTA_CONN) reply, qb_fid contains slave index file FID. */
#define qb_slv_fid qb_fid
/* qb_usage is the current qunit (in kbytes/inodes) when quota_body is used in
- * acquire reply */
+ * quota reply */
#define qb_qunit qb_usage
extern void lustre_swab_quota_body(struct quota_body *b);
extern void lustre_swab_ldlm_policy_data (ldlm_wire_policy_data_t *d);
+/* Data structures associated with the quota locks */
+
+/* Glimpse descriptor used for the index & per-ID quota locks */
+struct ldlm_gl_lquota_desc {
+ union lquota_id gl_id; /* quota ID subject to the glimpse */
+ __u64 gl_flags; /* see LQUOTA_FL* below */
+ __u64 gl_ver; /* new index version */
+ __u64 gl_hardlimit; /* new hardlimit or qunit value */
+ __u64 gl_softlimit; /* new softlimit */
+ __u64 gl_pad1;
+ __u64 gl_pad2;
+};
+#define gl_qunit gl_hardlimit /* current qunit value used when
+ * glimpsing per-ID quota locks */
+
+/* quota glimpse flags */
+#define LQUOTA_FL_EDQUOT 0x1 /* user/group out of quota space on QMT */
+
+/* LVB used with quota (global and per-ID) locks */
+struct lquota_lvb {
+ __u64 lvb_flags; /* see LQUOTA_FL* above */
+ __u64 lvb_id_may_rel; /* space that might be released later */
+ __u64 lvb_id_rel; /* space released by the slave for this ID */
+ __u64 lvb_id_qunit; /* current qunit value */
+ __u64 lvb_pad1;
+};
+
+/* LVB used with global quota lock */
+#define lvb_glb_ver lvb_id_may_rel /* current version of the global index */
+
/* Similarly to ldlm_wire_policy_data_t, there is one common swabber for all
* LVB types. As a result, any new LVB structure must match the fields of the
* ost_lvb structure. */
union ldlm_wire_lvb {
- struct ost_lvb l_ost;
+ struct ost_lvb l_ost;
+ struct lquota_lvb l_lquota;
};
extern void lustre_swab_lvb(union ldlm_wire_lvb *);
+union ldlm_gl_desc {
+ struct ldlm_gl_lquota_desc lquota_desc;
+};
+
+extern void lustre_swab_gl_desc(union ldlm_gl_desc *);
+
struct ldlm_intent {
__u64 opc;
};
struct ldlm_lock *gl_lock; /* lock to glimpse */
cfs_list_t gl_list; /* linkage to other gl work structs */
__u32 gl_flags;/* see LDLM_GL_WORK_* below */
+ union ldlm_gl_desc *gl_desc; /* glimpse descriptor to be packed in
+ * glimpse callback request */
};
/* the ldlm_glimpse_work is allocated on the stack and should not be freed */
extern struct req_format RQF_LDLM_CP_CALLBACK;
extern struct req_format RQF_LDLM_BL_CALLBACK;
extern struct req_format RQF_LDLM_GL_CALLBACK;
+extern struct req_format RQF_LDLM_GL_DESC_CALLBACK;
/* LOG req_format */
extern struct req_format RQF_LOG_CANCEL;
extern struct req_format RQF_LLOG_ORIGIN_HANDLE_CREATE;
extern struct req_msg_field RMF_DLM_REQ;
extern struct req_msg_field RMF_DLM_REP;
extern struct req_msg_field RMF_DLM_LVB;
+extern struct req_msg_field RMF_DLM_GL_DESC;
extern struct req_msg_field RMF_LDLM_INTENT;
extern struct req_msg_field RMF_MDT_MD;
extern struct req_msg_field RMF_REC_REINT;
int type; /* LDLM_{CP,BL,GL}_CALLBACK */
cfs_atomic_t restart;
cfs_list_t *list;
+ union ldlm_gl_desc *gl_desc; /* glimpse AST descriptor */
};
typedef enum {
cfs_list_del_init(&gl_work->gl_list);
lock = gl_work->gl_lock;
+
+ /* transfer the glimpse descriptor to ldlm_cb_set_arg */
+ arg->gl_desc = gl_work->gl_desc;
+
+ /* invoke the actual glimpse callback */
if (lock->l_glimpse_ast(lock, (void*)arg) == 0)
rc = 1;
struct ptlrpc_request *req;
struct ldlm_cb_async_args *ca;
int rc;
+ struct req_format *req_fmt;
ENTRY;
LASSERT(lock != NULL);
+ if (arg->gl_desc != NULL)
+ /* There is a glimpse descriptor to pack */
+ req_fmt = &RQF_LDLM_GL_DESC_CALLBACK;
+ else
+ req_fmt = &RQF_LDLM_GL_CALLBACK;
+
req = ptlrpc_request_alloc_pack(lock->l_export->exp_imp_reverse,
- &RQF_LDLM_GL_CALLBACK,
- LUSTRE_DLM_VERSION, LDLM_GL_CALLBACK);
+ req_fmt, LUSTRE_DLM_VERSION,
+ LDLM_GL_CALLBACK);
if (req == NULL)
RETURN(-ENOMEM);
+ if (arg->gl_desc != NULL) {
+ /* copy the GL descriptor */
+ union ldlm_gl_desc *desc;
+ desc = req_capsule_client_get(&req->rq_pill, &RMF_DLM_GL_DESC);
+ *desc = *arg->gl_desc;
+ }
+
body = req_capsule_client_get(&req->rq_pill, &RMF_DLM_REQ);
body->lock_handle[0] = lock->l_remote_handle;
ldlm_lock2desc(lock, &body->lock_desc);
* DLM handlers.
*/
static struct ldlm_callback_suite cbs = {
- .lcs_completion = ldlm_server_completion_ast,
- .lcs_blocking = ldlm_server_blocking_ast,
- .lcs_glimpse = NULL
+ .lcs_completion = ldlm_server_completion_ast,
+ .lcs_blocking = ldlm_server_blocking_ast,
+ .lcs_glimpse = ldlm_server_glimpse_ast
};
static int mdt_enqueue(struct mdt_thread_info *info)
/* The glimpse callback is sent to one single extent lock. As a result,
* the gl_work list is just composed of one element */
cfs_list_add_tail(&gl_work.gl_list, &gl_list);
+ /* There is actually no need for a glimpse descriptor when glimpsing
+ * extent locks */
+ gl_work.gl_desc = NULL;
/* the ldlm_glimpse_work structure is allocated on the stack */
gl_work.gl_flags = LDLM_GL_WORK_NOFREE;
&RMF_DLM_LVB
};
+static const struct req_msg_field *ldlm_gl_callback_desc_client[] = {
+ &RMF_PTLRPC_BODY,
+ &RMF_DLM_REQ,
+ &RMF_DLM_GL_DESC
+};
+
static const struct req_msg_field *ldlm_gl_callback_server[] = {
&RMF_PTLRPC_BODY,
&RMF_DLM_LVB
&RQF_LDLM_CP_CALLBACK,
&RQF_LDLM_BL_CALLBACK,
&RQF_LDLM_GL_CALLBACK,
+ &RQF_LDLM_GL_DESC_CALLBACK,
&RQF_LDLM_INTENT,
&RQF_LDLM_INTENT_GETATTR,
&RQF_LDLM_INTENT_OPEN,
NULL);
EXPORT_SYMBOL(RMF_DLM_LVB);
+struct req_msg_field RMF_DLM_GL_DESC =
+ DEFINE_MSGF("dlm_gl_desc", 0, sizeof(union ldlm_gl_desc),
+ lustre_swab_gl_desc, NULL);
+EXPORT_SYMBOL(RMF_DLM_GL_DESC);
+
struct req_msg_field RMF_MDT_MD =
DEFINE_MSGF("mdt_md", RMF_F_NO_SIZE_CHECK, MIN_MD_SIZE, NULL, NULL);
EXPORT_SYMBOL(RMF_MDT_MD);
ldlm_gl_callback_server);
EXPORT_SYMBOL(RQF_LDLM_GL_CALLBACK);
+struct req_format RQF_LDLM_GL_DESC_CALLBACK =
+ DEFINE_REQ_FMT0("LDLM_GL_CALLBACK", ldlm_gl_callback_desc_client,
+ ldlm_gl_callback_server);
+EXPORT_SYMBOL(RQF_LDLM_GL_DESC_CALLBACK);
+
struct req_format RQF_LDLM_INTENT =
DEFINE_REQ_FMT0("LDLM_INTENT",
ldlm_intent_client, ldlm_intent_server);
}
EXPORT_SYMBOL(lustre_swab_generic_32s);
+void lustre_swab_gl_desc(union ldlm_gl_desc *desc)
+{
+ lustre_swab_lu_fid(&desc->lquota_desc.gl_id.qid_fid);
+ __swab64s(&desc->lquota_desc.gl_flags);
+ __swab64s(&desc->lquota_desc.gl_ver);
+ __swab64s(&desc->lquota_desc.gl_hardlimit);
+ __swab64s(&desc->lquota_desc.gl_softlimit);
+ CLASSERT(offsetof(typeof(desc->lquota_desc), gl_pad1) != 0);
+ CLASSERT(offsetof(typeof(desc->lquota_desc), gl_pad2) != 0);
+}
+
void lustre_swab_lvb(union ldlm_wire_lvb *lvb)
{
/* The ldlm_wire_lvb union represents all the possible LVB types.
LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
+ /* Checks for struct lquota_lvb */
+ LASSERTF((int)sizeof(struct lquota_lvb) == 40, "found %lld\n",
+ (long long)(int)sizeof(struct lquota_lvb));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_flags) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_flags));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_flags) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_flags));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_may_rel) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_may_rel));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_rel) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_rel));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel));
+ LASSERTF(LQUOTA_FL_EDQUOT == 1, "found %lld\n",
+ (long long)LQUOTA_FL_EDQUOT);
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_qunit) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_qunit));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_pad1) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_pad1));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_pad1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_pad1));
+
+ /* Checks for struct ldlm_gl_lquota_desc */
+ LASSERTF((int)sizeof(struct ldlm_gl_lquota_desc) == 64, "found %lld\n",
+ (long long)(int)sizeof(struct ldlm_gl_lquota_desc));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_id) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_id));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_flags) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_flags));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_ver) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_ver));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit) == 40, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1) == 48, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2) == 56, "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));
+
/* Checks for struct mgs_send_param */
LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
(long long)(int)sizeof(struct mgs_send_param));
#define lustre_swab_qdata NULL
#define lustre_swab_quota_body NULL
#define lustre_swab_lvb NULL
+#define lustre_swab_gl_desc NULL
#define lustre_swab_mgs_config_body NULL
#define lustre_swab_mgs_config_res NULL
#define dump_rniobuf NULL
}
static void
-check_ldlm_lvb(void)
+check_ldlm_ost_lvb(void)
{
BLANK_LINE();
CHECK_STRUCT(ost_lvb);
}
static void
+check_ldlm_lquota_lvb(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(lquota_lvb);
+ CHECK_MEMBER(lquota_lvb, lvb_flags);
+ CHECK_MEMBER(lquota_lvb, lvb_id_may_rel);
+ CHECK_MEMBER(lquota_lvb, lvb_id_rel);
+ CHECK_MEMBER(lquota_lvb, lvb_id_qunit);
+ CHECK_MEMBER(lquota_lvb, lvb_pad1);
+ CHECK_VALUE(LQUOTA_FL_EDQUOT);
+}
+
+static void
+check_ldlm_gl_lquota_desc(void)
+{
+ BLANK_LINE();
+ CHECK_STRUCT(ldlm_gl_lquota_desc);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_id);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_flags);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_ver);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_hardlimit);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_softlimit);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_pad1);
+ CHECK_MEMBER(ldlm_gl_lquota_desc, gl_pad2);
+}
+
+
+static void
check_mgs_send_param(void)
{
BLANK_LINE();
check_ldlm_lock_desc();
check_ldlm_request();
check_ldlm_reply();
- check_ldlm_lvb();
+ check_ldlm_ost_lvb();
+ check_ldlm_lquota_lvb();
+ check_ldlm_gl_lquota_desc();
check_mgs_send_param();
check_cfg_marker();
check_llog_logid();
LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, "found %lld\n",
(long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
+ /* Checks for struct lquota_lvb */
+ LASSERTF((int)sizeof(struct lquota_lvb) == 40, "found %lld\n",
+ (long long)(int)sizeof(struct lquota_lvb));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_flags) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_flags));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_flags) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_flags));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_may_rel) == 8, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_may_rel));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_may_rel));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_rel) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_rel));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_rel));
+ LASSERTF(LQUOTA_FL_EDQUOT == 1, "found %lld\n",
+ (long long)LQUOTA_FL_EDQUOT);
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_id_qunit) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_id_qunit));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_id_qunit));
+ LASSERTF((int)offsetof(struct lquota_lvb, lvb_pad1) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct lquota_lvb, lvb_pad1));
+ LASSERTF((int)sizeof(((struct lquota_lvb *)0)->lvb_pad1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct lquota_lvb *)0)->lvb_pad1));
+
+ /* Checks for struct ldlm_gl_lquota_desc */
+ LASSERTF((int)sizeof(struct ldlm_gl_lquota_desc) == 64, "found %lld\n",
+ (long long)(int)sizeof(struct ldlm_gl_lquota_desc));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_id) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_id));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id) == 16, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_id));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_flags) == 16, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_flags));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_flags));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_ver) == 24, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_ver));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_ver));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_hardlimit));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_hardlimit));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit) == 40, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_softlimit));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_softlimit));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1) == 48, "found %lld\n",
+ (long long)(int)offsetof(struct ldlm_gl_lquota_desc, gl_pad1));
+ LASSERTF((int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct ldlm_gl_lquota_desc *)0)->gl_pad1));
+ LASSERTF((int)offsetof(struct ldlm_gl_lquota_desc, gl_pad2) == 56, "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));
+
/* Checks for struct mgs_send_param */
LASSERTF((int)sizeof(struct mgs_send_param) == 1024, "found %lld\n",
(long long)(int)sizeof(struct mgs_send_param));