Whamcloud - gitweb
LU-5275 obdclass: Remove lprocfs_vars argument from class_register_type function 40/11640/2
authorJames Simmons <uja.ornl@gmail.com>
Thu, 28 Aug 2014 17:32:50 +0000 (13:32 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 6 Sep 2014 02:48:54 +0000 (02:48 +0000)
Lustre no longer uses struct lprocfs_vars with any instance
of class_register_type function. We can safely remove it.

Change-Id: Ia4ecabab4f286bfe9991d1a860e2485694fca5d0
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11640
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
21 files changed:
lustre/include/obd_class.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_dev.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_device.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_mds.c
lustre/mgc/libmgc.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_handler.c
lustre/obdclass/genops.c
lustre/obdclass/llog_test.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c
lustre/osp/osp_dev.c
lustre/ost/ost_handler.c
lustre/quota/qmt_dev.c

index 0a73678..844f405 100644 (file)
@@ -78,9 +78,6 @@ struct lu_device_type;
 struct obd_export *class_conn2export(struct lustre_handle *);
 int class_register_type(struct obd_ops *, struct md_ops *, bool enable_proc,
                        struct lprocfs_seq_vars *module_vars,
 struct obd_export *class_conn2export(struct lustre_handle *);
 int class_register_type(struct obd_ops *, struct md_ops *, bool enable_proc,
                        struct lprocfs_seq_vars *module_vars,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                       struct lprocfs_vars *,
-#endif
                        const char *nm, struct lu_device_type *ldt);
 int class_unregister_type(const char *nm);
 
                        const char *nm, struct lu_device_type *ldt);
 int class_unregister_type(const char *nm);
 
index 1e64990..cd0e4f9 100644 (file)
@@ -3614,9 +3614,6 @@ struct md_ops lmv_md_ops = {
 int __init lmv_init(void)
 {
        return class_register_type(&lmv_obd_ops, &lmv_md_ops, true, NULL,
 int __init lmv_init(void)
 {
        return class_register_type(&lmv_obd_ops, &lmv_md_ops, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_LMV_NAME, NULL);
 }
 
                                   LUSTRE_LMV_NAME, NULL);
 }
 
index b0d834e..e4b3785 100644 (file)
@@ -951,9 +951,6 @@ static int __init lod_mod_init(void)
                return rc;
 
        rc = class_register_type(&lod_obd_device_ops, NULL, true, NULL,
                return rc;
 
        rc = class_register_type(&lod_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_LOD_NAME, &lod_device_type);
        if (rc) {
                lu_kmem_fini(lod_caches);
                                 LUSTRE_LOD_NAME, &lod_device_type);
        if (rc) {
                lu_kmem_fini(lod_caches);
index bbe4ecd..bd574a7 100644 (file)
@@ -2452,9 +2452,6 @@ int __init lov_init(void)
                enable_proc = false;
 
        rc = class_register_type(&lov_obd_ops, NULL, enable_proc, NULL,
                enable_proc = false;
 
        rc = class_register_type(&lov_obd_ops, NULL, enable_proc, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_LOV_NAME, &lov_device_type);
 
         if (rc) {
                                 LUSTRE_LOV_NAME, &lov_device_type);
 
         if (rc) {
index 80bf99b..7fed354 100644 (file)
@@ -3168,9 +3168,6 @@ struct md_ops mdc_md_ops = {
 int __init mdc_init(void)
 {
        return class_register_type(&mdc_obd_ops, &mdc_md_ops, true, NULL,
 int __init mdc_init(void)
 {
        return class_register_type(&mdc_obd_ops, &mdc_md_ops, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_MDC_NAME, NULL);
 }
 
                                   LUSTRE_MDC_NAME, NULL);
 }
 
index ceda2ec..d81f193 100644 (file)
@@ -1606,9 +1606,6 @@ static int __init mdd_mod_init(void)
        hsm_actions_logops.lop_declare_add = llog_cat_declare_add_rec;
 
        rc = class_register_type(&mdd_obd_device_ops, NULL, true, NULL,
        hsm_actions_logops.lop_declare_add = llog_cat_declare_add_rec;
 
        rc = class_register_type(&mdd_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_MDD_NAME, &mdd_device_type);
        if (rc)
                lu_kmem_fini(mdd_caches);
                                 LUSTRE_MDD_NAME, &mdd_device_type);
        if (rc)
                lu_kmem_fini(mdd_caches);
index 59adef4..0f246aa 100644 (file)
@@ -5942,9 +5942,6 @@ static int __init mdt_mod_init(void)
                GOTO(lu_fini, rc);
 
        rc = class_register_type(&mdt_obd_device_ops, NULL, true, NULL,
                GOTO(lu_fini, rc);
 
        rc = class_register_type(&mdt_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_MDT_NAME, &mdt_device_type);
        if (rc)
                GOTO(mds_fini, rc);
                                 LUSTRE_MDT_NAME, &mdt_device_type);
        if (rc)
                GOTO(mds_fini, rc);
index 1c0677a..e763186 100644 (file)
@@ -548,9 +548,6 @@ int mds_mod_init(void)
        }
 
        return class_register_type(&mds_obd_device_ops, NULL, true, NULL,
        }
 
        return class_register_type(&mds_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_MDS_NAME, &mds_device_type);
 }
 
                                   LUSTRE_MDS_NAME, &mds_device_type);
 }
 
index ec915c7..ccf175f 100644 (file)
@@ -159,8 +159,5 @@ struct obd_ops mgc_obd_ops = {
 int __init mgc_init(void)
 {
        return class_register_type(&mgc_obd_ops, NULL, true, NULL,
 int __init mgc_init(void)
 {
        return class_register_type(&mgc_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_MGC_NAME, NULL);
 }
                                   LUSTRE_MGC_NAME, NULL);
 }
index be9ffd8..774030c 100644 (file)
@@ -2026,9 +2026,6 @@ struct obd_ops mgc_obd_ops = {
 int __init mgc_init(void)
 {
        return class_register_type(&mgc_obd_ops, NULL, true, NULL,
 int __init mgc_init(void)
 {
        return class_register_type(&mgc_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_MGC_NAME, NULL);
 }
 
                                   LUSTRE_MGC_NAME, NULL);
 }
 
index ae4c3f4..2347b8c 100644 (file)
@@ -1530,9 +1530,6 @@ static struct obd_ops mgs_obd_device_ops = {
 static int __init mgs_init(void)
 {
        return class_register_type(&mgs_obd_device_ops, NULL, true, NULL,
 static int __init mgs_init(void)
 {
        return class_register_type(&mgs_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   LUSTRE_MGS_NAME, &mgs_device_type);
 }
 
                                   LUSTRE_MGS_NAME, &mgs_device_type);
 }
 
index f20f3b1..a02d347 100644 (file)
@@ -158,10 +158,7 @@ EXPORT_SYMBOL(class_put_type);
 #define CLASS_MAX_NAME 1024
 
 int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
 #define CLASS_MAX_NAME 1024
 
 int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
-                       bool enable_proc, struct lprocfs_seq_vars *module_vars,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                       struct lprocfs_vars *vars,
-#endif
+                       bool enable_proc, struct lprocfs_seq_vars *vars,
                        const char *name, struct lu_device_type *ldt)
 {
         struct obd_type *type;
                        const char *name, struct lu_device_type *ldt)
 {
         struct obd_type *type;
@@ -199,18 +196,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
 
 #ifdef LPROCFS
        if (enable_proc) {
 
 #ifdef LPROCFS
        if (enable_proc) {
-#ifndef HAVE_ONLY_PROCFS_SEQ
-               if (vars) {
-                       type->typ_procroot = lprocfs_register(type->typ_name,
-                                                             proc_lustre_root,
-                                                             vars, type);
-               } else
-#endif
-               {
-                       type->typ_procroot = lprocfs_seq_register(type->typ_name,
-                                                                 proc_lustre_root,
-                                                                 module_vars, type);
-               }
+               type->typ_procroot = lprocfs_seq_register(type->typ_name,
+                                                         proc_lustre_root,
+                                                         vars, type);
                if (IS_ERR(type->typ_procroot)) {
                        rc = PTR_ERR(type->typ_procroot);
                        type->typ_procroot = NULL;
                if (IS_ERR(type->typ_procroot)) {
                        rc = PTR_ERR(type->typ_procroot);
                        type->typ_procroot = NULL;
index 7be3554..403e571 100644 (file)
@@ -1237,9 +1237,6 @@ static struct obd_ops llog_obd_ops = {
 static int __init llog_test_init(void)
 {
        return class_register_type(&llog_obd_ops, NULL, true, NULL,
 static int __init llog_test_init(void)
 {
        return class_register_type(&llog_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                  NULL,
-#endif
                                   "llog_test", NULL);
 }
 
                                   "llog_test", NULL);
 }
 
index baccb17..b772829 100644 (file)
@@ -3013,9 +3013,6 @@ int echo_client_init(void)
        rc = lu_kmem_init(echo_caches);
        if (rc == 0) {
                rc = class_register_type(&echo_client_obd_ops, NULL, true, NULL,
        rc = lu_kmem_init(echo_caches);
        if (rc == 0) {
                rc = class_register_type(&echo_client_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                        NULL,
-#endif
                                         LUSTRE_ECHO_CLIENT_NAME,
                                         &echo_device_type);
                if (rc)
                                         LUSTRE_ECHO_CLIENT_NAME,
                                         &echo_device_type);
                if (rc)
@@ -3045,10 +3042,7 @@ static int __init obdecho_init(void)
                 goto failed_0;
 
        rc = class_register_type(&echo_obd_ops, NULL, true, NULL,
                 goto failed_0;
 
        rc = class_register_type(&echo_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                               NULL,
-#endif
-                               LUSTRE_ECHO_NAME, NULL);
+                                LUSTRE_ECHO_NAME, NULL);
        if (rc != 0)
                goto failed_1;
 # endif
        if (rc != 0)
                goto failed_1;
 # endif
index b66f850..51ffc75 100644 (file)
@@ -2433,9 +2433,6 @@ int __init ofd_init(void)
        }
 
        rc = class_register_type(&ofd_obd_ops, NULL, true, NULL,
        }
 
        rc = class_register_type(&ofd_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OST_NAME, &ofd_device_type);
        return rc;
 }
                                 LUSTRE_OST_NAME, &ofd_device_type);
        return rc;
 }
index 732487c..4fa4259 100644 (file)
@@ -3309,9 +3309,6 @@ int __init osc_init(void)
                enable_proc = false;
 
        rc = class_register_type(&osc_obd_ops, NULL, enable_proc, NULL,
                enable_proc = false;
 
        rc = class_register_type(&osc_obd_ops, NULL, enable_proc, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSC_NAME, &osc_device_type);
         if (rc) {
                 lu_kmem_fini(osc_caches);
                                 LUSTRE_OSC_NAME, &osc_device_type);
         if (rc) {
                 lu_kmem_fini(osc_caches);
index 49d9afa..5ff2ffe 100644 (file)
@@ -6176,9 +6176,6 @@ static int __init osd_mod_init(void)
 
        rc = class_register_type(&osd_obd_device_ops, NULL, true,
                                 lprocfs_osd_module_vars,
 
        rc = class_register_type(&osd_obd_device_ops, NULL, true,
                                 lprocfs_osd_module_vars,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSD_LDISKFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(ldiskfs_caches);
                                 LUSTRE_OSD_LDISKFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(ldiskfs_caches);
index b59d920..a966487 100644 (file)
@@ -940,9 +940,6 @@ int __init osd_init(void)
                return rc;
 
        rc = class_register_type(&osd_obd_device_ops, NULL, true, NULL,
                return rc;
 
        rc = class_register_type(&osd_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSD_ZFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(osd_caches);
                                 LUSTRE_OSD_ZFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(osd_caches);
index f7c18ae..2e7206c 100644 (file)
@@ -1729,9 +1729,6 @@ static int __init osp_mod_init(void)
 
 
        rc = class_register_type(&osp_obd_device_ops, NULL, true, NULL,
 
 
        rc = class_register_type(&osp_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSP_NAME, &osp_device_type);
        if (rc != 0) {
                lu_kmem_fini(osp_caches);
                                 LUSTRE_OSP_NAME, &osp_device_type);
        if (rc != 0) {
                lu_kmem_fini(osp_caches);
@@ -1739,9 +1736,6 @@ static int __init osp_mod_init(void)
        }
 
        rc = class_register_type(&lwp_obd_device_ops, NULL, true, NULL,
        }
 
        rc = class_register_type(&lwp_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_LWP_NAME, &lwp_device_type);
        if (rc != 0) {
                class_unregister_type(LUSTRE_OSP_NAME);
                                 LUSTRE_LWP_NAME, &lwp_device_type);
        if (rc != 0) {
                class_unregister_type(LUSTRE_OSP_NAME);
index a35d2b0..8a646dc 100644 (file)
@@ -422,9 +422,6 @@ static int __init ost_init(void)
        ENTRY;
 
        rc = class_register_type(&ost_obd_ops, NULL, true, NULL,
        ENTRY;
 
        rc = class_register_type(&ost_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSS_NAME, NULL);
 
         if (ost_num_threads != 0 && oss_num_threads == 0) {
                                 LUSTRE_OSS_NAME, NULL);
 
         if (ost_num_threads != 0 && oss_num_threads == 0) {
index 323e56e..8b501c3 100644 (file)
@@ -472,9 +472,6 @@ int qmt_glb_init(void)
        ENTRY;
 
        rc = class_register_type(&qmt_obd_ops, NULL, true, NULL,
        ENTRY;
 
        rc = class_register_type(&qmt_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_QMT_NAME, &qmt_device_type);
        RETURN(rc);
 }
                                 LUSTRE_QMT_NAME, &qmt_device_type);
        RETURN(rc);
 }