struct dentry *de = mds_fid2dentry(mds, fid, mnt), *retval = de;
struct ldlm_res_id res_id = { .name = {0} };
int flags = LDLM_FL_ATOMIC_CB, rc;
- ldlm_policy_data_t policy = { .l_inodebits = { lockpart} };
+ ldlm_policy_data_t policy = { .l_inodebits = { lockpart} };
ENTRY;
if (IS_ERR(de))
res_id.name[0] = de->d_inode->i_ino;
res_id.name[1] = de->d_inode->i_generation;
- rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id,
- LDLM_IBITS, &policy, lock_mode, &flags,
+ rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id,
+ LDLM_IBITS, &policy, lock_mode, &flags,
ldlm_blocking_ast, ldlm_completion_ast,
NULL, NULL, 0, NULL, lockh);
if (rc != ELDLM_OK) {
RETURN(result);
}
-static int mds_connect_internal(struct obd_export *exp,
+static int mds_connect_internal(struct obd_export *exp,
struct obd_connect_data *data)
{
struct obd_device *obd = exp->exp_obd;
static int mds_reconnect(struct obd_export *exp, struct obd_device *obd,
struct obd_uuid *cluuid,
- struct obd_connect_data *data)
+ struct obd_connect_data *data,
+ void *localdata)
{
int rc;
ENTRY;
RETURN(-EINVAL);
rc = mds_connect_internal(exp, data);
+ if (rc == 0)
+ mds_export_stats_init(obd, exp, localdata);
RETURN(rc);
}
/* get the LOV EA from @inode and store it into @md. It can be at most
* @size bytes, and @size is updated with the actual EA size.
- * The EA size is also returned on success, and -ve errno on failure.
+ * The EA size is also returned on success, and -ve errno on failure.
* If there is no EA then 0 is returned. */
int mds_get_md(struct obd_device *obd, struct inode *inode, void *md,
int *size, int lock, int flags)
}
#endif
- /* child_lockh() is only set in fixup_handle_for_resent_req()
+ /* child_lockh() is only set in fixup_handle_for_resent_req()
* if MSG_RESENT is set */
if (lustre_handle_is_used(child_lockh)) {
LASSERT(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT);
if (resent_req == 0) {
if (name) {
OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_RESEND, obd_timeout*2);
- rc = mds_get_parent_child_locked(obd, &obd->u.mds,
+ rc = mds_get_parent_child_locked(obd, &obd->u.mds,
&body->fid1,
- &parent_lockh,
+ &parent_lockh,
&dparent, LCK_CR,
MDS_INODELOCK_UPDATE,
name, namesize,
LASSERT(dchild);
if (IS_ERR(dchild))
rc = PTR_ERR(dchild);
- }
+ }
if (rc)
GOTO(cleanup, rc);
} else {
struct ldlm_resource *res;
DEBUG_REQ(D_DLMTRACE, req, "resent, not enqueuing new locks");
granted_lock = ldlm_handle2lock(child_lockh);
- /* lock was granted in fixup_handle_for_resent_req() if
+ /* lock was granted in fixup_handle_for_resent_req() if
* MSG_RESENT is set */
LASSERTF(granted_lock != NULL, LPU64"/%u lockh "LPX64"\n",
body->fid1.id, body->fid1.generation,
/* This will trigger a watchdog timeout */
OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_STATFS_LCW_SLEEP,
- (MDS_SERVICE_WATCHDOG_FACTOR *
+ (MDS_SERVICE_WATCHDOG_FACTOR *
at_get(&svc->srv_at_estimate) / 1000) + 1);
OBD_COUNTER_INCREMENT(obd, statfs);
if (mds->mds_profile) {
struct lustre_profile *lprof;
- /* The profile defines which osc and mdc to connect to, for a
+ /* The profile defines which osc and mdc to connect to, for a
client. We reuse that here to figure out the name of the
lov to use (and ignore lprof->lp_mdc).
- The profile was set in the config log with
+ The profile was set in the config log with
LCFG_MOUNTOPT profilenm oscnm mdcnm */
lprof = class_get_profile(mds->mds_profile);
if (lprof == NULL) {
RETURN(0);
LASSERT(!obd->obd_recovering);
- ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
+ ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
LASSERT(ctxt != NULL);
llog_ctxt_put(ctxt);
/* Notify the LOV, which will in turn call mds_notify for each tgt */
/* This means that we have to hack obd_notify to think we're obd_set_up
during mds_lov_connect. */
- obd_notify(obd->u.mds.mds_osc_obd, NULL,
+ obd_notify(obd->u.mds.mds_osc_obd, NULL,
obd->obd_async_recov ? OBD_NOTIFY_SYNC_NONBLOCK :
OBD_NOTIFY_SYNC, NULL);
!intent_disposition(rep, DISP_OPEN_LOCK)) {
/* If it is the disconnect error (ENODEV & ENOCONN)
* ptlrpc layer should know this imediately, it should
- * be replied by rq_stats, otherwise, return it by
+ * be replied by rq_stats, otherwise, return it by
* intent here
*/
/* if VBR failure then return error in rq_stats too */
mds_max_threads = mds_min_threads = mds_num_threads;
} else {
/* Base min threads on memory and cpus */
- mds_min_threads = num_possible_cpus() * num_physpages >>
+ mds_min_threads = num_possible_cpus() * num_physpages >>
(27 - CFS_PAGE_SHIFT);
if (mds_min_threads < MDS_THREADS_MIN)
mds_min_threads = MDS_THREADS_MIN;
/* Largest auto threads start value */
- if (mds_min_threads > 32)
+ if (mds_min_threads > 32)
mds_min_threads = 32;
mds_max_threads = min(MDS_THREADS_MAX, mds_min_threads * 4);
}
int rc;
lprocfs_mds_init_vars(&lvars);
-
+
rc = class_process_proc_param(PARAM_MDT, lvars.obd_vars, lcfg, obd);
-
+
return(rc);
}