From: James Simmons Date: Thu, 28 Aug 2014 17:32:50 +0000 (-0400) Subject: LU-5275 obdclass: Remove lprocfs_vars argument from class_register_type function X-Git-Tag: 2.6.53~85 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=24d98e71b740987a85c331114733e1ebeba5fd73 LU-5275 obdclass: Remove lprocfs_vars argument from class_register_type function 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 Reviewed-on: http://review.whamcloud.com/11640 Tested-by: Jenkins Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 0a73678..844f405 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - struct lprocfs_vars *, -#endif const char *nm, struct lu_device_type *ldt); int class_unregister_type(const char *nm); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 1e64990..cd0e4f9 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_LMV_NAME, NULL); } diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index b0d834e..e4b3785 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -951,9 +951,6 @@ static int __init lod_mod_init(void) 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); diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index bbe4ecd..bd574a7 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -2452,9 +2452,6 @@ int __init lov_init(void) 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) { diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 80bf99b2..7fed354 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MDC_NAME, NULL); } diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index ceda2ec..d81f193 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MDD_NAME, &mdd_device_type); if (rc) lu_kmem_fini(mdd_caches); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 59adef4..0f246aa 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MDT_NAME, &mdt_device_type); if (rc) GOTO(mds_fini, rc); diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index 1c0677a..e763186 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -548,9 +548,6 @@ int mds_mod_init(void) } return class_register_type(&mds_obd_device_ops, NULL, true, NULL, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MDS_NAME, &mds_device_type); } diff --git a/lustre/mgc/libmgc.c b/lustre/mgc/libmgc.c index ec915c7..ccf175f 100644 --- a/lustre/mgc/libmgc.c +++ b/lustre/mgc/libmgc.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MGC_NAME, NULL); } diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index be9ffd8..774030c 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MGC_NAME, NULL); } diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index ae4c3f4..2347b8c 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_MGS_NAME, &mgs_device_type); } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index f20f3b1..a02d347 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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, - 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; @@ -199,18 +196,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, #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; diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index 7be3554..403e571 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif "llog_test", NULL); } diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index baccb17..b772829 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif 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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif - LUSTRE_ECHO_NAME, NULL); + LUSTRE_ECHO_NAME, NULL); if (rc != 0) goto failed_1; # endif diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index b66f850..51ffc75 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -2433,9 +2433,6 @@ int __init ofd_init(void) } 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; } diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 732487c..4fa4259 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -3309,9 +3309,6 @@ int __init osc_init(void) 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); diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 49d9afa..5ff2ffe 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -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, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, -#endif LUSTRE_OSD_LDISKFS_NAME, &osd_device_type); if (rc) lu_kmem_fini(ldiskfs_caches); diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index b59d920..a966487 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -940,9 +940,6 @@ int __init osd_init(void) 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); diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index f7c18ae..2e7206c 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -1729,9 +1729,6 @@ static int __init osp_mod_init(void) 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); @@ -1739,9 +1736,6 @@ static int __init osp_mod_init(void) } 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); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index a35d2b0..8a646dc 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -422,9 +422,6 @@ static int __init ost_init(void) 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) { diff --git a/lustre/quota/qmt_dev.c b/lustre/quota/qmt_dev.c index 323e56e..8b501c3 100644 --- a/lustre/quota/qmt_dev.c +++ b/lustre/quota/qmt_dev.c @@ -472,9 +472,6 @@ int qmt_glb_init(void) 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); }