static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
{
struct client_obd *cli = &obd->u.cli;
- struct lprocfs_static_vars lvars = { 0 };
int rc;
ENTRY;
rc = client_obd_setup(obd, cfg);
if (rc)
GOTO(err_close_lock, rc);
- lprocfs_mdc_init_vars(&lvars);
- lprocfs_obd_setup(obd, lvars.obd_vars);
+#ifdef LPROCFS
+ obd->obd_vars = lprocfs_mdc_obd_vars;
+ lprocfs_seq_obd_setup(obd);
lprocfs_alloc_md_stats(obd, 0);
- sptlrpc_lprocfs_cliobd_attach(obd);
- ptlrpc_lprocfs_register_obd(obd);
+#endif
+ sptlrpc_lprocfs_cliobd_attach(obd);
+ ptlrpc_lprocfs_register_obd(obd);
ns_register_cancel(obd->obd_namespace, mdc_cancel_for_recovery);
static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf)
{
struct lustre_cfg *lcfg = buf;
- struct lprocfs_static_vars lvars = { 0 };
- int rc = 0;
-
- lprocfs_mdc_init_vars(&lvars);
- switch (lcfg->lcfg_command) {
- default:
- rc = class_process_proc_param(PARAM_MDC, lvars.obd_vars,
- lcfg, obd);
- if (rc > 0)
- rc = 0;
- break;
- }
- return(rc);
+ int rc = class_process_proc_seq_param(PARAM_MDC, obd->obd_vars,
+ lcfg, obd);
+ return (rc > 0 ? 0: rc);
}
int __init mdc_init(void)
{
- struct lprocfs_static_vars lvars = { 0 };
- lprocfs_mdc_init_vars(&lvars);
-
return class_register_type(&mdc_obd_ops, &mdc_md_ops, NULL,
#ifndef HAVE_ONLY_PROCFS_SEQ
- lvars.module_vars,
+ NULL,
#endif
LUSTRE_MDC_NAME, NULL);
}