RETURN(PTR_ERR(obj));
for (i = 0; i < rdpg->rp_npages; i++) {
- rc = mo_sendpage(ctx, md_object_next(&obj->cmo_obj),
- rdpg->rp_pages[i]);
+ rc = mdc_send_page(ctx, md_object_next(&obj->cmo_obj),
+ rdpg->rp_pages[i]);
if (rc)
GOTO(cleanup, rc);
}
struct lu_object *mdc_object_alloc(const struct lu_context *,
const struct lu_object_header *,
struct lu_device *);
+#ifdef HAVE_SPLIT_SUPPORT
+int mdc_send_page(const struct lu_context *ctx, struct md_object *mo,
+ const struct page *page)
+#endif
+
#endif /* __KERNEL__ */
#endif /* _CMM_MDC_INTERNAL_H */
}
#ifdef HAVE_SPLIT_SUPPORT
-static int mdc_sendpage(const struct lu_context *ctx, struct md_object *mo,
- const struct page *page)
+int mdc_send_page(const struct lu_context *ctx, struct md_object *mo,
+ const struct page *page)
{
struct mdc_device *mc = md2mdc_dev(md_obj2dev(mo));
int rc;
ENTRY;
- rc = md_sendpage(mc->mc_desc.cl_exp, lu_object_fid(&mo->mo_lu),
- page);
-
+ rc = mdc_sendpage(mc->mc_desc.cl_exp, lu_object_fid(&mo->mo_lu),
+ page);
RETURN(rc);
}
#endif
.moo_object_create = mdc_object_create,
.moo_ref_add = mdc_ref_add,
.moo_ref_del = mdc_ref_del,
-#ifdef HAVE_SPLIT_SUPPORT
- .moo_sendpage = mdc_sendpage,
-#endif
};
/* md_dir_operations */
void it_clear_disposition(struct lookup_intent *it, int flag);
void it_set_disposition(struct lookup_intent *it, int flag);
int it_open_error(int phase, struct lookup_intent *it);
+#ifdef HAVE_SPLIT_SUPPORT
+int mdc_sendpage(struct obd_export *exp, const struct lu_fid *fid,
+ const struct page *page);
+#endif
#endif
int (*moo_readpage)(const struct lu_context *, struct md_object *,
const struct lu_rdpg *);
-#ifdef HAVE_SPLIT_SUPPORT
- int (*moo_writepage)(const struct lu_context *, struct md_object *,
- const struct page *page);
- int (*moo_sendpage)(const struct lu_context *, struct md_object *,
- const struct page*);
-#endif
+
int (*moo_readlink)(const struct lu_context *ctxt,
struct md_object *obj,
void *buf, int buf_len);
return m->mo_ops->moo_readpage(cx, m, rdpg);
}
-#ifdef HAVE_SPLIT_SUPPORT
-static inline int mo_writepage(const struct lu_context *cx, struct md_object *m,
- const struct page *pg)
-{
- LASSERT(m->mo_ops->moo_writepage);
- return m->mo_ops->moo_writepage(cx, m, pg);
-}
-
-static inline int mo_sendpage(const struct lu_context *cx, struct md_object *m,
- const struct page *pg)
-{
- LASSERT(m->mo_ops->moo_sendpage);
- return m->mo_ops->moo_sendpage(cx, m, pg);
-}
-#endif
-
static inline int mo_object_create(const struct lu_context *cx,
struct md_object *m,
const struct md_create_spec *spc,
struct ptlrpc_request **);
int (*m_readpage)(struct obd_export *, const struct lu_fid *,
__u64, struct page *, struct ptlrpc_request **);
-#ifdef HAVE_SPLIT_SUPPORT
- int (*m_sendpage)(struct obd_export *, const struct lu_fid *,
- const struct page *);
-#endif
+
int (*m_unlink)(struct obd_export *, struct md_op_data *,
struct ptlrpc_request **);
RETURN(rc);
}
-#ifdef HAVE_SPLIT_SUPPORT
-static inline int md_sendpage(struct obd_export *exp,
- const struct lu_fid *fid,
- const struct page *page)
-{
- int rc;
- ENTRY;
- EXP_CHECK_MD_OP(exp, sendpage);
- MD_COUNTER_INCREMENT(exp->exp_obd, sendpage);
- rc = MDP(exp->exp_obd, sendpage)(exp, fid, page);
- RETURN(rc);
-}
-#endif
-
static inline int md_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
ptlrpc_req_finished(req);
RETURN(rc);
}
+EXPORT_SYMBOL(mdc_sendpage);
#endif
int mdc_readpage(struct obd_export *exp, const struct lu_fid *fid,
.m_getxattr = mdc_getxattr,
.m_sync = mdc_sync,
.m_readpage = mdc_readpage,
-#ifdef HAVE_SPLIT_SUPPORT
- .m_sendpage = mdc_sendpage,
-#endif
.m_unlink = mdc_unlink,
.m_cancel_unused = mdc_cancel_unused,
.m_init_ea_size = mdc_init_ea_size,
ret = EINVAL;
goto out;
}
-
+#if 0
+ /*
+ * Comment out these 2 checks temporarily, since for multi-MDSes
+ * in single node only 1 mds node could have mgs service
+ */
if (IS_MDT(ldd) && !IS_MGS(ldd) && (mop.mo_mgs_failnodes == 0)) {
verrprint("No management node specified, adding MGS to this "
"MDT\n");
ldd->ldd_flags |= LDD_F_SV_TYPE_MGS;
}
-
if (!IS_MGS(ldd) && (mop.mo_mgs_failnodes == 0)) {
fatal();
fprintf(stderr, "Must specify either --mgs or --mgsnode\n");
ret = EINVAL;
goto out;
}
+#endif
/* These are the permanent mount options (always included) */
switch (ldd->ldd_mount_type) {