From a172863af11bcef474191ca40eaa479179457c08 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 13 Jan 2015 10:44:03 -0500 Subject: [PATCH] LU-5275 lprocfs: sync names to upstream kernel lustre client When seq file handling was introduced to lustre we had to create duplicate functions that handle a different type of struct lprocfs_vars which was names struct lprocfs_seq_vars. Now that lustre has moved to using only seq_file we can rename the special *seq* functions and structures to what is exactly in the upstream linux kernel. This helps to greatly reduce the difference between upstream and the Intel branch. Change-Id: Ic4f7eac105736c691ea4b37438352e5542ce344c Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/13330 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond --- lustre/fid/fid_handler.c | 9 ++++----- lustre/fid/fid_internal.h | 4 ++-- lustre/fid/fid_request.c | 14 ++++++-------- lustre/fid/lproc_fid.c | 4 ++-- lustre/fld/fld_handler.c | 5 ++--- lustre/fld/fld_internal.h | 4 ++-- lustre/fld/fld_request.c | 14 ++++++-------- lustre/fld/lproc_fld.c | 4 ++-- lustre/include/lprocfs_status.h | 29 +++++++++++++---------------- lustre/include/obd.h | 2 +- lustre/include/obd_class.h | 4 ++-- lustre/ldlm/ldlm_internal.h | 4 ++-- lustre/ldlm/ldlm_pool.c | 6 +++--- lustre/ldlm/ldlm_resource.c | 24 ++++++++++++------------ lustre/llite/llite_internal.h | 2 +- lustre/llite/lproc_llite.c | 16 ++++++++-------- lustre/llite/super25.c | 2 +- lustre/lmv/lmv_internal.h | 2 +- lustre/lmv/lmv_obd.c | 6 +++--- lustre/lmv/lproc_lmv.c | 2 +- lustre/lod/lod_dev.c | 4 ++-- lustre/lod/lproc_lod.c | 14 +++++++------- lustre/lov/lov_internal.h | 2 +- lustre/lov/lov_obd.c | 18 +++++++++--------- lustre/lov/lproc_lov.c | 2 +- lustre/mdc/lproc_mdc.c | 2 +- lustre/mdc/mdc_internal.h | 2 +- lustre/mdd/mdd_lproc.c | 6 +++--- lustre/mdt/mdt_coordinator.c | 8 ++++---- lustre/mdt/mdt_internal.h | 2 +- lustre/mdt/mdt_lproc.c | 2 +- lustre/mdt/mdt_mds.c | 2 +- lustre/mgc/lproc_mgc.c | 2 +- lustre/mgc/mgc_internal.h | 2 +- lustre/mgs/lproc_mgs.c | 12 ++++++------ lustre/obdclass/genops.c | 8 ++++---- lustre/obdclass/linux/linux-module.c | 4 ++-- lustre/obdclass/lprocfs_status.c | 28 ++++++++++++++-------------- lustre/obdclass/lprocfs_status_server.c | 6 +++--- lustre/obdclass/obd_config.c | 4 ++-- lustre/obdecho/echo.c | 2 +- lustre/ofd/lproc_ofd.c | 2 +- lustre/ofd/ofd_dev.c | 3 +-- lustre/ofd/ofd_internal.h | 2 +- lustre/osc/lproc_osc.c | 2 +- lustre/osc/osc_internal.h | 2 +- lustre/osc/osc_request.c | 6 +++--- lustre/osd-ldiskfs/osd_internal.h | 4 ++-- lustre/osd-ldiskfs/osd_lproc.c | 10 +++++----- lustre/osd-zfs/osd_internal.h | 2 +- lustre/osd-zfs/osd_lproc.c | 7 ++++--- lustre/osp/lproc_osp.c | 8 ++++---- lustre/osp/osp_dev.c | 4 ++-- lustre/ost/ost_handler.c | 2 +- lustre/ptlrpc/gss/lproc_gss.c | 12 ++++++------ lustre/ptlrpc/lproc_ptlrpc.c | 8 ++++---- lustre/ptlrpc/nodemap_lproc.c | 30 +++++++++++++----------------- lustre/ptlrpc/nrs_crr.c | 5 ++--- lustre/ptlrpc/nrs_orr.c | 11 ++++------- lustre/ptlrpc/nrs_tbf.c | 5 ++--- lustre/ptlrpc/sec_lproc.c | 6 +++--- lustre/quota/qmt_dev.c | 4 ++-- lustre/quota/qmt_pool.c | 6 +++--- lustre/quota/qsd_lib.c | 6 +++--- 64 files changed, 209 insertions(+), 227 deletions(-) diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index 11a9a54..62f2eab 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -414,16 +414,15 @@ static int seq_server_proc_init(struct lu_server_seq *seq) int rc; ENTRY; - seq->lss_proc_dir = lprocfs_seq_register(seq->lss_name, - seq_type_proc_dir, - NULL, NULL); + seq->lss_proc_dir = lprocfs_register(seq->lss_name, + seq_type_proc_dir, + NULL, NULL); if (IS_ERR(seq->lss_proc_dir)) { rc = PTR_ERR(seq->lss_proc_dir); RETURN(rc); } - rc = lprocfs_seq_add_vars(seq->lss_proc_dir, - seq_server_proc_list, seq); + rc = lprocfs_add_vars(seq->lss_proc_dir, seq_server_proc_list, seq); if (rc) { CERROR("%s: Can't init sequence manager " "proc, rc %d\n", seq->lss_name, rc); diff --git a/lustre/fid/fid_internal.h b/lustre/fid/fid_internal.h index 25d317c..3214832 100644 --- a/lustre/fid/fid_internal.h +++ b/lustre/fid/fid_internal.h @@ -61,7 +61,7 @@ enum { extern struct lu_context_key seq_thread_key; # ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars seq_server_proc_list[]; +extern struct lprocfs_vars seq_server_proc_list[]; # endif /* Store API functions. */ @@ -95,7 +95,7 @@ int seq_client_alloc_super(struct lu_client_seq *seq, const struct lu_env *env); # ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars seq_client_proc_list[]; +extern struct lprocfs_vars seq_client_proc_list[]; # endif extern struct proc_dir_entry *seq_type_proc_dir; diff --git a/lustre/fid/fid_request.c b/lustre/fid/fid_request.c index 4f7fdf5..ae896fc 100644 --- a/lustre/fid/fid_request.c +++ b/lustre/fid/fid_request.c @@ -440,9 +440,8 @@ static int seq_client_proc_init(struct lu_client_seq *seq) int rc; ENTRY; - seq->lcs_proc_dir = lprocfs_seq_register(seq->lcs_name, - seq_type_proc_dir, - NULL, NULL); + seq->lcs_proc_dir = lprocfs_register(seq->lcs_name, seq_type_proc_dir, + NULL, NULL); if (IS_ERR(seq->lcs_proc_dir)) { CERROR("%s: LProcFS failed in seq-init\n", seq->lcs_name); @@ -450,8 +449,7 @@ static int seq_client_proc_init(struct lu_client_seq *seq) RETURN(rc); } - rc = lprocfs_seq_add_vars(seq->lcs_proc_dir, - seq_client_proc_list, seq); + rc = lprocfs_add_vars(seq->lcs_proc_dir, seq_client_proc_list, seq); if (rc) { CERROR("%s: Can't init sequence manager " "proc, rc %d\n", seq->lcs_name, rc); @@ -574,9 +572,9 @@ struct proc_dir_entry *seq_type_proc_dir; static int __init fid_mod_init(void) { - seq_type_proc_dir = lprocfs_seq_register(LUSTRE_SEQ_NAME, - proc_lustre_root, - NULL, NULL); + seq_type_proc_dir = lprocfs_register(LUSTRE_SEQ_NAME, + proc_lustre_root, + NULL, NULL); if (IS_ERR(seq_type_proc_dir)) return PTR_ERR(seq_type_proc_dir); diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index 616ef2e..6c1dfe9 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -213,7 +213,7 @@ LPROC_SEQ_FOPS(lprocfs_server_fid_space); LPROC_SEQ_FOPS(lprocfs_server_fid_width); LPROC_SEQ_FOPS_RO(lprocfs_server_fid_server); -struct lprocfs_seq_vars seq_server_proc_list[] = { +struct lprocfs_vars seq_server_proc_list[] = { { .name = "space", .fops = &lprocfs_server_fid_space_fops }, { .name = "width", @@ -639,7 +639,7 @@ LPROC_SEQ_FOPS(lprocfs_client_fid_width); LPROC_SEQ_FOPS_RO(lprocfs_client_fid_server); LPROC_SEQ_FOPS_RO(lprocfs_client_fid_fid); -struct lprocfs_seq_vars seq_client_proc_list[] = { +struct lprocfs_vars seq_client_proc_list[] = { { .name = "space", .fops = &lprocfs_client_fid_space_fops }, { .name = "width", diff --git a/lustre/fld/fld_handler.c b/lustre/fld/fld_handler.c index 83e9e1b..062bef9 100644 --- a/lustre/fld/fld_handler.c +++ b/lustre/fld/fld_handler.c @@ -402,9 +402,8 @@ static int fld_server_proc_init(struct lu_server_fld *fld) int rc = 0; ENTRY; - fld->lsf_proc_dir = lprocfs_seq_register(fld->lsf_name, - fld_type_proc_dir, - fld_server_proc_list, fld); + fld->lsf_proc_dir = lprocfs_register(fld->lsf_name, fld_type_proc_dir, + fld_server_proc_list, fld); if (IS_ERR(fld->lsf_proc_dir)) { rc = PTR_ERR(fld->lsf_proc_dir); RETURN(rc); diff --git a/lustre/fld/fld_internal.h b/lustre/fld/fld_internal.h index 025e11e..473f9fd 100644 --- a/lustre/fld/fld_internal.h +++ b/lustre/fld/fld_internal.h @@ -151,7 +151,7 @@ extern struct lu_fld_hash fld_hash[]; #ifdef CONFIG_PROC_FS extern struct proc_dir_entry *fld_type_proc_dir; -extern struct lprocfs_seq_vars fld_client_proc_list[]; +extern struct lprocfs_vars fld_client_proc_list[]; #endif # ifdef HAVE_SERVER_SUPPORT @@ -189,7 +189,7 @@ int fld_server_read(const struct lu_env *env, struct lu_server_fld *fld, struct lu_seq_range *range, void *data, int data_len); #ifdef CONFIG_PROC_FS extern const struct file_operations fld_proc_seq_fops; -extern struct lprocfs_seq_vars fld_server_proc_list[]; +extern struct lprocfs_vars fld_server_proc_list[]; #endif # endif /* HAVE_SERVER_SUPPORT */ diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index 019e8fd..3ef67a7 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -235,9 +235,8 @@ static int fld_client_proc_init(struct lu_client_fld *fld) int rc; ENTRY; - fld->lcf_proc_dir = lprocfs_seq_register(fld->lcf_name, - fld_type_proc_dir, - NULL, NULL); + fld->lcf_proc_dir = lprocfs_register(fld->lcf_name, fld_type_proc_dir, + NULL, NULL); if (IS_ERR(fld->lcf_proc_dir)) { CERROR("%s: LProcFS failed in fld-init\n", fld->lcf_name); @@ -245,8 +244,7 @@ static int fld_client_proc_init(struct lu_client_fld *fld) RETURN(rc); } - rc = lprocfs_seq_add_vars(fld->lcf_proc_dir, - fld_client_proc_list, fld); + rc = lprocfs_add_vars(fld->lcf_proc_dir, fld_client_proc_list, fld); if (rc) { CERROR("%s: Can't init FLD proc, rc %d\n", fld->lcf_name, rc); @@ -525,9 +523,9 @@ struct proc_dir_entry *fld_type_proc_dir; static int __init fld_mod_init(void) { - fld_type_proc_dir = lprocfs_seq_register(LUSTRE_FLD_NAME, - proc_lustre_root, - NULL, NULL); + fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME, + proc_lustre_root, + NULL, NULL); if (IS_ERR(fld_type_proc_dir)) return PTR_ERR(fld_type_proc_dir); diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c index 3378956..ca329b8 100644 --- a/lustre/fld/lproc_fld.c +++ b/lustre/fld/lproc_fld.c @@ -136,7 +136,7 @@ LPROC_SEQ_FOPS_RO(fld_proc_targets); LPROC_SEQ_FOPS(fld_proc_hash); LPROC_SEQ_FOPS_WO_TYPE(fld, cache_flush); -struct lprocfs_seq_vars fld_client_proc_list[] = { +struct lprocfs_vars fld_client_proc_list[] = { { .name = "targets", .fops = &fld_proc_targets_fops }, { .name = "hash", @@ -359,7 +359,7 @@ const struct file_operations fld_proc_seq_fops = { .release = fldb_seq_release, }; -struct lprocfs_seq_vars fld_server_proc_list[] = { +struct lprocfs_vars fld_server_proc_list[] = { { NULL } }; diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 42eec31..b9d5dec 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -49,7 +49,7 @@ #include -struct lprocfs_seq_vars { +struct lprocfs_vars { const char *name; const struct file_operations *fops; void *data; @@ -607,13 +607,11 @@ extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats); /* lprocfs_status.c */ -extern int lprocfs_seq_add_vars(struct proc_dir_entry *root, - struct lprocfs_seq_vars *var, - void *data); - +extern int lprocfs_add_vars(struct proc_dir_entry *root, + struct lprocfs_vars *var, void *data); extern struct proc_dir_entry * -lprocfs_seq_register(const char *name, struct proc_dir_entry *parent, - struct lprocfs_seq_vars *list, void *data); +lprocfs_register(const char *name, struct proc_dir_entry *parent, + struct lprocfs_vars *list, void *data); extern void lprocfs_remove(struct proc_dir_entry **root); extern void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent); @@ -676,8 +674,8 @@ extern int lprocfs_connect_flags_seq_show(struct seq_file *m, void *data); extern int lprocfs_num_exports_seq_show(struct seq_file *m, void *data); #endif struct adaptive_timeout; -extern int lprocfs_seq_at_hist_helper(struct seq_file *m, - struct adaptive_timeout *at); +extern int lprocfs_at_hist_helper(struct seq_file *m, + struct adaptive_timeout *at); extern int lprocfs_timeouts_seq_show(struct seq_file *m, void *data); extern ssize_t lprocfs_timeouts_seq_write(struct file *file, const char *buffer, @@ -1002,13 +1000,12 @@ static inline struct proc_dir_entry * lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent, const char *format, ...) {return NULL; } -static inline int lprocfs_seq_add_vars(struct proc_dir_entry *root, - struct lprocfs_seq_vars *var, - void *data) +static inline int lprocfs_add_vars(struct proc_dir_entry *root, + struct lprocfs_vars *var, void *data) { return 0; } static inline struct proc_dir_entry * -lprocfs_seq_register(const char *name, struct proc_dir_entry *parent, - struct lprocfs_seq_vars *list, void *data) +lprocfs_register(const char *name, struct proc_dir_entry *parent, + struct lprocfs_vars *list, void *data) { return NULL; } static inline void lprocfs_remove(struct proc_dir_entry **root) { return; } @@ -1038,8 +1035,8 @@ static inline int lprocfs_num_exports_seq_show(struct seq_file *m, void *data) { return 0; } #endif struct adaptive_timeout; -static inline int lprocfs_seq_at_hist_helper(struct seq_file *m, - struct adaptive_timeout *at) +static inline int lprocfs_at_hist_helper(struct seq_file *m, + struct adaptive_timeout *at) { return 0; } static inline int lprocfs_timeouts_seq_show(struct seq_file *m, void *data) { return 0; } diff --git a/lustre/include/obd.h b/lustre/include/obd.h index e8e23d4..761dc19 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -680,7 +680,7 @@ struct obd_device { struct proc_dir_entry *obd_proc_exports_entry; struct proc_dir_entry *obd_svc_procroot; struct lprocfs_stats *obd_svc_stats; - struct lprocfs_seq_vars *obd_vars; + struct lprocfs_vars *obd_vars; atomic_t obd_evict_inprogress; wait_queue_head_t obd_evict_inprogress_waitq; struct list_head obd_evict_list; /* protected with pet_lock */ diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 79f9ece..d9428b7 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -75,7 +75,7 @@ struct lu_device_type; /* genops.c */ 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 lprocfs_vars *module_vars, const char *nm, struct lu_device_type *ldt); int class_unregister_type(const char *nm); @@ -126,7 +126,7 @@ typedef int (*llog_cb_t)(const struct lu_env *, struct llog_handle *, struct lustre_cfg *lustre_cfg_rename(struct lustre_cfg *cfg, const char *new_name); int class_process_config(struct lustre_cfg *lcfg); -int class_process_proc_param(char *prefix, struct lprocfs_seq_vars *lvars, +int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, struct lustre_cfg *lcfg, void *data); int class_attach(struct lustre_cfg *lcfg); int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg); diff --git a/lustre/ldlm/ldlm_internal.h b/lustre/ldlm/ldlm_internal.h index 90da1ff..51681d7 100644 --- a/lustre/ldlm/ldlm_internal.h +++ b/lustre/ldlm/ldlm_internal.h @@ -292,13 +292,13 @@ typedef enum ldlm_policy_res ldlm_policy_res_t; struct __##var##__dummy_write {;} /* semicolon catcher */ static inline void -ldlm_add_var(struct lprocfs_seq_vars *vars, struct proc_dir_entry *proc_dir, +ldlm_add_var(struct lprocfs_vars *vars, struct proc_dir_entry *proc_dir, const char *name, void *data, const struct file_operations *ops) { snprintf((char *)vars->name, MAX_STRING_SIZE, "%s", name); vars->data = data; vars->fops = ops; - lprocfs_seq_add_vars(proc_dir, vars, NULL); + lprocfs_add_vars(proc_dir, vars, NULL); } static inline int is_granted_or_cancelled(struct ldlm_lock *lock) diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c index 4242188..94f6d7b 100644 --- a/lustre/ldlm/ldlm_pool.c +++ b/lustre/ldlm/ldlm_pool.c @@ -742,7 +742,7 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl) { struct ldlm_namespace *ns = ldlm_pl2ns(pl); struct proc_dir_entry *parent_ns_proc; - struct lprocfs_seq_vars pool_vars[2]; + struct lprocfs_vars pool_vars[2]; char *var_name = NULL; int rc = 0; ENTRY; @@ -757,8 +757,8 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl) ldlm_ns_name(ns)); GOTO(out_free_name, rc = -EINVAL); } - pl->pl_proc_dir = lprocfs_seq_register("pool", parent_ns_proc, - NULL, NULL); + pl->pl_proc_dir = lprocfs_register("pool", parent_ns_proc, + NULL, NULL); if (IS_ERR(pl->pl_proc_dir)) { rc = PTR_ERR(pl->pl_proc_dir); pl->pl_proc_dir = NULL; diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index b86abc4..e4cdfef 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -86,7 +86,7 @@ LPROC_SEQ_FOPS_RO_TYPE(ldlm, uint); int ldlm_proc_setup(void) { int rc; - struct lprocfs_seq_vars list[] = { + struct lprocfs_vars list[] = { { .name = "dump_namespaces", .fops = &ldlm_dump_ns_fops, .proc_mode = 0222 }, @@ -100,34 +100,34 @@ int ldlm_proc_setup(void) ENTRY; LASSERT(ldlm_ns_proc_dir == NULL); - ldlm_type_proc_dir = lprocfs_seq_register(OBD_LDLM_DEVICENAME, - proc_lustre_root, - NULL, NULL); + ldlm_type_proc_dir = lprocfs_register(OBD_LDLM_DEVICENAME, + proc_lustre_root, + NULL, NULL); if (IS_ERR(ldlm_type_proc_dir)) { CERROR("LProcFS failed in ldlm-init\n"); rc = PTR_ERR(ldlm_type_proc_dir); GOTO(err, rc); } - ldlm_ns_proc_dir = lprocfs_seq_register("namespaces", - ldlm_type_proc_dir, - NULL, NULL); + ldlm_ns_proc_dir = lprocfs_register("namespaces", + ldlm_type_proc_dir, + NULL, NULL); if (IS_ERR(ldlm_ns_proc_dir)) { CERROR("LProcFS failed in ldlm-init\n"); rc = PTR_ERR(ldlm_ns_proc_dir); GOTO(err_type, rc); } - ldlm_svc_proc_dir = lprocfs_seq_register("services", - ldlm_type_proc_dir, - NULL, NULL); + ldlm_svc_proc_dir = lprocfs_register("services", + ldlm_type_proc_dir, + NULL, NULL); if (IS_ERR(ldlm_svc_proc_dir)) { CERROR("LProcFS failed in ldlm-init\n"); rc = PTR_ERR(ldlm_svc_proc_dir); GOTO(err_ns, rc); } - rc = lprocfs_seq_add_vars(ldlm_type_proc_dir, list, NULL); + rc = lprocfs_add_vars(ldlm_type_proc_dir, list, NULL); if (rc != 0) { CERROR("LProcFS failed in ldlm-init\n"); GOTO(err_svc, rc); @@ -324,7 +324,7 @@ static void ldlm_namespace_proc_unregister(struct ldlm_namespace *ns) static int ldlm_namespace_proc_register(struct ldlm_namespace *ns) { - struct lprocfs_seq_vars lock_vars[2]; + struct lprocfs_vars lock_vars[2]; char lock_name[MAX_STRING_SIZE + 1]; struct proc_dir_entry *ns_pde; diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 5961ed0..6f7326b 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -701,7 +701,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, struct super_block *sb, char *osc, char *mdc); void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi); void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count); -extern struct lprocfs_seq_vars lprocfs_llite_obd_vars[]; +extern struct lprocfs_vars lprocfs_llite_obd_vars[]; #else static inline int lprocfs_register_mountpoint(struct proc_dir_entry *parent, struct super_block *sb, char *osc, char *mdc){return 0;} diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index f77393d..8a3a1ff 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -959,7 +959,7 @@ static ssize_t ll_nosquash_nids_seq_write(struct file *file, } LPROC_SEQ_FOPS(ll_nosquash_nids); -struct lprocfs_seq_vars lprocfs_llite_obd_vars[] = { +struct lprocfs_vars lprocfs_llite_obd_vars[] = { { .name = "uuid", .fops = &ll_sb_uuid_fops }, { .name = "fstype", @@ -1122,7 +1122,7 @@ LPROC_SEQ_FOPS_RO_TYPE(llite, uuid); int lprocfs_register_mountpoint(struct proc_dir_entry *parent, struct super_block *sb, char *osc, char *mdc) { - struct lprocfs_seq_vars lvars[2]; + struct lprocfs_vars lvars[2]; struct lustre_sb_info *lsi = s2lsi(sb); struct ll_sb_info *sbi = ll_s2sbi(sb); struct obd_device *obd; @@ -1150,7 +1150,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len, lsi->lsi_lmd->lmd_profile, sb); - sbi->ll_proc_root = lprocfs_seq_register(name, parent, NULL, NULL); + sbi->ll_proc_root = lprocfs_register(name, parent, NULL, NULL); if (IS_ERR(sbi->ll_proc_root)) { err = PTR_ERR(sbi->ll_proc_root); sbi->ll_proc_root = NULL; @@ -1215,7 +1215,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, GOTO(out, err); - err = lprocfs_seq_add_vars(sbi->ll_proc_root, lprocfs_llite_obd_vars, sb); + err = lprocfs_add_vars(sbi->ll_proc_root, lprocfs_llite_obd_vars, sb); if (err) GOTO(out, err); @@ -1232,13 +1232,13 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, snprintf(name, MAX_STRING_SIZE, "common_name"); lvars[0].fops = &llite_name_fops; - err = lprocfs_seq_add_vars(dir, lvars, obd); + err = lprocfs_add_vars(dir, lvars, obd); if (err) GOTO(out, err); snprintf(name, MAX_STRING_SIZE, "uuid"); lvars[0].fops = &llite_uuid_fops; - err = lprocfs_seq_add_vars(dir, lvars, obd); + err = lprocfs_add_vars(dir, lvars, obd); if (err) GOTO(out, err); @@ -1255,13 +1255,13 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, snprintf(name, MAX_STRING_SIZE, "common_name"); lvars[0].fops = &llite_name_fops; - err = lprocfs_seq_add_vars(dir, lvars, obd); + err = lprocfs_add_vars(dir, lvars, obd); if (err) GOTO(out, err); snprintf(name, MAX_STRING_SIZE, "uuid"); lvars[0].fops = &llite_uuid_fops; - err = lprocfs_seq_add_vars(dir, lvars, obd); + err = lprocfs_add_vars(dir, lvars, obd); out: if (err) { lprocfs_remove(&sbi->ll_proc_root); diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index fdf955c..fb08e11 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -141,7 +141,7 @@ static int __init init_lustre_lite(void) if (ll_rmtperm_hash_cachep == NULL) GOTO(out_cache, rc = -ENOMEM); - entry = lprocfs_seq_register("llite", proc_lustre_root, NULL, NULL); + entry = lprocfs_register("llite", proc_lustre_root, NULL, NULL); if (IS_ERR(entry)) { rc = PTR_ERR(entry); CERROR("cannot register '/proc/fs/lustre/llite': rc = %d\n", diff --git a/lustre/lmv/lmv_internal.h b/lustre/lmv/lmv_internal.h index b3faa6d..40b81d1 100644 --- a/lustre/lmv/lmv_internal.h +++ b/lustre/lmv/lmv_internal.h @@ -163,7 +163,7 @@ struct lmv_tgt_desc struct lu_fid *fid); /* lproc_lmv.c */ #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_lmv_obd_vars[]; +extern struct lprocfs_vars lprocfs_lmv_obd_vars[]; #endif extern struct file_operations lmv_proc_target_fops; diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 00f8de4..582b7d0 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -234,9 +234,9 @@ static int lmv_connect(const struct lu_env *env, lmv->conn_data = *data; if (lmv->targets_proc_entry == NULL) { - lmv->targets_proc_entry = lprocfs_seq_register("target_obds", - obd->obd_proc_entry, - NULL, NULL); + lmv->targets_proc_entry = lprocfs_register("target_obds", + obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(lmv->targets_proc_entry)) { CERROR("%s: cannot register " "/proc/fs/lustre/%s/%s/target_obds\n", diff --git a/lustre/lmv/lproc_lmv.c b/lustre/lmv/lproc_lmv.c index 5576798..1f8b5a6 100644 --- a/lustre/lmv/lproc_lmv.c +++ b/lustre/lmv/lproc_lmv.c @@ -205,7 +205,7 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file) LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid); -struct lprocfs_seq_vars lprocfs_lmv_obd_vars[] = { +struct lprocfs_vars lprocfs_lmv_obd_vars[] = { { .name = "numobd", .fops = &lmv_numobd_fops }, { .name = "placement", diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index 3cb71719..8606df9 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -1195,8 +1195,8 @@ static int __init lod_mod_init(void) return rc; type = class_search_type(LUSTRE_LOD_NAME); - type->typ_procsym = lprocfs_seq_register("lov", proc_lustre_root, - NULL, NULL); + type->typ_procsym = lprocfs_register("lov", proc_lustre_root, + NULL, NULL); if (IS_ERR(type->typ_procsym)) { CERROR("lod: can't create compat entry \"lov\": %d\n", (int)PTR_ERR(type->typ_procsym)); diff --git a/lustre/lod/lproc_lod.c b/lustre/lod/lproc_lod.c index c30dc11..f9f84c0 100644 --- a/lustre/lod/lproc_lod.c +++ b/lustre/lod/lproc_lod.c @@ -708,7 +708,7 @@ lod_lmv_failout_seq_write(struct file *file, const char *buffer, } LPROC_SEQ_FOPS(lod_lmv_failout); -static struct lprocfs_seq_vars lprocfs_lod_obd_vars[] = { +static struct lprocfs_vars lprocfs_lod_obd_vars[] = { { .name = "uuid", .fops = &lod_uuid_fops }, { .name = "stripesize", @@ -736,7 +736,7 @@ static struct lprocfs_seq_vars lprocfs_lod_obd_vars[] = { { NULL } }; -static struct lprocfs_seq_vars lprocfs_lod_osd_vars[] = { +static struct lprocfs_vars lprocfs_lod_osd_vars[] = { { "blocksize", &lod_dt_blksize_fops }, { "kbytestotal", &lod_dt_kbytestotal_fops }, { "kbytesfree", &lod_dt_kbytesfree_fops }, @@ -777,8 +777,8 @@ int lod_procfs_init(struct lod_device *lod) RETURN(rc); } - rc = lprocfs_seq_add_vars(obd->obd_proc_entry, lprocfs_lod_osd_vars, - &lod->lod_dt_dev); + rc = lprocfs_add_vars(obd->obd_proc_entry, lprocfs_lod_osd_vars, + &lod->lod_dt_dev); if (rc) { CERROR("%s: cannot setup procfs entry: %d\n", obd->obd_name, rc); @@ -793,9 +793,9 @@ int lod_procfs_init(struct lod_device *lod) GOTO(out, rc); } - lod->lod_pool_proc_entry = lprocfs_seq_register("pools", - obd->obd_proc_entry, - NULL, NULL); + lod->lod_pool_proc_entry = lprocfs_register("pools", + obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(lod->lod_pool_proc_entry)) { rc = PTR_ERR(lod->lod_pool_proc_entry); lod->lod_pool_proc_entry = NULL; diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index d4681af..247f74a 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -212,7 +212,7 @@ void dump_lsm(unsigned int level, const struct lov_stripe_md *lsm); /* lproc_lov.c */ extern struct file_operations lov_proc_target_fops; #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_lov_obd_vars[]; +extern struct lprocfs_vars lprocfs_lov_obd_vars[]; #endif /* lov_cl.c */ diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index f49d5ce..1161be3 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -237,9 +237,9 @@ static int lov_connect(const struct lu_env *env, if (data) lov->lov_ocd = *data; - lov->targets_proc_entry = lprocfs_seq_register("target_obds", - obd->obd_proc_entry, - NULL, NULL); + lov->targets_proc_entry = lprocfs_register("target_obds", + obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(lov->targets_proc_entry)) { CERROR("%s: cannot register " "/proc/fs/lustre/%s/%s/target_obds\n", @@ -847,9 +847,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) * Instead we use type->typ_procsym as the parent. */ type = class_search_type(LUSTRE_LOD_NAME); if (type != NULL && type->typ_procsym != NULL) { - obd->obd_proc_entry = lprocfs_seq_register(obd->obd_name, - type->typ_procsym, - obd->obd_vars, obd); + obd->obd_proc_entry = lprocfs_register(obd->obd_name, + type->typ_procsym, + obd->obd_vars, obd); if (IS_ERR(obd->obd_proc_entry)) { rc = PTR_ERR(obd->obd_proc_entry); CERROR("error %d setting up lprocfs for %s\n", rc, @@ -866,9 +866,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) if (rc) CWARN("Error adding the target_obd file\n"); - lov->lov_pool_proc_entry = lprocfs_seq_register("pools", - obd->obd_proc_entry, - NULL, NULL); + lov->lov_pool_proc_entry = lprocfs_register("pools", + obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(lov->lov_pool_proc_entry)) { rc = PTR_ERR(lov->lov_pool_proc_entry); CERROR("error %d setting up lprocfs for pools\n", rc); diff --git a/lustre/lov/lproc_lov.c b/lustre/lov/lproc_lov.c index 5fe5bff..80d1a29 100644 --- a/lustre/lov/lproc_lov.c +++ b/lustre/lov/lproc_lov.c @@ -269,7 +269,7 @@ LPROC_SEQ_FOPS_RO_TYPE(lov, kbytestotal); LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesfree); LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail); -struct lprocfs_seq_vars lprocfs_lov_obd_vars[] = { +struct lprocfs_vars lprocfs_lov_obd_vars[] = { { .name = "uuid", .fops = &lov_uuid_fops }, { .name = "stripesize", diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c index faaf490..10eaf93 100644 --- a/lustre/mdc/lproc_mdc.c +++ b/lustre/mdc/lproc_mdc.c @@ -100,7 +100,7 @@ LPROC_SEQ_FOPS_RO(mdc_obd_max_pages_per_rpc); LPROC_SEQ_FOPS_RW_TYPE(mdc, import); LPROC_SEQ_FOPS_RW_TYPE(mdc, pinger_recov); -struct lprocfs_seq_vars lprocfs_mdc_obd_vars[] = { +struct lprocfs_vars lprocfs_mdc_obd_vars[] = { { .name = "uuid", .fops = &mdc_uuid_fops }, { .name = "ping", diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index e1691a0..b8823b6 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -40,7 +40,7 @@ #include #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_mdc_obd_vars[]; +extern struct lprocfs_vars lprocfs_mdc_obd_vars[]; #endif void mdc_pack_body(struct ptlrpc_request *req, const struct lu_fid *fid, diff --git a/lustre/mdd/mdd_lproc.c b/lustre/mdd/mdd_lproc.c index b7241f4..d9174ac 100644 --- a/lustre/mdd/mdd_lproc.c +++ b/lustre/mdd/mdd_lproc.c @@ -276,7 +276,7 @@ static int mdd_lfsck_layout_seq_show(struct seq_file *m, void *data) } LPROC_SEQ_FOPS_RO(mdd_lfsck_layout); -static struct lprocfs_seq_vars lprocfs_mdd_obd_vars[] = { +static struct lprocfs_vars lprocfs_mdd_obd_vars[] = { { .name = "atime_diff", .fops = &mdd_atime_diff_fops }, { .name = "changelog_mask", @@ -313,8 +313,8 @@ int mdd_procfs_init(struct mdd_device *mdd, const char *name) /* Find the type procroot and add the proc entry for this device */ obd->obd_vars = lprocfs_mdd_obd_vars; - mdd->mdd_proc_entry = lprocfs_seq_register(name, type->typ_procroot, - obd->obd_vars, mdd); + mdd->mdd_proc_entry = lprocfs_register(name, type->typ_procroot, + obd->obd_vars, mdd); if (IS_ERR(mdd->mdd_proc_entry)) { rc = PTR_ERR(mdd->mdd_proc_entry); CERROR("Error %d setting up lprocfs for %s\n", diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c index 2a6bb0e..e4f8ec1 100644 --- a/lustre/mdt/mdt_coordinator.c +++ b/lustre/mdt/mdt_coordinator.c @@ -46,7 +46,7 @@ #include #include "mdt_internal.h" -static struct lprocfs_seq_vars lprocfs_mdt_hsm_vars[]; +static struct lprocfs_vars lprocfs_mdt_hsm_vars[]; /** * get obj and HSM attributes on a fid @@ -401,7 +401,7 @@ int hsm_cdt_procfs_init(struct mdt_device *mdt) ENTRY; /* init /proc entries, failure is not critical */ - cdt->cdt_proc_dir = lprocfs_seq_register("hsm", + cdt->cdt_proc_dir = lprocfs_register("hsm", mdt2obd_dev(mdt)->obd_proc_entry, lprocfs_mdt_hsm_vars, mdt); if (IS_ERR(cdt->cdt_proc_dir)) { @@ -433,7 +433,7 @@ void hsm_cdt_procfs_fini(struct mdt_device *mdt) * \param none * \retval var vector */ -struct lprocfs_seq_vars *hsm_cdt_get_proc_vars(void) +struct lprocfs_vars *hsm_cdt_get_proc_vars(void) { return lprocfs_mdt_hsm_vars; } @@ -2213,7 +2213,7 @@ LPROC_SEQ_FOPS(mdt_hsm_user_request_mask); LPROC_SEQ_FOPS(mdt_hsm_group_request_mask); LPROC_SEQ_FOPS(mdt_hsm_other_request_mask); -static struct lprocfs_seq_vars lprocfs_mdt_hsm_vars[] = { +static struct lprocfs_vars lprocfs_mdt_hsm_vars[] = { { .name = "agents", .fops = &mdt_hsm_agent_fops }, { .name = "actions", diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index 78b09bf..16a390d 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -925,7 +925,7 @@ ssize_t mdt_hsm_cdt_control_seq_write(struct file *file, const char *buffer, int mdt_hsm_cdt_control_seq_show(struct seq_file *m, void *data); int hsm_cdt_procfs_init(struct mdt_device *mdt); void hsm_cdt_procfs_fini(struct mdt_device *mdt); -struct lprocfs_seq_vars *hsm_cdt_get_proc_vars(void); +struct lprocfs_vars *hsm_cdt_get_proc_vars(void); /* md_hsm helpers */ struct mdt_object *mdt_hsm_get_md_hsm(struct mdt_thread_info *mti, const struct lu_fid *fid, diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index e922179..4844c7f 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -825,7 +825,7 @@ LPROC_SEQ_FOPS_RW_TYPE(mdt, ir_factor); LPROC_SEQ_FOPS_RW_TYPE(mdt, nid_stats_clear); LPROC_SEQ_FOPS(mdt_hsm_cdt_control); -static struct lprocfs_seq_vars lprocfs_mdt_obd_vars[] = { +static struct lprocfs_vars lprocfs_mdt_obd_vars[] = { { .name = "uuid", .fops = &mdt_uuid_fops }, { .name = "recovery_status", diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index d0b0b29..2f68264 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -466,7 +466,7 @@ static struct lu_device *mds_device_free(const struct lu_env *env, LPROC_SEQ_FOPS_RO_TYPE(mds, uuid); -static struct lprocfs_seq_vars lprocfs_mds_obd_vars[] = { +static struct lprocfs_vars lprocfs_mds_obd_vars[] = { { "uuid", &mds_uuid_fops }, { NULL } }; diff --git a/lustre/mgc/lproc_mgc.c b/lustre/mgc/lproc_mgc.c index 55e8d80..5102ad6 100644 --- a/lustre/mgc/lproc_mgc.c +++ b/lustre/mgc/lproc_mgc.c @@ -58,7 +58,7 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v) } LPROC_SEQ_FOPS_RO(mgc_ir_state); -struct lprocfs_seq_vars lprocfs_mgc_obd_vars[] = { +struct lprocfs_vars lprocfs_mgc_obd_vars[] = { { .name = "uuid", .fops = &mgc_uuid_fops }, { .name = "ping", diff --git a/lustre/mgc/mgc_internal.h b/lustre/mgc/mgc_internal.h index 97ecd7d..d854636 100644 --- a/lustre/mgc/mgc_internal.h +++ b/lustre/mgc/mgc_internal.h @@ -45,7 +45,7 @@ #include #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_mgc_obd_vars[]; +extern struct lprocfs_vars lprocfs_mgc_obd_vars[]; int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data); #endif /* CONFIG_PROC_FS */ diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c index ed703c0..8ae52ea 100644 --- a/lustre/mgs/lproc_mgs.c +++ b/lustre/mgs/lproc_mgs.c @@ -207,7 +207,7 @@ LPROC_SEQ_FOPS_RO_TYPE(mgs, hash); LPROC_SEQ_FOPS_WO_TYPE(mgs, evict_client); LPROC_SEQ_FOPS_RW_TYPE(mgs, ir_timeout); -static struct lprocfs_seq_vars lprocfs_mgs_obd_vars[] = { +static struct lprocfs_vars lprocfs_mgs_obd_vars[] = { { .name = "uuid", .fops = &mgs_uuid_fops }, { .name = "num_exports", @@ -243,17 +243,17 @@ int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name) if (rc != 0) GOTO(out, rc); - mgs->mgs_proc_live = lprocfs_seq_register("live", obd->obd_proc_entry, - NULL, NULL); + mgs->mgs_proc_live = lprocfs_register("live", obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(mgs->mgs_proc_live)) { rc = PTR_ERR(mgs->mgs_proc_live); mgs->mgs_proc_live = NULL; GOTO(out, rc); } - obd->obd_proc_exports_entry = lprocfs_seq_register("exports", - obd->obd_proc_entry, - NULL, NULL); + obd->obd_proc_exports_entry = lprocfs_register("exports", + obd->obd_proc_entry, + NULL, NULL); if (IS_ERR(obd->obd_proc_exports_entry)) { rc = PTR_ERR(obd->obd_proc_exports_entry); obd->obd_proc_exports_entry = NULL; diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index a76b448..32875ba 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -159,7 +159,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 *vars, + bool enable_proc, struct lprocfs_vars *vars, const char *name, struct lu_device_type *ldt) { struct obd_type *type; @@ -197,9 +197,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, #ifdef CONFIG_PROC_FS if (enable_proc) { - type->typ_procroot = lprocfs_seq_register(type->typ_name, - proc_lustre_root, - vars, type); + type->typ_procroot = lprocfs_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/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index 15ec19c..1fe717f 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -313,7 +313,7 @@ LPROC_SEQ_FOPS(obd_proc_jobid_var); struct proc_dir_entry *proc_lustre_root = NULL; EXPORT_SYMBOL(proc_lustre_root); -static struct lprocfs_seq_vars lprocfs_base[] = { +static struct lprocfs_vars lprocfs_base[] = { { .name = "version", .fops = &obd_proc_version_fops }, { .name = "pinger", @@ -412,7 +412,7 @@ int class_procfs_init(void) obd_sysctl_init(); - entry = lprocfs_seq_register("fs/lustre", NULL, lprocfs_base, NULL); + entry = lprocfs_register("fs/lustre", NULL, lprocfs_base, NULL); if (IS_ERR(entry)) { rc = PTR_ERR(entry); CERROR("cannot create '/proc/fs/lustre': rc = %d\n", rc); diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 1afdffb..2f83b07 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -130,8 +130,8 @@ static const struct file_operations lprocfs_generic_fops = { }; * < 0 on error */ int -lprocfs_seq_add_vars(struct proc_dir_entry *root, struct lprocfs_seq_vars *list, - void *data) +lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list, + void *data) { if (root == NULL || list == NULL) return -EINVAL; @@ -157,7 +157,7 @@ lprocfs_seq_add_vars(struct proc_dir_entry *root, struct lprocfs_seq_vars *list, } return 0; } -EXPORT_SYMBOL(lprocfs_seq_add_vars); +EXPORT_SYMBOL(lprocfs_add_vars); #ifndef HAVE_REMOVE_PROC_SUBTREE /* for b=10866, global variable */ @@ -270,8 +270,8 @@ void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent) EXPORT_SYMBOL(lprocfs_remove_proc_entry); struct proc_dir_entry * -lprocfs_seq_register(const char *name, struct proc_dir_entry *parent, - struct lprocfs_seq_vars *list, void *data) +lprocfs_register(const char *name, struct proc_dir_entry *parent, + struct lprocfs_vars *list, void *data) { struct proc_dir_entry *newchild; @@ -280,7 +280,7 @@ lprocfs_seq_register(const char *name, struct proc_dir_entry *parent, return ERR_PTR(-ENOMEM); if (list != NULL) { - int rc = lprocfs_seq_add_vars(newchild, list, data); + int rc = lprocfs_add_vars(newchild, list, data); if (rc) { lprocfs_remove(&newchild); return ERR_PTR(rc); @@ -288,7 +288,7 @@ lprocfs_seq_register(const char *name, struct proc_dir_entry *parent, } return newchild; } -EXPORT_SYMBOL(lprocfs_seq_register); +EXPORT_SYMBOL(lprocfs_register); /* Generic callbacks */ int lprocfs_uint_seq_show(struct seq_file *m, void *data) @@ -909,7 +909,7 @@ int lprocfs_state_seq_show(struct seq_file *m, void *data) } EXPORT_SYMBOL(lprocfs_state_seq_show); -int lprocfs_seq_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at) +int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at) { int i; for (i = 0; i < AT_BINS; i++) @@ -917,7 +917,7 @@ int lprocfs_seq_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at) seq_printf(m, "\n"); return 0; } -EXPORT_SYMBOL(lprocfs_seq_at_hist_helper); +EXPORT_SYMBOL(lprocfs_at_hist_helper); /* See also ptlrpc_lprocfs_timeouts_show_seq */ int lprocfs_timeouts_seq_show(struct seq_file *m, void *data) @@ -946,7 +946,7 @@ int lprocfs_timeouts_seq_show(struct seq_file *m, void *data) s2dhms(&ts, now - worstt); seq_printf(m, "%-10s : cur %3u worst %3u (at %ld, "DHMS_FMT" ago) ", "network", cur, worst, worstt, DHMS_VARS(&ts)); - lprocfs_seq_at_hist_helper(m, &imp->imp_at.iat_net_latency); + lprocfs_at_hist_helper(m, &imp->imp_at.iat_net_latency); for(i = 0; i < IMP_AT_MAX_PORTALS; i++) { if (imp->imp_at.iat_portal[i] == 0) @@ -958,7 +958,7 @@ int lprocfs_timeouts_seq_show(struct seq_file *m, void *data) seq_printf(m, "portal %-2d : cur %3u worst %3u (at %ld, " DHMS_FMT" ago) ", imp->imp_at.iat_portal[i], cur, worst, worstt, DHMS_VARS(&ts)); - lprocfs_seq_at_hist_helper(m, &imp->imp_at.iat_service_estimate[i]); + lprocfs_at_hist_helper(m, &imp->imp_at.iat_service_estimate[i]); } LPROCFS_CLIMP_EXIT(obd); @@ -990,9 +990,9 @@ lprocfs_obd_setup(struct obd_device *obd) LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); LASSERT(obd->obd_type->typ_procroot != NULL); - obd->obd_proc_entry = lprocfs_seq_register(obd->obd_name, - obd->obd_type->typ_procroot, - obd->obd_vars, obd); + obd->obd_proc_entry = lprocfs_register(obd->obd_name, + obd->obd_type->typ_procroot, + obd->obd_vars, obd); if (IS_ERR(obd->obd_proc_entry)) { rc = PTR_ERR(obd->obd_proc_entry); CERROR("error %d setting up lprocfs for %s\n",rc,obd->obd_name); diff --git a/lustre/obdclass/lprocfs_status_server.c b/lustre/obdclass/lprocfs_status_server.c index b7215dd..00298d4 100644 --- a/lustre/obdclass/lprocfs_status_server.c +++ b/lustre/obdclass/lprocfs_status_server.c @@ -345,9 +345,9 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid) GOTO(destroy_new, rc = -ENOMEM); memcpy(buffer, libcfs_nid2str(*nid), LNET_NIDSTR_SIZE); - new_stat->nid_proc = lprocfs_seq_register(buffer, - obd->obd_proc_exports_entry, - NULL, NULL); + new_stat->nid_proc = lprocfs_register(buffer, + obd->obd_proc_exports_entry, + NULL, NULL); OBD_FREE(buffer, LNET_NIDSTR_SIZE); if (IS_ERR(new_stat->nid_proc)) { diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index a27ad4e..92d95eb 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -1259,10 +1259,10 @@ out: } EXPORT_SYMBOL(class_process_config); -int class_process_proc_param(char *prefix, struct lprocfs_seq_vars *lvars, +int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, struct lustre_cfg *lcfg, void *data) { - struct lprocfs_seq_vars *var; + struct lprocfs_vars *var; struct file fakefile; struct seq_file fake_seqfile; char *key, *sval; diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index af58063..5386975 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -558,7 +558,7 @@ commitrw_cleanup: } LPROC_SEQ_FOPS_RO_TYPE(echo, uuid); -static struct lprocfs_seq_vars lprocfs_echo_obd_vars[] = { +static struct lprocfs_vars lprocfs_echo_obd_vars[] = { { .name = "uuid", .fops = &echo_uuid_fops }, { NULL } diff --git a/lustre/ofd/lproc_ofd.c b/lustre/ofd/lproc_ofd.c index c6b7d26..72f5e453 100644 --- a/lustre/ofd/lproc_ofd.c +++ b/lustre/ofd/lproc_ofd.c @@ -983,7 +983,7 @@ LPROC_SEQ_FOPS_RO_TYPE(ofd, target_instance); LPROC_SEQ_FOPS_RW_TYPE(ofd, ir_factor); LPROC_SEQ_FOPS_RW_TYPE(ofd, job_interval); -struct lprocfs_seq_vars lprocfs_ofd_obd_vars[] = { +struct lprocfs_vars lprocfs_ofd_obd_vars[] = { { .name = "uuid", .fops = &ofd_uuid_fops }, { .name = "blocksize", diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 403a35f..874e991 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -695,8 +695,7 @@ static int ofd_procfs_init(struct ofd_device *ofd) obd->obd_uses_nid_stats = 1; - entry = lprocfs_seq_register("exports", obd->obd_proc_entry, NULL, - NULL); + entry = lprocfs_register("exports", obd->obd_proc_entry, NULL, NULL); if (IS_ERR(entry)) { rc = PTR_ERR(entry); CERROR("%s: error %d setting up lprocfs for %s\n", diff --git a/lustre/ofd/ofd_internal.h b/lustre/ofd/ofd_internal.h index e2a1f77..386b013 100644 --- a/lustre/ofd/ofd_internal.h +++ b/lustre/ofd/ofd_internal.h @@ -403,7 +403,7 @@ int ofd_txn_stop_cb(const struct lu_env *env, struct thandle *txn, /* lproc_ofd.c */ #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_ofd_obd_vars[]; +extern struct lprocfs_vars lprocfs_ofd_obd_vars[]; void ofd_stats_counter_init(struct lprocfs_stats *stats); #else static inline void ofd_stats_counter_init(struct lprocfs_stats *stats) {} diff --git a/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c index f346dfd..f452dc1 100644 --- a/lustre/osc/lproc_osc.c +++ b/lustre/osc/lproc_osc.c @@ -571,7 +571,7 @@ LPROC_SEQ_FOPS_WO_TYPE(osc, ping); LPROC_SEQ_FOPS_RW_TYPE(osc, import); LPROC_SEQ_FOPS_RW_TYPE(osc, pinger_recov); -struct lprocfs_seq_vars lprocfs_osc_obd_vars[] = { +struct lprocfs_vars lprocfs_osc_obd_vars[] = { { .name = "uuid", .fops = &osc_uuid_fops }, { .name = "ping", diff --git a/lustre/osc/osc_internal.h b/lustre/osc/osc_internal.h index dbec70d..c0d8d7c 100644 --- a/lustre/osc/osc_internal.h +++ b/lustre/osc/osc_internal.h @@ -145,7 +145,7 @@ int osc_cleanup(struct obd_device *obd); int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg); #ifdef CONFIG_PROC_FS -extern struct lprocfs_seq_vars lprocfs_osc_obd_vars[]; +extern struct lprocfs_vars lprocfs_osc_obd_vars[]; int lproc_osc_attach_seqstat(struct obd_device *dev); #else static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {return 0;} diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index d54856d..5bdc81e 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -2952,9 +2952,9 @@ int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) * tree to type->typ_procsym instead of obd->obd_type->typ_procroot. */ type = class_search_type(LUSTRE_OSP_NAME); if (type && type->typ_procsym) { - obd->obd_proc_entry = lprocfs_seq_register(obd->obd_name, - type->typ_procsym, - obd->obd_vars, obd); + obd->obd_proc_entry = lprocfs_register(obd->obd_name, + type->typ_procsym, + obd->obd_vars, obd); if (IS_ERR(obd->obd_proc_entry)) { rc = PTR_ERR(obd->obd_proc_entry); CERROR("error %d setting up lprocfs for %s\n", rc, diff --git a/lustre/osd-ldiskfs/osd_internal.h b/lustre/osd-ldiskfs/osd_internal.h index 2f30053..0831074 100644 --- a/lustre/osd-ldiskfs/osd_internal.h +++ b/lustre/osd-ldiskfs/osd_internal.h @@ -645,8 +645,8 @@ static inline int __osd_xattr_set(struct osd_thread_info *info, #ifdef CONFIG_PROC_FS /* osd_lproc.c */ -extern struct lprocfs_seq_vars lprocfs_osd_obd_vars[]; -extern struct lprocfs_seq_vars lprocfs_osd_module_vars[]; +extern struct lprocfs_vars lprocfs_osd_obd_vars[]; +extern struct lprocfs_vars lprocfs_osd_module_vars[]; int osd_procfs_init(struct osd_device *osd, const char *name); int osd_procfs_fini(struct osd_device *osd); void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf); diff --git a/lustre/osd-ldiskfs/osd_lproc.c b/lustre/osd-ldiskfs/osd_lproc.c index 6a2ebd7..2ec7529 100644 --- a/lustre/osd-ldiskfs/osd_lproc.c +++ b/lustre/osd-ldiskfs/osd_lproc.c @@ -590,7 +590,7 @@ LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytesavail); LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filestotal); LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filesfree); -struct lprocfs_seq_vars lprocfs_osd_obd_vars[] = { +struct lprocfs_vars lprocfs_osd_obd_vars[] = { { .name = "blocksize", .fops = &ldiskfs_dt_blksize_fops }, { .name = "kbytestotal", @@ -630,7 +630,7 @@ struct lprocfs_seq_vars lprocfs_osd_obd_vars[] = { { NULL } }; -struct lprocfs_seq_vars lprocfs_osd_module_vars[] = { +struct lprocfs_vars lprocfs_osd_module_vars[] = { { .name = "track_declares_assert", .fops = &ldiskfs_osd_track_declares_assert_fops }, { NULL } @@ -654,9 +654,9 @@ int osd_procfs_init(struct osd_device *osd, const char *name) LASSERT(type != NULL); /* Find the type procroot and add the proc entry for this device */ - osd->od_proc_entry = lprocfs_seq_register(name, type->typ_procroot, - lprocfs_osd_obd_vars, - &osd->od_dt_dev); + osd->od_proc_entry = lprocfs_register(name, type->typ_procroot, + lprocfs_osd_obd_vars, + &osd->od_dt_dev); if (IS_ERR(osd->od_proc_entry)) { rc = PTR_ERR(osd->od_proc_entry); CERROR("Error %d setting up lprocfs for %s\n", diff --git a/lustre/osd-zfs/osd_internal.h b/lustre/osd-zfs/osd_internal.h index 47f9a2e..3888c5b 100644 --- a/lustre/osd-zfs/osd_internal.h +++ b/lustre/osd-zfs/osd_internal.h @@ -428,7 +428,7 @@ enum { }; /* osd_lproc.c */ -extern struct lprocfs_seq_vars lprocfs_osd_obd_vars[]; +extern struct lprocfs_vars lprocfs_osd_obd_vars[]; int osd_procfs_init(struct osd_device *osd, const char *name); int osd_procfs_fini(struct osd_device *osd); diff --git a/lustre/osd-zfs/osd_lproc.c b/lustre/osd-zfs/osd_lproc.c index ea893e3..c4fb103 100644 --- a/lustre/osd-zfs/osd_lproc.c +++ b/lustre/osd-zfs/osd_lproc.c @@ -281,7 +281,7 @@ LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_kbytesavail); LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_filestotal); LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_filesfree); -struct lprocfs_seq_vars lprocfs_osd_obd_vars[] = { +struct lprocfs_vars lprocfs_osd_obd_vars[] = { { .name = "blocksize", .fops = &zfs_dt_blksize_fops }, { .name = "kbytestotal", @@ -321,8 +321,9 @@ int osd_procfs_init(struct osd_device *osd, const char *name) LASSERT(name != NULL); LASSERT(type != NULL); - osd->od_proc_entry = lprocfs_seq_register(name, type->typ_procroot, - lprocfs_osd_obd_vars, &osd->od_dt_dev); + osd->od_proc_entry = lprocfs_register(name, type->typ_procroot, + lprocfs_osd_obd_vars, + &osd->od_dt_dev); if (IS_ERR(osd->od_proc_entry)) { rc = PTR_ERR(osd->od_proc_entry); CERROR("Error %d setting up lprocfs for %s\n", rc, name); diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c index 5a8a3b6..200f61c 100644 --- a/lustre/osp/lproc_osp.c +++ b/lustre/osp/lproc_osp.c @@ -717,7 +717,7 @@ LPROC_SEQ_FOPS_RO_TYPE(osp, timeouts); LPROC_SEQ_FOPS_RW_TYPE(osp, import); LPROC_SEQ_FOPS_RO_TYPE(osp, state); -static struct lprocfs_seq_vars lprocfs_osp_obd_vars[] = { +static struct lprocfs_vars lprocfs_osp_obd_vars[] = { { .name = "uuid", .fops = &osp_uuid_fops }, { .name = "ping", @@ -783,7 +783,7 @@ LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytesavail); LPROC_SEQ_FOPS_RO_TYPE(osp, dt_filestotal); LPROC_SEQ_FOPS_RO_TYPE(osp, dt_filesfree); -static struct lprocfs_seq_vars lprocfs_osp_osd_vars[] = { +static struct lprocfs_vars lprocfs_osp_osd_vars[] = { { .name = "blocksize", .fops = &osp_dt_blksize_fops }, { .name = "kbytestotal", @@ -815,8 +815,8 @@ void osp_lprocfs_init(struct osp_device *osp) if (lprocfs_obd_setup(obd) != 0) return; - rc = lprocfs_seq_add_vars(obd->obd_proc_entry, lprocfs_osp_osd_vars, - &osp->opd_dt_dev); + rc = lprocfs_add_vars(obd->obd_proc_entry, lprocfs_osp_osd_vars, + &osp->opd_dt_dev); if (rc) { CERROR("%s: can't register in lprocfs, rc %d\n", obd->obd_name, rc); diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index 6711575..249afbb 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -1780,8 +1780,8 @@ static int __init osp_mod_init(void) return rc; type = class_search_type(LUSTRE_OSP_NAME); - type->typ_procsym = lprocfs_seq_register("osc", proc_lustre_root, - NULL, NULL); + type->typ_procsym = lprocfs_register("osc", proc_lustre_root, + NULL, NULL); if (IS_ERR(type->typ_procsym)) { CERROR("osp: can't create compat entry \"osc\": %d\n", (int) PTR_ERR(type->typ_procsym)); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index f635de2..99f86b4 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -74,7 +74,7 @@ static struct cfs_cpt_table *ost_io_cptable; #ifdef CONFIG_PROC_FS LPROC_SEQ_FOPS_RO_TYPE(ost, uuid); -static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = { +static struct lprocfs_vars lprocfs_ost_obd_vars[] = { { .name = "uuid", .fops = &ost_uuid_fops }, { NULL } diff --git a/lustre/ptlrpc/gss/lproc_gss.c b/lustre/ptlrpc/gss/lproc_gss.c index 06d7cf7..180f11d 100644 --- a/lustre/ptlrpc/gss/lproc_gss.c +++ b/lustre/ptlrpc/gss/lproc_gss.c @@ -136,7 +136,7 @@ static const struct file_operations gss_proc_secinit = { .write = gss_proc_write_secinit, }; -static struct lprocfs_seq_vars gss_lprocfs_vars[] = { +static struct lprocfs_vars gss_lprocfs_vars[] = { { .name = "replays", .fops = &gss_proc_oos_fops }, { .name = "init_channel", @@ -175,7 +175,7 @@ gss_lk_proc_dl_seq_write(struct file *file, const char *buffer, } LPROC_SEQ_FOPS(gss_lk_proc_dl); -static struct lprocfs_seq_vars gss_lk_lprocfs_vars[] = { +static struct lprocfs_vars gss_lk_lprocfs_vars[] = { { .name = "debug_level", .fops = &gss_lk_proc_dl_fops }, { NULL } @@ -200,16 +200,16 @@ int gss_init_lproc(void) spin_lock_init(&gss_stat_oos.oos_lock); - gss_proc_root = lprocfs_seq_register("gss", sptlrpc_proc_root, - gss_lprocfs_vars, NULL); + gss_proc_root = lprocfs_register("gss", sptlrpc_proc_root, + gss_lprocfs_vars, NULL); if (IS_ERR(gss_proc_root)) { rc = PTR_ERR(gss_proc_root); gss_proc_root = NULL; GOTO(out, rc); } - gss_proc_lk = lprocfs_seq_register("lgss_keyring", gss_proc_root, - gss_lk_lprocfs_vars, NULL); + gss_proc_lk = lprocfs_register("lgss_keyring", gss_proc_root, + gss_lk_lprocfs_vars, NULL); if (IS_ERR(gss_proc_lk)) { rc = PTR_ERR(gss_proc_lk); gss_proc_lk = NULL; diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index 75b27a6..6764351 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -203,7 +203,7 @@ static void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir, return; if (dir) { - svc_procroot = lprocfs_seq_register(dir, root, NULL, NULL); + svc_procroot = lprocfs_register(dir, root, NULL, NULL); if (IS_ERR(svc_procroot)) { lprocfs_free_stats(&svc_stats); return; @@ -1020,7 +1020,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n) DHMS_FMT" ago) ", "service", cur, worst, worstt, DHMS_VARS(&ts)); - lprocfs_seq_at_hist_helper(m, &svcpt->scp_at_estimate); + lprocfs_at_hist_helper(m, &svcpt->scp_at_estimate); } return 0; @@ -1060,7 +1060,7 @@ LPROC_SEQ_FOPS(ptlrpc_lprocfs_hp_ratio); void ptlrpc_lprocfs_register_service(struct proc_dir_entry *entry, struct ptlrpc_service *svc) { - struct lprocfs_seq_vars lproc_vars[] = { + struct lprocfs_vars lproc_vars[] = { { .name = "high_priority_ratio", .fops = &ptlrpc_lprocfs_hp_ratio_fops, .data = svc }, @@ -1103,7 +1103,7 @@ void ptlrpc_lprocfs_register_service(struct proc_dir_entry *entry, if (svc->srv_procroot == NULL) return; - lprocfs_seq_add_vars(svc->srv_procroot, lproc_vars, NULL); + lprocfs_add_vars(svc->srv_procroot, lproc_vars, NULL); rc = lprocfs_seq_create(svc->srv_procroot, "req_history", 0400, &req_history_fops, svc); diff --git a/lustre/ptlrpc/nodemap_lproc.c b/lustre/ptlrpc/nodemap_lproc.c index 15d235f..9f3b742 100644 --- a/lustre/ptlrpc/nodemap_lproc.c +++ b/lustre/ptlrpc/nodemap_lproc.c @@ -882,7 +882,7 @@ out: LPROC_SEQ_FOPS_WO_TYPE(nodemap, del_nodemap_idmap); #endif /* NODEMAP_PROC_DEBUG */ -static struct lprocfs_seq_vars lprocfs_nm_module_vars[] = { +static struct lprocfs_vars lprocfs_nm_module_vars[] = { { .name = "active", .fops = &nodemap_active_fops, @@ -951,7 +951,7 @@ const struct file_operations nodemap_exports_fops = { .release = single_release }; -static struct lprocfs_seq_vars lprocfs_nodemap_vars[] = { +static struct lprocfs_vars lprocfs_nodemap_vars[] = { { .name = "id", .fops = &nodemap_id_fops, @@ -989,7 +989,7 @@ static struct lprocfs_seq_vars lprocfs_nodemap_vars[] = { } }; -static struct lprocfs_seq_vars lprocfs_default_nodemap_vars[] = { +static struct lprocfs_vars lprocfs_default_nodemap_vars[] = { { .name = "id", .fops = &nodemap_id_fops, @@ -1028,18 +1028,16 @@ int nodemap_procfs_init(void) { int rc = 0; - proc_lustre_nodemap_root = lprocfs_seq_register(LUSTRE_NODEMAP_NAME, - proc_lustre_root, - lprocfs_nm_module_vars, - NULL); - + proc_lustre_nodemap_root = lprocfs_register(LUSTRE_NODEMAP_NAME, + proc_lustre_root, + lprocfs_nm_module_vars, + NULL); if (IS_ERR(proc_lustre_nodemap_root)) { rc = PTR_ERR(proc_lustre_nodemap_root); CERROR("cannot create 'nodemap' directory: rc = %d\n", rc); proc_lustre_nodemap_root = NULL; } - return rc; } @@ -1059,16 +1057,14 @@ int lprocfs_nodemap_register(const char *name, if (is_default) nodemap_proc_entry = - lprocfs_seq_register(name, - proc_lustre_nodemap_root, - lprocfs_default_nodemap_vars, - nodemap); + lprocfs_register(name, proc_lustre_nodemap_root, + lprocfs_default_nodemap_vars, + nodemap); else nodemap_proc_entry = - lprocfs_seq_register(name, - proc_lustre_nodemap_root, - lprocfs_nodemap_vars, - nodemap); + lprocfs_register(name, proc_lustre_nodemap_root, + lprocfs_nodemap_vars, + nodemap); if (IS_ERR(nodemap_proc_entry)) { rc = PTR_ERR(nodemap_proc_entry); diff --git a/lustre/ptlrpc/nrs_crr.c b/lustre/ptlrpc/nrs_crr.c index f5bd032..fa36c5a 100644 --- a/lustre/ptlrpc/nrs_crr.c +++ b/lustre/ptlrpc/nrs_crr.c @@ -819,7 +819,7 @@ LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs_crrn_quantum); */ static int nrs_crrn_lprocfs_init(struct ptlrpc_service *svc) { - struct lprocfs_seq_vars nrs_crrn_lprocfs_vars[] = { + struct lprocfs_vars nrs_crrn_lprocfs_vars[] = { { .name = "nrs_crrn_quantum", .fops = &ptlrpc_lprocfs_nrs_crrn_quantum_fops, .data = svc }, @@ -829,8 +829,7 @@ static int nrs_crrn_lprocfs_init(struct ptlrpc_service *svc) if (svc->srv_procroot == NULL) return 0; - return lprocfs_seq_add_vars(svc->srv_procroot, nrs_crrn_lprocfs_vars, - NULL); + return lprocfs_add_vars(svc->srv_procroot, nrs_crrn_lprocfs_vars, NULL); } /** diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index 7dcb3a4..d72c597 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -1858,7 +1858,7 @@ static int nrs_orr_lprocfs_init(struct ptlrpc_service *svc) { int i; - struct lprocfs_seq_vars nrs_orr_lprocfs_vars[] = { + struct lprocfs_vars nrs_orr_lprocfs_vars[] = { { .name = "nrs_orr_quantum", .fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops }, { .name = "nrs_orr_offset_type", @@ -1876,7 +1876,7 @@ static int nrs_orr_lprocfs_init(struct ptlrpc_service *svc) for (i = 0; i < ARRAY_SIZE(nrs_orr_lprocfs_vars); i++) nrs_orr_lprocfs_vars[i].data = &lprocfs_orr_data; - return lprocfs_seq_add_vars(svc->srv_procroot, nrs_orr_lprocfs_vars, NULL); + return lprocfs_add_vars(svc->srv_procroot, nrs_orr_lprocfs_vars, NULL); } static void nrs_orr_lprocfs_fini(struct ptlrpc_service *svc) @@ -1925,10 +1925,9 @@ struct ptlrpc_nrs_pol_conf nrs_conf_orr = { static int nrs_trr_lprocfs_init(struct ptlrpc_service *svc) { - int rc; int i; - struct lprocfs_seq_vars nrs_trr_lprocfs_vars[] = { + struct lprocfs_vars nrs_trr_lprocfs_vars[] = { { .name = "nrs_trr_quantum", .fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops }, { .name = "nrs_trr_offset_type", @@ -1946,9 +1945,7 @@ static int nrs_trr_lprocfs_init(struct ptlrpc_service *svc) for (i = 0; i < ARRAY_SIZE(nrs_trr_lprocfs_vars); i++) nrs_trr_lprocfs_vars[i].data = &lprocfs_trr_data; - rc = lprocfs_seq_add_vars(svc->srv_procroot, nrs_trr_lprocfs_vars, NULL); - - return rc; + return lprocfs_add_vars(svc->srv_procroot, nrs_trr_lprocfs_vars, NULL); } static void nrs_trr_lprocfs_fini(struct ptlrpc_service *svc) diff --git a/lustre/ptlrpc/nrs_tbf.c b/lustre/ptlrpc/nrs_tbf.c index 34b2983..d8c6a31 100644 --- a/lustre/ptlrpc/nrs_tbf.c +++ b/lustre/ptlrpc/nrs_tbf.c @@ -1827,7 +1827,7 @@ LPROC_SEQ_FOPS(ptlrpc_lprocfs_nrs_tbf_rule); */ static int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc) { - struct lprocfs_seq_vars nrs_tbf_lprocfs_vars[] = { + struct lprocfs_vars nrs_tbf_lprocfs_vars[] = { { .name = "nrs_tbf_rule", .fops = &ptlrpc_lprocfs_nrs_tbf_rule_fops, .data = svc }, @@ -1837,8 +1837,7 @@ static int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc) if (svc->srv_procroot == NULL) return 0; - return lprocfs_seq_add_vars(svc->srv_procroot, nrs_tbf_lprocfs_vars, - NULL); + return lprocfs_add_vars(svc->srv_procroot, nrs_tbf_lprocfs_vars, NULL); } /** diff --git a/lustre/ptlrpc/sec_lproc.c b/lustre/ptlrpc/sec_lproc.c index 877deb1..f7104a9 100644 --- a/lustre/ptlrpc/sec_lproc.c +++ b/lustre/ptlrpc/sec_lproc.c @@ -171,7 +171,7 @@ int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev) EXPORT_SYMBOL(sptlrpc_lprocfs_cliobd_attach); LPROC_SEQ_FOPS_RO(sptlrpc_proc_enc_pool); -static struct lprocfs_seq_vars sptlrpc_lprocfs_vars[] = { +static struct lprocfs_vars sptlrpc_lprocfs_vars[] = { { .name = "encrypt_page_pools", .fops = &sptlrpc_proc_enc_pool_fops }, { NULL } @@ -183,8 +183,8 @@ int sptlrpc_lproc_init(void) LASSERT(sptlrpc_proc_root == NULL); - sptlrpc_proc_root = lprocfs_seq_register("sptlrpc", proc_lustre_root, - sptlrpc_lprocfs_vars, NULL); + sptlrpc_proc_root = lprocfs_register("sptlrpc", proc_lustre_root, + sptlrpc_lprocfs_vars, NULL); if (IS_ERR(sptlrpc_proc_root)) { rc = PTR_ERR(sptlrpc_proc_root); sptlrpc_proc_root = NULL; diff --git a/lustre/quota/qmt_dev.c b/lustre/quota/qmt_dev.c index 346d961..7c41c1a 100644 --- a/lustre/quota/qmt_dev.c +++ b/lustre/quota/qmt_dev.c @@ -257,8 +257,8 @@ static int qmt_device_init0(const struct lu_env *env, struct qmt_device *qmt, LASSERT(type != NULL); /* register proc directory associated with this qmt */ - qmt->qmt_proc = lprocfs_seq_register(qmt->qmt_svname, type->typ_procroot, - NULL, NULL); + qmt->qmt_proc = lprocfs_register(qmt->qmt_svname, type->typ_procroot, + NULL, NULL); if (IS_ERR(qmt->qmt_proc)) { rc = PTR_ERR(qmt->qmt_proc); CERROR("%s: failed to create qmt proc entry (%d)\n", diff --git a/lustre/quota/qmt_pool.c b/lustre/quota/qmt_pool.c index c3215c9..05da037 100644 --- a/lustre/quota/qmt_pool.c +++ b/lustre/quota/qmt_pool.c @@ -170,7 +170,7 @@ static int qpi_state_seq_show(struct seq_file *m, void *data) } LPROC_SEQ_FOPS_RO(qpi_state); -static struct lprocfs_seq_vars lprocfs_quota_qpi_vars[] = { +static struct lprocfs_vars lprocfs_quota_qpi_vars[] = { { .name = "info", .fops = &qpi_state_fops }, { NULL } @@ -213,8 +213,8 @@ static int qmt_pool_alloc(const struct lu_env *env, struct qmt_device *qmt, /* create pool proc directory */ sprintf(qti->qti_buf, "%s-0x%x", RES_NAME(pool_type), pool_id); - pool->qpi_proc = lprocfs_seq_register(qti->qti_buf, qmt->qmt_proc, - lprocfs_quota_qpi_vars, pool); + pool->qpi_proc = lprocfs_register(qti->qti_buf, qmt->qmt_proc, + lprocfs_quota_qpi_vars, pool); if (IS_ERR(pool->qpi_proc)) { rc = PTR_ERR(pool->qpi_proc); CERROR("%s: failed to create proc entry for pool %s (%d)\n", diff --git a/lustre/quota/qsd_lib.c b/lustre/quota/qsd_lib.c index 9c0f227..bcbe18a 100644 --- a/lustre/quota/qsd_lib.c +++ b/lustre/quota/qsd_lib.c @@ -207,7 +207,7 @@ qsd_timeout_seq_write(struct file *file, const char *buffer, } LPROC_SEQ_FOPS(qsd_timeout); -static struct lprocfs_seq_vars lprocfs_quota_qsd_vars[] = { +static struct lprocfs_vars lprocfs_quota_qsd_vars[] = { { .name = "info", .fops = &qsd_state_fops }, { .name = "enabled", @@ -617,8 +617,8 @@ struct qsd_instance *qsd_init(const struct lu_env *env, char *svname, mutex_unlock(&qsd->qsd_fsinfo->qfs_mutex); /* register procfs directory */ - qsd->qsd_proc = lprocfs_seq_register(QSD_DIR, osd_proc, - lprocfs_quota_qsd_vars, qsd); + qsd->qsd_proc = lprocfs_register(QSD_DIR, osd_proc, + lprocfs_quota_qsd_vars, qsd); if (IS_ERR(qsd->qsd_proc)) { rc = PTR_ERR(qsd->qsd_proc); qsd->qsd_proc = NULL; -- 1.8.3.1