static kmem_cache_t *mds_file_cache;
-extern int mds_get_lovtgts(struct obd_device *obd, int tgt_count,
+extern int mds_get_lovtgts(struct mds_obd *obd, int tgt_count,
obd_uuid_t *uuidarray);
-extern int mds_get_lovdesc(struct obd_device *obd, struct lov_desc *desc);
+extern int mds_get_lovdesc(struct mds_obd *obd, struct lov_desc *desc);
extern int mds_update_last_rcvd(struct mds_obd *mds, void *handle,
struct ptlrpc_request *req);
static int mds_cleanup(struct obd_device * obddev);
}
desc = lustre_msg_buf(req->rq_repmsg, 0);
- rc = mds_get_lovdesc(req->rq_obd, desc);
+ rc = mds_get_lovdesc(mds, desc);
if (rc) {
CERROR("mds_get_lovdesc error %d", rc);
req->rq_status = rc;
mds->mds_max_mdsize = sizeof(struct lov_mds_md) +
tgt_count * sizeof(struct lov_object_id);
- rc = mds_get_lovtgts(req->rq_obd, tgt_count,
+ rc = mds_get_lovtgts(mds, tgt_count,
lustre_msg_buf(req->rq_repmsg, 1));
if (rc) {
CERROR("get_lovtgts error %d\n", rc);
CERROR("MDS filesystem method init failed: rc = %d\n", rc);
GOTO(err_put, rc);
}
-
+#warning move this to module init
mds->mds_service = ptlrpc_init_svc(MDS_NEVENTS, MDS_NBUFS,
MDS_BUFSIZE, MDS_MAXREQSIZE,
MDS_REQUEST_PORTAL, MDC_REPLY_PORTAL,
RETURN(rc);
}
-int mds_get_lovdesc(struct obd_device *obd, struct lov_desc *desc)
+int mds_get_lovdesc(struct mds_obd *mds, struct lov_desc *desc)
{
- struct mds_obd *mds = &obd->u.mds;
struct obd_run_ctxt saved;
struct file *f;
int rc;
RETURN(0);
}
-int mds_get_lovtgts(struct obd_device *obd, int tgt_count,obd_uuid_t *uuidarray)
+int mds_get_lovtgts(struct mds_obd *mds, int tgt_count,obd_uuid_t *uuidarray)
{
- struct mds_obd *mds = &obd->u.mds;
struct obd_run_ctxt saved;
struct file *f;
int rc;