goto end_while;
/* Processed in mgs_write_log_ost */
- if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0)
+ if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0) {
+ if (mti->mti_flags & LDD_F_PARAM) {
+ LCONSOLE_ERROR("%s can only be changed with "
+ "tunefs.lustre and --writeconf\n",
+ ptr);
+ rc = -EPERM;
+ }
goto end_while;
+ }
if (class_match_param(ptr, PARAM_FAILNODE, NULL) == 0) {
/* Add a failover nidlist */
rc = 0;
/* We already processed failovers params for new
targets in mgs_write_log_target */
- if (mti->mti_flags & LDD_F_PARAM_FNID) {
+ if (mti->mti_flags & LDD_F_PARAM) {
CDEBUG(D_MGS, "Adding failnode\n");
rc = mgs_write_log_add_failnid(obd, fsdb, mti);
}
} else {
/* Just update the params from tunefs in mgs_write_log_params */
CDEBUG(D_MGS, "Update params for %s\n", mti->mti_svname);
- mti->mti_flags |= LDD_F_PARAM_FNID;
+ mti->mti_flags |= LDD_F_PARAM;
}
rc = mgs_write_log_params(obd, fsdb, mti);
mti->mti_svname))
GOTO(out, rc = -EINVAL);
- mti->mti_flags = rc | LDD_F_PARAM_FNID;
+ mti->mti_flags = rc | LDD_F_PARAM;
down(&fsdb->fsdb_sem);
rc = mgs_write_log_params(obd, fsdb, mti);
ENTRY;
init_brw_stats(&fed->fed_brw_stats);
+
+ if (obd_uuid_equals(&exp->exp_client_uuid, &obd->obd_uuid))
+ /* Self-export gets no proc entry */
+ RETURN(0);
rc = lprocfs_exp_setup(exp);
if (rc)
LASSERTF(cl_idx > -2, "%d\n", cl_idx);
/* Self-export */
- if (strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid) == 0) {
- init_brw_stats(&fed->fed_brw_stats);
+ if (strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid) == 0)
RETURN(0);
- }
/* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
* there's no need for extra complication here
fed->fed_lr_off = le32_to_cpu(filter->fo_fsd->lsd_client_start) +
cl_idx * le16_to_cpu(filter->fo_fsd->lsd_client_size);
LASSERTF(fed->fed_lr_off > 0, "fed_lr_off = %llu\n", fed->fed_lr_off);
- filter_export_stats_init(obd, exp);
CDEBUG(D_INFO, "client at index %d (%llu) with UUID '%s' added\n",
fed->fed_lr_idx, fed->fed_lr_off, fed->fed_fcd->fcd_uuid);
CDEBUG(D_INFO, "freeing client at idx %u, offset %lld with UUID '%s'\n",
fed->fed_lr_idx, off, fed->fed_fcd->fcd_uuid);
- lprocfs_exp_cleanup(exp);
-
LASSERT(filter->fo_last_rcvd_slots != NULL);
off = fed->fed_lr_off;
} else {
fed = &exp->exp_filter_data;
fed->fed_fcd = fcd;
+ filter_export_stats_init(obd, exp);
rc = filter_client_add(obd, exp, cl_idx);
LASSERTF(rc == 0, "rc = %d\n", rc); /* can't fail existing */
if (rc)
GOTO(cleanup, rc);
+ filter_export_stats_init(obd, exp);
+
if (!obd->obd_replayable)
GOTO(cleanup, rc = 0);
if (obd_uuid_equals(&exp->exp_client_uuid, &exp->exp_obd->obd_uuid))
RETURN(0);
+ lprocfs_exp_cleanup(exp);
+
if (exp->exp_obd->obd_replayable)
filter_client_free(exp);
else
dparent = filter_parent_lock(obd, group, next_id);
if (IS_ERR(dparent))
GOTO(cleanup, rc = PTR_ERR(dparent));
- cleanup_phase = 1; /* filter_parent_unlock(dparent) */
+ cleanup_phase = 1; /* filter_parent_unlock(dparent) */
dchild = filter_fid2dentry(obd, dparent, group, next_id);
if (IS_ERR(dchild))
GOTO(cleanup, rc = PTR_ERR(dchild));
- cleanup_phase = 2; /* f_dput(dchild) */
+ cleanup_phase = 2; /* f_dput(dchild) */
if (dchild->d_inode != NULL) {
/* This would only happen if lastobjid was bad on disk*/