Whamcloud - gitweb
LU-3319 procfs: move mdd/ofd proc handling to seq_files
[fs/lustre-release.git] / lustre / mdd / mdd_device.c
index d210c2a..d55f358 100644 (file)
@@ -148,17 +148,12 @@ static int mdd_init0(const struct lu_env *env, struct mdd_device *mdd,
 static struct lu_device *mdd_device_fini(const struct lu_env *env,
                                          struct lu_device *d)
 {
-        struct mdd_device *mdd = lu2mdd_dev(d);
-        int rc;
+       struct mdd_device *mdd = lu2mdd_dev(d);
 
        if (d->ld_site)
                lu_dev_del_linkage(d->ld_site, d);
 
-        rc = mdd_procfs_fini(mdd);
-        if (rc) {
-                CERROR("proc fini error %d \n", rc);
-                return ERR_PTR(rc);
-        }
+       mdd_procfs_fini(mdd);
        return NULL;
 }
 
@@ -890,16 +885,16 @@ static int mdd_process_config(const struct lu_env *env,
         ENTRY;
 
         switch (cfg->lcfg_command) {
-        case LCFG_PARAM: {
-                struct lprocfs_static_vars lvars;
-
-                lprocfs_mdd_init_vars(&lvars);
-                rc = class_process_proc_param(PARAM_MDD, lvars.obd_vars, cfg,m);
-                if (rc > 0 || rc == -ENOSYS)
-                        /* we don't understand; pass it on */
-                        rc = next->ld_ops->ldo_process_config(env, next, cfg);
-                break;
-        }
+       case LCFG_PARAM: {
+               struct obd_device *obd = mdd2obd_dev(m);
+
+               rc = class_process_proc_seq_param(PARAM_MDD, obd->obd_vars,
+                                                 cfg, m);
+               if (rc > 0 || rc == -ENOSYS)
+                       /* we don't understand; pass it on */
+                       rc = next->ld_ops->ldo_process_config(env, next, cfg);
+               break;
+       }
         case LCFG_SETUP:
                 rc = next->ld_ops->ldo_process_config(env, next, cfg);
                 if (rc)
@@ -1596,11 +1591,8 @@ void mdd_generic_thread_stop(struct mdd_generic_thread *thread)
 
 static int __init mdd_mod_init(void)
 {
-       struct lprocfs_static_vars lvars;
        int rc;
 
-       lprocfs_mdd_init_vars(&lvars);
-
        rc = lu_kmem_init(mdd_caches);
        if (rc)
                return rc;
@@ -1616,7 +1608,7 @@ static int __init mdd_mod_init(void)
 
        rc = class_register_type(&mdd_obd_device_ops, NULL, true, NULL,
 #ifndef HAVE_ONLY_PROCFS_SEQ
-                                lvars.module_vars,
+                                NULL,
 #endif
                                 LUSTRE_MDD_NAME, &mdd_device_type);
        if (rc)