LASSERT_REQSWAB (req, 0);
str = lustre_msg_string(req->rq_reqmsg, 0, sizeof(tgtuuid) - 1);
if (str == NULL) {
- CERROR("bad target UUID for connect\n");
+ DEBUG_REQ(D_ERROR, req, "bad target UUID for connect\n");
GOTO(out, rc = -EINVAL);
}
}
if (!target || target->obd_stopping || !target->obd_set_up) {
- CERROR("UUID '%s' is not available for connect\n", str);
+ DEBUG_REQ(D_ERROR, req, "UUID '%s' not available for connect\n",
+ str);
GOTO(out, rc = -ENODEV);
}
LASSERT_REQSWAB (req, 1);
str = lustre_msg_string(req->rq_reqmsg, 1, sizeof(cluuid) - 1);
if (str == NULL) {
- CERROR("bad client UUID for connect\n");
+ DEBUG_REQ(D_ERROR, req, "bad client UUID for connect\n");
GOTO(out, rc = -EINVAL);
}
memcpy(&conn, tmp, sizeof conn);
data = lustre_swab_reqbuf(req, 3, sizeof(*data), lustre_swab_connect);
- if (data == NULL)
- GOTO(out, rc = -EPROTO);
-
rc = lustre_pack_reply(req, 1, &size, NULL);
if (rc)
GOTO(out, rc);
/* Return only the parts of obd_connect_data that we understand, so the
* client knows that we don't understand the rest. */
- memcpy(lustre_msg_buf(req->rq_repmsg, 0, sizeof(*data)), data,
- sizeof(*data));
+ if (data)
+ memcpy(lustre_msg_buf(req->rq_repmsg, 0, sizeof(*data)), data,
+ sizeof(*data));
/* If all else goes well, this is our RPC return code. */
req->rq_status = 0;
RETURN(retval);
}
-#ifndef DCACHE_DISCONNECTED
-#define DCACHE_DISCONNECTED DCACHE_NFSD_DISCONNECTED
-#endif
-
-
/* Look up an entry by inode number. */
/* this function ONLY returns valid dget'd dentries with an initialized inode
or errors */
LASSERT(exp);
med = &exp->exp_mds_data;
- data->ocd_connect_flags &= MDS_CONNECT_SUPPORTED;
- exp->exp_connect_flags = data->ocd_connect_flags;
+ if (data != NULL) {
+ data->ocd_connect_flags &= MDS_CONNECT_SUPPORTED;
+ exp->exp_connect_flags = data->ocd_connect_flags;
+ }
OBD_ALLOC(mcd, sizeof(*mcd));
if (!mcd) {
med->med_mcd = mcd;
rc = mds_client_add(obd, &obd->u.mds, med, -1);
+ GOTO(out, rc);
out:
if (rc) {
body = lustre_swab_reqbuf(req, 0, sizeof(*body), lustre_swab_mds_body);
if (body == NULL)
- GOTO(out, rc = -EPROTO);
+ GOTO(out, rc = -EFAULT);
rc = lustre_pack_reply(req, 1, &size, NULL);
if (rc || OBD_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK)) {
}
ping_evictor_start();
-
+
sema_init(&mds->mds_quota_info.qi_sem, 1);
rc = qctxt_init(&mds->mds_quota_ctxt, mds->mds_sb, dqacq_handler);
if (rc) {
GOTO(err_fs, rc);
}
+
RETURN(0);
err_fs: