static int mgs_handle(struct ptlrpc_request *req);
static int mgs_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
- struct obd_device *tgt, int count,
- struct llog_catid *logid, struct obd_uuid *uuid)
+ struct obd_device *tgt, int *index)
{
int rc;
ENTRY;
if (IS_ERR(obd->obd_fsops))
GOTO(err_put, rc = PTR_ERR(obd->obd_fsops));
+ if (lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb))) {
+ CERROR("%s: Underlying device is marked as read-only. "
+ "Setup failed\n", obd->obd_name);
+ GOTO(err_ops, rc = -EROFS);
+ }
+
/* namespace for mgs llog */
obd->obd_namespace = ldlm_namespace_new(obd ,"MGS", LDLM_NAMESPACE_SERVER,
LDLM_NAMESPACE_MODEST);
ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL,
"mgs_ldlm_client", &obd->obd_ldlm_client);
- if (lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb))) {
- CERROR("%s: Underlying device is marked as read-only. "
- "Setup failed\n", obd->obd_name);
- GOTO(err_ops, rc = -EROFS);
- }
-
rc = mgs_fs_setup(obd, mnt);
if (rc) {
CERROR("%s: MGS filesystem method init failed: rc = %d\n",
GOTO(err_ns, rc);
}
- rc = obd_llog_init(obd, &obd->obd_olg, obd, 0, NULL, NULL);
+ rc = obd_llog_init(obd, &obd->obd_olg, obd, NULL);
if (rc)
GOTO(err_fs, rc);
mgs->mgs_service =
ptlrpc_init_svc(MGS_NBUFS, MGS_BUFSIZE, MGS_MAXREQSIZE,
MGS_MAXREPSIZE, MGS_REQUEST_PORTAL,
- MGC_REPLY_PORTAL, 2000,
+ MGC_REPLY_PORTAL, 2,
mgs_handle, LUSTRE_MGS_NAME,
obd->obd_proc_entry, target_print_req,
MGS_THREADS_AUTO_MIN, MGS_THREADS_AUTO_MAX,
static inline int mgs_init_export(struct obd_export *exp)
{
+ spin_lock(&exp->exp_lock);
+ exp->exp_connecting = 1;
+ spin_unlock(&exp->exp_lock);
+
return ldlm_init_export(exp);
}