File 0016-LU-13344-all-Separate-debugfs-and-procfs-handling.patch of Package lustre_2_12

From 89b4d4ed017788ddc0be9e59891c9cbe3ce8dd26 Mon Sep 17 00:00:00 2001
From: Shaun Tancheff <shaun.tancheff@hpe.com>
Date: Thu, 4 Jun 2020 16:27:44 -0500
Subject: [PATCH 16/35] LU-13344 all: Separate debugfs and procfs handling

Linux 5.6 introduces proc_ops with v5.5-8862-gd56c0d45f0e2
proc: decouple proc from VFS with "struct proc_ops"

Separate debugfs usage and procfs usage to prepare for the divergence
of debugfs using file_operations and procfs using proc_ops

HPE-bug-id: LUS-8589
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1746e563b55a9e89f90ac01843c304fe6b690d8b
Reviewed-on: https://review.whamcloud.com/37834
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
---
 lustre/fid/fid_internal.h        |  4 +--
 lustre/fid/lproc_fid.c           | 18 ++++++-------
 lustre/fld/fld_internal.h        |  2 +-
 lustre/fld/lproc_fld.c           |  2 +-
 lustre/include/dt_object.h       |  2 +-
 lustre/include/lprocfs_status.h  | 44 +++++++++++++++++++++++-------
 lustre/include/obd.h             |  1 +
 lustre/include/obd_class.h       |  2 +-
 lustre/ldlm/ldlm_internal.h      |  2 +-
 lustre/ldlm/ldlm_pool.c          |  2 +-
 lustre/ldlm/ldlm_resource.c      |  2 +-
 lustre/llite/lproc_llite.c       |  2 +-
 lustre/mdd/mdd_lproc.c           |  6 ++---
 lustre/mdt/mdt_coordinator.c     | 14 +++++-----
 lustre/mgc/lproc_mgc.c           |  4 +--
 lustre/obdclass/dt_object.c      |  2 +-
 lustre/obdclass/genops.c         |  2 +-
 lustre/obdclass/lprocfs_status.c | 27 +++++++++++++------
 lustre/osd-ldiskfs/osd_lproc.c   | 46 ++++++++++++++++----------------
 lustre/osd-zfs/osd_lproc.c       | 32 +++++++++++-----------
 lustre/osp/lproc_osp.c           | 12 ++++-----
 lustre/ptlrpc/gss/lproc_gss.c    |  8 +++---
 lustre/ptlrpc/lproc_ptlrpc.c     | 10 +++----
 lustre/ptlrpc/nrs_crr.c          |  2 +-
 lustre/ptlrpc/nrs_delay.c        |  2 +-
 lustre/ptlrpc/nrs_orr.c          |  4 +--
 lustre/ptlrpc/nrs_tbf.c          |  2 +-
 lustre/ptlrpc/sec_lproc.c        | 10 +++----
 28 files changed, 150 insertions(+), 116 deletions(-)

diff --git a/lustre/fid/fid_internal.h b/lustre/fid/fid_internal.h
index 2783dd0d68bc..1c6587d43b52 100644
--- a/lustre/fid/fid_internal.h
+++ b/lustre/fid/fid_internal.h
@@ -55,7 +55,7 @@ enum {
 
 extern struct lu_context_key seq_thread_key;
 
-extern struct lprocfs_vars seq_server_debugfs_list[];
+extern struct ldebugfs_vars seq_server_debugfs_list[];
 
 /* Store API functions. */
 struct dt_device;
@@ -89,6 +89,6 @@ int seq_client_alloc_super(struct lu_client_seq *seq,
 
 extern struct dentry *seq_debugfs_dir;
 
-extern struct lprocfs_vars seq_client_debugfs_list[];
+extern struct ldebugfs_vars seq_client_debugfs_list[];
 
 #endif /* __FID_INTERNAL_H */
diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c
index 1df0ac8e0e66..5ac2b883d086 100644
--- a/lustre/fid/lproc_fid.c
+++ b/lustre/fid/lproc_fid.c
@@ -195,11 +195,11 @@ ldebugfs_server_fid_width_seq_show(struct seq_file *m, void *unused)
 	RETURN(0);
 }
 
-LPROC_SEQ_FOPS(ldebugfs_server_fid_space);
-LPROC_SEQ_FOPS(ldebugfs_server_fid_width);
-LPROC_SEQ_FOPS_RO(ldebugfs_server_fid_server);
+LDEBUGFS_SEQ_FOPS(ldebugfs_server_fid_space);
+LDEBUGFS_SEQ_FOPS(ldebugfs_server_fid_width);
+LDEBUGFS_SEQ_FOPS_RO(ldebugfs_server_fid_server);
 
-struct lprocfs_vars seq_server_debugfs_list[] = {
+struct ldebugfs_vars seq_server_debugfs_list[] = {
 	{ .name	=	"space",
 	  .fops	=	&ldebugfs_server_fid_space_fops	},
 	{ .name	=	"width",
@@ -603,12 +603,12 @@ ldebugfs_client_fid_server_seq_show(struct seq_file *m, void *unused)
 	RETURN(0);
 }
 
-LPROC_SEQ_FOPS(ldebugfs_client_fid_space);
-LPROC_SEQ_FOPS(ldebugfs_client_fid_width);
-LPROC_SEQ_FOPS_RO(ldebugfs_client_fid_server);
-LPROC_SEQ_FOPS_RO(ldebugfs_client_fid_fid);
+LDEBUGFS_SEQ_FOPS(ldebugfs_client_fid_space);
+LDEBUGFS_SEQ_FOPS(ldebugfs_client_fid_width);
+LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_server);
+LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_fid);
 
-struct lprocfs_vars seq_client_debugfs_list[] = {
+struct ldebugfs_vars seq_client_debugfs_list[] = {
 	{ .name	=	"space",
 	  .fops	=	&ldebugfs_client_fid_space_fops	},
 	{ .name	=	"width",
diff --git a/lustre/fld/fld_internal.h b/lustre/fld/fld_internal.h
index 5fce515ee285..48337e0b6839 100644
--- a/lustre/fld/fld_internal.h
+++ b/lustre/fld/fld_internal.h
@@ -181,7 +181,7 @@ int fld_client_rpc(struct obd_export *exp,
                    struct lu_seq_range *range, __u32 fld_op,
 		   struct ptlrpc_request **reqp);
 
-extern struct lprocfs_vars fld_client_debugfs_list[];
+extern struct ldebugfs_vars fld_client_debugfs_list[];
 
 struct fld_cache *fld_cache_init(const char *name,
                                  int cache_size, int cache_threshold);
diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c
index 1bcecdfb973c..a555889f5773 100644
--- a/lustre/fld/lproc_fld.c
+++ b/lustre/fld/lproc_fld.c
@@ -136,7 +136,7 @@ LDEBUGFS_SEQ_FOPS_RO(fld_debugfs_targets);
 LDEBUGFS_SEQ_FOPS(fld_debugfs_hash);
 LDEBUGFS_FOPS_WR_ONLY(fld, cache_flush);
 
-struct lprocfs_vars fld_client_debugfs_list[] = {
+struct ldebugfs_vars fld_client_debugfs_list[] = {
 	{ .name	=	"targets",
 	  .fops	=	&fld_debugfs_targets_fops	},
 	{ .name	=	"hash",
diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h
index 4cc76df008ca..55847369cc78 100644
--- a/lustre/include/dt_object.h
+++ b/lustre/include/dt_object.h
@@ -2866,7 +2866,7 @@ static inline struct dt_thread_info *dt_info(const struct lu_env *env)
 int dt_global_init(void);
 void dt_global_fini(void);
 int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
-		     const char *name, struct lprocfs_vars *list);
+		     const char *name, struct ldebugfs_vars *list);
 int dt_tunables_fini(struct dt_device *dt);
 
 # ifdef CONFIG_PROC_FS
diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h
index e9d51e60b4a2..f60bb9df11a5 100644
--- a/lustre/include/lprocfs_status.h
+++ b/lustre/include/lprocfs_status.h
@@ -48,13 +48,25 @@
 #include <libcfs/libcfs.h>
 #include <uapi/linux/lustre/lustre_idl.h>
 
+/*
+ * Liuux 5.6 introduces proc_ops with v5.5-8862-gd56c0d45f0e2
+ * Now that proc and debugfs use separate operation vector types
+ * separate containers are also needed.
+ */
 struct lprocfs_vars {
 	const char			*name;
 	const struct file_operations	*fops;
 	void				*data;
-	/**
-	 * /proc file mode.
-	 */
+	/** /proc file mode. */
+	mode_t				 proc_mode;
+};
+
+/** Provide a debugfs container */
+struct ldebugfs_vars {
+	const char			*name;
+	const struct file_operations	*fops;
+	void				*data;
+	/** debugfs file mode. */
 	mode_t				 proc_mode;
 };
 
@@ -517,18 +529,19 @@ extern int lprocfs_nid_stats_clear_seq_show(struct seq_file *file, void *data);
 extern int ldebugfs_register_stats(struct dentry *parent, const char *name,
 				   struct lprocfs_stats *stats);
 extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
-                                  struct lprocfs_stats *stats);
+				  struct lprocfs_stats *stats);
+extern const struct file_operations ldebugfs_stats_seq_fops;
 
 /* lprocfs_status.c */
-extern int ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *var,
+extern int ldebugfs_add_vars(struct dentry *parent, struct ldebugfs_vars *var,
 			     void *data);
-extern int lprocfs_add_vars(struct proc_dir_entry *root,
-			    struct lprocfs_vars *var, void *data);
-
 extern struct dentry *ldebugfs_register(const char *name,
 					struct dentry *parent,
-					struct lprocfs_vars *list,
+					struct ldebugfs_vars *list,
 					void *data);
+extern int lprocfs_add_vars(struct proc_dir_entry *root,
+			    struct lprocfs_vars *var, void *data);
+
 extern struct proc_dir_entry *
 lprocfs_register(const char *name, struct proc_dir_entry *parent,
 		 struct lprocfs_vars *list, void *data);
@@ -605,8 +618,15 @@ ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
 		  char *buffer);
 
 extern ssize_t
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+			  size_t count, loff_t *off);
+static inline ssize_t
 lprocfs_import_seq_write(struct file *file, const char __user *buffer,
-			 size_t count, loff_t *off);
+			 size_t count, loff_t *off)
+{
+	return ldebugfs_import_seq_write(file, buffer, count, off);
+}
+
 extern int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *data);
 extern ssize_t
 lprocfs_pinger_recov_seq_write(struct file *file, const char __user *buffer,
@@ -994,6 +1014,10 @@ lprocfs_ping_seq_write(struct file *file, const char __user *buffer,
 		       size_t count, loff_t *off)
 { return 0; }
 static inline ssize_t
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+			  size_t count, loff_t *off)
+{ return 0; }
+static inline ssize_t
 lprocfs_import_seq_write(struct file *file, const char __user *buffer,
 			 size_t count, loff_t *off)
 { return 0; }
diff --git a/lustre/include/obd.h b/lustre/include/obd.h
index 011686532e9c..6357e8a08ae5 100644
--- a/lustre/include/obd.h
+++ b/lustre/include/obd.h
@@ -736,6 +736,7 @@ struct obd_device {
 	struct lprocfs_stats	*obd_svc_stats;
 	const struct attribute	       **obd_attrs;
 	struct lprocfs_vars	*obd_vars;
+	struct ldebugfs_vars	*obd_debugfs_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 94432d75108a..0af87397f9ca 100644
--- a/lustre/include/obd_class.h
+++ b/lustre/include/obd_class.h
@@ -65,7 +65,7 @@ struct lu_device_type;
 struct obd_export *class_conn2export(struct lustre_handle *);
 struct kobject *class_setup_tunables(const char *name);
 int class_register_type(struct obd_ops *, struct md_ops *, bool enable_proc,
-			struct lprocfs_vars *module_vars,
+			struct ldebugfs_vars *module_vars,
 			const char *nm, struct lu_device_type *ldt);
 int class_unregister_type(const char *nm);
 
diff --git a/lustre/ldlm/ldlm_internal.h b/lustre/ldlm/ldlm_internal.h
index 1be703cd0659..733773c50ed0 100644
--- a/lustre/ldlm/ldlm_internal.h
+++ b/lustre/ldlm/ldlm_internal.h
@@ -352,7 +352,7 @@ enum ldlm_policy_res {
 	struct __##var##__dummy_write {; } /* semicolon catcher */
 
 static inline void
-ldlm_add_var(struct lprocfs_vars *vars, struct dentry *debugfs_entry,
+ldlm_add_var(struct ldebugfs_vars *vars, struct dentry *debugfs_entry,
 	     const char *name, void *data, const struct file_operations *ops)
 {
 	snprintf((char *)vars->name, MAX_STRING_SIZE, "%s", name);
diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c
index a8cfbb07f167..0a423d5615b5 100644
--- a/lustre/ldlm/ldlm_pool.c
+++ b/lustre/ldlm/ldlm_pool.c
@@ -776,7 +776,7 @@ static int ldlm_pool_debugfs_init(struct ldlm_pool *pl)
 {
 	struct ldlm_namespace *ns = ldlm_pl2ns(pl);
 	struct dentry *debugfs_ns_parent;
-	struct lprocfs_vars pool_vars[2];
+	struct ldebugfs_vars pool_vars[2];
 	char *var_name = NULL;
 	int rc = 0;
 	ENTRY;
diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c
index f260d7e622d4..dd894b226805 100644
--- a/lustre/ldlm/ldlm_resource.c
+++ b/lustre/ldlm/ldlm_resource.c
@@ -198,7 +198,7 @@ static const struct file_operations ldlm_granted_fops = {
 
 #endif /* HAVE_SERVER_SUPPORT */
 
-static struct lprocfs_vars ldlm_debugfs_list[] = {
+static struct ldebugfs_vars ldlm_debugfs_list[] = {
 	{ .name	=	"dump_namespaces",
 	  .fops	=	&ldlm_dump_ns_fops,
 	  .proc_mode =	0222 },
diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c
index 765c4f57fdcc..7f95090796d4 100644
--- a/lustre/llite/lproc_llite.c
+++ b/lustre/llite/lproc_llite.c
@@ -1225,7 +1225,7 @@ static ssize_t ll_nosquash_nids_seq_write(struct file *file,
 
 LDEBUGFS_SEQ_FOPS(ll_nosquash_nids);
 
-struct lprocfs_vars lprocfs_llite_obd_vars[] = {
+struct ldebugfs_vars lprocfs_llite_obd_vars[] = {
 	{ .name	=	"site",
 	  .fops	=	&ll_site_stats_fops			},
 	{ .name =	"max_read_ahead_mb",
diff --git a/lustre/mdd/mdd_lproc.c b/lustre/mdd/mdd_lproc.c
index 1ec5e8bdaf59..4634ac7e90c8 100644
--- a/lustre/mdd/mdd_lproc.c
+++ b/lustre/mdd/mdd_lproc.c
@@ -644,7 +644,7 @@ static ssize_t append_pool_store(struct kobject *kobj, struct attribute *attr,
 }
 LUSTRE_RW_ATTR(append_pool);
 
-static struct lprocfs_vars lprocfs_mdd_obd_vars[] = {
+static struct ldebugfs_vars ldebugfs_mdd_obd_vars[] = {
 	{ .name =	"changelog_mask",
 	  .fops =	&mdd_changelog_mask_fops	},
 	{ .name =	"changelog_users",
@@ -709,10 +709,10 @@ int mdd_procfs_init(struct mdd_device *mdd, const char *name)
 		return rc;
 
 	/* Find the type procroot and add the proc entry for this device */
-	obd->obd_vars = lprocfs_mdd_obd_vars;
+	obd->obd_debugfs_vars = ldebugfs_mdd_obd_vars;
 	obd->obd_debugfs_entry = ldebugfs_register(name,
 						   type->typ_debugfs_entry,
-						   obd->obd_vars, mdd);
+						   obd->obd_debugfs_vars, mdd);
 	if (IS_ERR_OR_NULL(obd->obd_debugfs_entry)) {
 		rc = obd->obd_debugfs_entry ? PTR_ERR(obd->obd_debugfs_entry)
 					    : -ENOMEM;
diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c
index ccd343471098..808b38d216d9 100644
--- a/lustre/mdt/mdt_coordinator.c
+++ b/lustre/mdt/mdt_coordinator.c
@@ -47,8 +47,6 @@
 #include <lustre_kernelcomm.h>
 #include "mdt_internal.h"
 
-static struct lprocfs_vars lprocfs_mdt_hsm_vars[];
-
 /**
  * get obj and HSM attributes on a fid
  * \param mti [IN] context
@@ -456,7 +454,7 @@ int hsm_cdt_procfs_init(struct mdt_device *mdt)
 	/* init /proc entries, failure is not critical */
 	cdt->cdt_proc_dir = lprocfs_register("hsm",
 					     mdt2obd_dev(mdt)->obd_proc_entry,
-					     lprocfs_mdt_hsm_vars, mdt);
+					     ldebugfs_mdt_hsm_vars, mdt);
 	if (IS_ERR(cdt->cdt_proc_dir)) {
 		rc = PTR_ERR(cdt->cdt_proc_dir);
 		CERROR("%s: Cannot create 'hsm' directory in mdt proc dir,"
@@ -487,7 +485,7 @@ void hsm_cdt_procfs_fini(struct mdt_device *mdt)
  */
 struct lprocfs_vars *hsm_cdt_get_proc_vars(void)
 {
-	return lprocfs_mdt_hsm_vars;
+	return ldebugfs_mdt_hsm_vars;
 }
 
 /* Release the ressource used by the coordinator. Called when the
@@ -2460,11 +2458,11 @@ static int mdt_hsm_cdt_remove_count_seq_show(struct seq_file *m, void *data)
 	RETURN(0);
 }
 
-LPROC_SEQ_FOPS_RO(mdt_hsm_cdt_archive_count);
-LPROC_SEQ_FOPS_RO(mdt_hsm_cdt_restore_count);
-LPROC_SEQ_FOPS_RO(mdt_hsm_cdt_remove_count);
+LDEBUGFS_SEQ_FOPS_RO(mdt_hsm_cdt_archive_count);
+LDEBUGFS_SEQ_FOPS_RO(mdt_hsm_cdt_restore_count);
+LDEBUGFS_SEQ_FOPS_RO(mdt_hsm_cdt_remove_count);
 
-static struct lprocfs_vars lprocfs_mdt_hsm_vars[] = {
+static struct ldebugfs_vars ldebugfs_mdt_hsm_vars[] = {
 	{ .name	=	"agents",
 	  .fops	=	&mdt_hsm_agent_fops			},
 	{ .name	=	"actions",
diff --git a/lustre/mgc/lproc_mgc.c b/lustre/mgc/lproc_mgc.c
index ec4ba5eb4241..f277d3e489e7 100644
--- a/lustre/mgc/lproc_mgc.c
+++ b/lustre/mgc/lproc_mgc.c
@@ -54,7 +54,7 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v)
 
 LDEBUGFS_SEQ_FOPS_RO(mgc_ir_state);
 
-struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_mgc_obd_vars[] = {
 	{ .name	=	"connect_flags",
 	  .fops	=	&mgc_connect_flags_fops	},
 	{ .name	=	"mgs_server_uuid",
@@ -86,7 +86,7 @@ int mgc_tunables_init(struct obd_device *obd)
 	int rc;
 
 	obd->obd_ktype.default_attrs = mgc_attrs;
-	obd->obd_vars = lprocfs_mgc_obd_vars;
+	obd->obd_debugfs_vars = ldebugfs_mgc_obd_vars;
 	rc = lprocfs_obd_setup(obd, true);
 	if (rc)
 		return rc;
diff --git a/lustre/obdclass/dt_object.c b/lustre/obdclass/dt_object.c
index 9cacbe8c3b04..68952df7e124 100644
--- a/lustre/obdclass/dt_object.c
+++ b/lustre/obdclass/dt_object.c
@@ -1257,7 +1257,7 @@ int dt_tunables_fini(struct dt_device *dt)
 EXPORT_SYMBOL(dt_tunables_fini);
 
 int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
-		     const char *name, struct lprocfs_vars *list)
+		     const char *name, struct ldebugfs_vars *list)
 {
 	int rc;
 
diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
index e36af1c02f95..320e9dfb9f1d 100644
--- a/lustre/obdclass/genops.c
+++ b/lustre/obdclass/genops.c
@@ -196,7 +196,7 @@ EXPORT_SYMBOL(class_setup_tunables);
 #define CLASS_MAX_NAME 1024
 
 int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
-			bool enable_proc, struct lprocfs_vars *vars,
+			bool enable_proc, struct ldebugfs_vars *vars,
 			const char *name, struct lu_device_type *ldt)
 {
 	struct obd_type *type;
diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c
index 308a3a042b74..55546f83f7aa 100644
--- a/lustre/obdclass/lprocfs_status.c
+++ b/lustre/obdclass/lprocfs_status.c
@@ -135,9 +135,9 @@ struct proc_dir_entry *lprocfs_add_symlink(const char *name,
 }
 EXPORT_SYMBOL(lprocfs_add_symlink);
 
-static const struct file_operations lprocfs_generic_fops = { };
+static const struct file_operations ldebugfs_empty_ops = { };
 
-int ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *list,
+int ldebugfs_add_vars(struct dentry *parent, struct ldebugfs_vars *list,
 		      void *data)
 {
 	if (IS_ERR_OR_NULL(parent) || IS_ERR_OR_NULL(list))
@@ -157,7 +157,7 @@ int ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *list,
 		}
 		entry = debugfs_create_file(list->name, mode, parent,
 					    list->data ? : data,
-					    list->fops ? : &lprocfs_generic_fops);
+					    list->fops ? : &ldebugfs_empty_ops);
 		if (IS_ERR_OR_NULL(entry))
 			return entry ? PTR_ERR(entry) : -ENOMEM;
 		list++;
@@ -166,6 +166,8 @@ int ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *list,
 }
 EXPORT_SYMBOL_GPL(ldebugfs_add_vars);
 
+static const struct file_operations lprocfs_empty_ops = { };
+
 /**
  * Add /proc entries.
  *
@@ -197,7 +199,7 @@ lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list,
 				mode |= 0200;
 		}
 		proc = proc_create_data(list->name, mode, root,
-					list->fops ?: &lprocfs_generic_fops,
+					list->fops ?: &lprocfs_empty_ops,
 					list->data ?: data);
 		if (!proc)
 			return -ENOMEM;
@@ -326,7 +328,7 @@ void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent)
 EXPORT_SYMBOL(lprocfs_remove_proc_entry);
 
 struct dentry *ldebugfs_register(const char *name, struct dentry *parent,
-				 struct lprocfs_vars *list, void *data)
+				 struct ldebugfs_vars *list, void *data)
 {
 	struct dentry *entry;
 
@@ -1201,7 +1203,7 @@ static void obd_sysfs_release(struct kobject *kobj)
 
 int lprocfs_obd_setup(struct obd_device *obd, bool uuid_only)
 {
-	struct lprocfs_vars *debugfs_vars = NULL;
+	struct ldebugfs_vars *debugfs_vars = NULL;
 	int rc;
 
 	if (!obd || obd->obd_magic != OBD_DEVICE_MAGIC)
@@ -1233,7 +1235,7 @@ int lprocfs_obd_setup(struct obd_device *obd, bool uuid_only)
 	}
 
 	if (!obd->obd_type->typ_procroot)
-		debugfs_vars = obd->obd_vars;
+		debugfs_vars = obd->obd_debugfs_vars;
 	obd->obd_debugfs_entry = ldebugfs_register(obd->obd_name,
 						   obd->obd_type->typ_debugfs_entry,
 						   debugfs_vars, obd);
@@ -1570,7 +1572,7 @@ static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static const struct file_operations lprocfs_stats_seq_fops = {
+static const struct file_operations ldebugfs_stats_seq_fops = {
 	.owner   = THIS_MODULE,
 	.open    = lprocfs_stats_seq_open,
 	.read    = seq_read,
@@ -1595,6 +1597,15 @@ int ldebugfs_register_stats(struct dentry *parent, const char *name,
 }
 EXPORT_SYMBOL_GPL(ldebugfs_register_stats);
 
+static const struct file_operations lprocfs_stats_seq_fops = {
+	.owner   = THIS_MODULE,
+	.open    = lprocfs_stats_seq_open,
+	.read    = seq_read,
+	.write   = lprocfs_stats_seq_write,
+	.llseek  = seq_lseek,
+	.release = lprocfs_seq_release,
+};
+
 int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
                            struct lprocfs_stats *stats)
 {
diff --git a/lustre/osd-ldiskfs/osd_lproc.c b/lustre/osd-ldiskfs/osd_lproc.c
index 8a484a00ba78..9886eb4d9871 100644
--- a/lustre/osd-ldiskfs/osd_lproc.c
+++ b/lustre/osd-ldiskfs/osd_lproc.c
@@ -239,7 +239,7 @@ static int ldiskfs_osd_fstype_seq_show(struct seq_file *m, void *data)
 	seq_puts(m, "ldiskfs\n");
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(ldiskfs_osd_fstype);
+LDEBUGFS_SEQ_FOPS_RO(ldiskfs_osd_fstype);
 
 static int ldiskfs_osd_mntdev_seq_show(struct seq_file *m, void *data)
 {
@@ -252,7 +252,7 @@ static int ldiskfs_osd_mntdev_seq_show(struct seq_file *m, void *data)
 	seq_printf(m, "%s\n", osd->od_mntdev);
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(ldiskfs_osd_mntdev);
+LDEBUGFS_SEQ_FOPS_RO(ldiskfs_osd_mntdev);
 
 static int ldiskfs_osd_cache_seq_show(struct seq_file *m, void *data)
 {
@@ -287,7 +287,7 @@ ldiskfs_osd_cache_seq_write(struct file *file, const char __user *buffer,
 	osd->od_read_cache = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_cache);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_cache);
 
 static int ldiskfs_osd_wcache_seq_show(struct seq_file *m, void *data)
 {
@@ -322,7 +322,7 @@ ldiskfs_osd_wcache_seq_write(struct file *file, const char __user *buffer,
 	osd->od_writethrough_cache = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_wcache);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_wcache);
 
 static ssize_t
 lprocfs_osd_force_sync_seq_write(struct file *file, const char __user *buffer,
@@ -346,7 +346,7 @@ lprocfs_osd_force_sync_seq_write(struct file *file, const char __user *buffer,
 
 	return rc == 0 ? count : rc;
 }
-LPROC_SEQ_FOPS_WR_ONLY(ldiskfs, osd_force_sync);
+LDEBUGFS_SEQ_FOPS_WR_ONLY(ldiskfs, osd_force_sync);
 
 static int ldiskfs_osd_nonrotational_seq_show(struct seq_file *m, void *data)
 {
@@ -383,7 +383,7 @@ ldiskfs_osd_nonrotational_seq_write(struct file *file,
 	osd->od_nonrotational = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_nonrotational);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_nonrotational);
 
 static int ldiskfs_osd_pdo_seq_show(struct seq_file *m, void *data)
 {
@@ -406,7 +406,7 @@ ldiskfs_osd_pdo_seq_write(struct file *file, const char __user *buffer,
 
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_pdo);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_pdo);
 
 static int ldiskfs_osd_auto_scrub_seq_show(struct seq_file *m, void *data)
 {
@@ -441,7 +441,7 @@ ldiskfs_osd_auto_scrub_seq_write(struct file *file, const char __user *buffer,
 	dev->od_auto_scrub_interval = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_auto_scrub);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_auto_scrub);
 
 static int ldiskfs_osd_full_scrub_ratio_seq_show(struct seq_file *m, void *data)
 {
@@ -480,7 +480,7 @@ ldiskfs_osd_full_scrub_ratio_seq_write(struct file *file,
 	dev->od_full_scrub_ratio = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_full_scrub_ratio);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_full_scrub_ratio);
 
 static int ldiskfs_osd_full_scrub_threshold_rate_seq_show(struct seq_file *m,
 							  void *data)
@@ -518,7 +518,7 @@ ldiskfs_osd_full_scrub_threshold_rate_seq_write(struct file *file,
 	dev->od_full_scrub_threshold_rate = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_full_scrub_threshold_rate);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_full_scrub_threshold_rate);
 
 static int
 ldiskfs_osd_track_declares_assert_seq_show(struct seq_file *m, void *data)
@@ -543,7 +543,7 @@ ldiskfs_osd_track_declares_assert_seq_write(struct file *file,
 
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_track_declares_assert);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_track_declares_assert);
 
 static int ldiskfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data)
 {
@@ -556,7 +556,7 @@ static int ldiskfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data)
 	osd_scrub_dump(m, dev);
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(ldiskfs_osd_oi_scrub);
+LDEBUGFS_SEQ_FOPS_RO(ldiskfs_osd_oi_scrub);
 
 static int ldiskfs_osd_readcache_seq_show(struct seq_file *m, void *data)
 {
@@ -594,7 +594,7 @@ ldiskfs_osd_readcache_seq_write(struct file *file, const char __user *buffer,
 					 OSD_MAX_CACHE_SIZE : val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_readcache);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_readcache);
 
 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 52, 0)
 static int ldiskfs_osd_index_in_idif_seq_show(struct seq_file *m, void *data)
@@ -659,7 +659,7 @@ ldiskfs_osd_index_in_idif_seq_write(struct file *file,
 	dev->od_index_in_idif = 1;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_index_in_idif);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_index_in_idif);
 
 int osd_register_proc_index_in_idif(struct osd_device *osd)
 {
@@ -708,16 +708,16 @@ static ssize_t ldiskfs_osd_index_backup_seq_write(struct file *file,
 	dev->od_index_backup_policy = val;
 	return count;
 }
-LPROC_SEQ_FOPS(ldiskfs_osd_index_backup);
+LDEBUGFS_SEQ_FOPS(ldiskfs_osd_index_backup);
 
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_blksize);
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytestotal);
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytesfree);
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytesavail);
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filestotal);
-LPROC_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filesfree);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_blksize);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytestotal);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytesfree);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_kbytesavail);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filestotal);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(ldiskfs, dt_filesfree);
 
-struct lprocfs_vars lprocfs_osd_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_osd_obd_vars[] = {
 	{ .name	=	"blocksize",
 	  .fops	=	&ldiskfs_dt_blksize_fops	},
 	{ .name	=	"kbytestotal",
@@ -784,7 +784,7 @@ int osd_procfs_init(struct osd_device *osd, const char *name)
 
 	/* Find the type procroot and add the proc entry for this device */
 	osd->od_proc_entry = lprocfs_register(name, type->typ_procroot,
-					      lprocfs_osd_obd_vars,
+					      ldebugfs_osd_obd_vars,
 					      &osd->od_dt_dev);
 	if (IS_ERR(osd->od_proc_entry)) {
 		rc = PTR_ERR(osd->od_proc_entry);
diff --git a/lustre/osd-zfs/osd_lproc.c b/lustre/osd-zfs/osd_lproc.c
index 0b7377f2ccfa..c653c6d5792e 100644
--- a/lustre/osd-zfs/osd_lproc.c
+++ b/lustre/osd-zfs/osd_lproc.c
@@ -240,7 +240,7 @@ zfs_osd_auto_scrub_seq_write(struct file *file, const char __user *buffer,
 	dev->od_auto_scrub_interval = val;
 	return count;
 }
-LPROC_SEQ_FOPS(zfs_osd_auto_scrub);
+LDEBUGFS_SEQ_FOPS(zfs_osd_auto_scrub);
 
 static int zfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data)
 {
@@ -253,14 +253,14 @@ static int zfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data)
 	scrub_dump(m, &dev->od_scrub);
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(zfs_osd_oi_scrub);
+LDEBUGFS_SEQ_FOPS_RO(zfs_osd_oi_scrub);
 
 static int zfs_osd_fstype_seq_show(struct seq_file *m, void *data)
 {
 	seq_puts(m, "zfs\n");
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(zfs_osd_fstype);
+LDEBUGFS_SEQ_FOPS_RO(zfs_osd_fstype);
 
 static int zfs_osd_mntdev_seq_show(struct seq_file *m, void *data)
 {
@@ -270,7 +270,7 @@ static int zfs_osd_mntdev_seq_show(struct seq_file *m, void *data)
 	seq_printf(m, "%s\n", osd->od_mntdev);
 	return 0;
 }
-LPROC_SEQ_FOPS_RO(zfs_osd_mntdev);
+LDEBUGFS_SEQ_FOPS_RO(zfs_osd_mntdev);
 
 static ssize_t
 lprocfs_osd_force_sync_seq_write(struct file *file, const char __user *buffer,
@@ -289,7 +289,7 @@ lprocfs_osd_force_sync_seq_write(struct file *file, const char __user *buffer,
 
 	return rc == 0 ? count : rc;
 }
-LPROC_SEQ_FOPS_WR_ONLY(zfs, osd_force_sync);
+LDEBUGFS_SEQ_FOPS_WR_ONLY(zfs, osd_force_sync);
 
 static int zfs_osd_nonrotational_seq_show(struct seq_file *m, void *data)
 {
@@ -325,7 +325,7 @@ zfs_osd_nonrotational_seq_write(struct file *file, const char __user *buffer,
 	osd->od_nonrotational = val;
 	return count;
 }
-LPROC_SEQ_FOPS(zfs_osd_nonrotational);
+LDEBUGFS_SEQ_FOPS(zfs_osd_nonrotational);
 
 static int zfs_osd_index_backup_seq_show(struct seq_file *m, void *data)
 {
@@ -360,7 +360,7 @@ static ssize_t zfs_osd_index_backup_seq_write(struct file *file,
 	dev->od_index_backup_policy = val;
 	return count;
 }
-LPROC_SEQ_FOPS(zfs_osd_index_backup);
+LDEBUGFS_SEQ_FOPS(zfs_osd_index_backup);
 
 static int zfs_osd_readcache_seq_show(struct seq_file *m, void *data)
 {
@@ -398,16 +398,16 @@ zfs_osd_readcache_seq_write(struct file *file, const char __user *buffer,
 					 OSD_MAX_CACHE_SIZE : val;
 	return count;
 }
-LPROC_SEQ_FOPS(zfs_osd_readcache);
+LDEBUGFS_SEQ_FOPS(zfs_osd_readcache);
 
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_blksize);
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_kbytestotal);
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_kbytesfree);
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_kbytesavail);
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_filestotal);
-LPROC_SEQ_FOPS_RO_TYPE(zfs, dt_filesfree);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_blksize);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_kbytestotal);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_kbytesfree);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_kbytesavail);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_filestotal);
+LDEBUGFS_SEQ_FOPS_RO_TYPE(zfs, dt_filesfree);
 
-struct lprocfs_vars lprocfs_osd_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_osd_obd_vars[] = {
 	{ .name	=	"blocksize",
 	  .fops	=	&zfs_dt_blksize_fops		},
 	{ .name	=	"kbytestotal",
@@ -456,7 +456,7 @@ int osd_procfs_init(struct osd_device *osd, const char *name)
 	LASSERT(type != NULL);
 
 	osd->od_proc_entry = lprocfs_register(name, type->typ_procroot,
-					      lprocfs_osd_obd_vars,
+					      ldebugfs_osd_obd_vars,
 					      &osd->od_dt_dev);
 	if (IS_ERR(osd->od_proc_entry)) {
 		rc = PTR_ERR(osd->od_proc_entry);
diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c
index ae21f7eb97a4..910de4ffdd7f 100644
--- a/lustre/osp/lproc_osp.c
+++ b/lustre/osp/lproc_osp.c
@@ -794,7 +794,7 @@ LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, connect_flags);
 LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, server_uuid);
 LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, timeouts);
 
-LPROC_SEQ_FOPS_RW_TYPE(osp, import);
+LDEBUGFS_SEQ_FOPS_RW_TYPE(osp, import);
 LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, state);
 
 /**
@@ -936,7 +936,7 @@ static ssize_t force_sync_store(struct kobject *kobj, struct attribute *attr,
 }
 LUSTRE_WO_ATTR(force_sync);
 
-static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
+static struct ldebugfs_vars ldebugfs_osp_obd_vars[] = {
 	{ .name =	"connect_flags",
 	  .fops =	&osp_connect_flags_fops		},
 	{ .name =	"ost_server_uuid",
@@ -954,7 +954,7 @@ static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
 	{ NULL }
 };
 
-static struct lprocfs_vars lprocfs_osp_md_vars[] = {
+static struct ldebugfs_vars ldebugfs_osp_md_vars[] = {
 	{ .name =	"connect_flags",
 	  .fops =	&osp_connect_flags_fops		},
 	{ .name =	"mdt_server_uuid",
@@ -1043,10 +1043,10 @@ void osp_tunables_init(struct osp_device *osp)
 
 	if (osp->opd_connect_mdt) {
 		osp->opd_dt_dev.dd_ktype.default_attrs = osp_md_attrs;
-		obd->obd_vars = lprocfs_osp_md_vars;
+		obd->obd_debugfs_vars = ldebugfs_osp_md_vars;
 	} else {
 		osp->opd_dt_dev.dd_ktype.default_attrs = osp_obd_attrs;
-		obd->obd_vars = lprocfs_osp_obd_vars;
+		obd->obd_debugfs_vars = ldebugfs_osp_obd_vars;
 	}
 
 	rc = dt_tunables_init(&osp->opd_dt_dev, obd->obd_type, obd->obd_name,
@@ -1062,7 +1062,7 @@ void osp_tunables_init(struct osp_device *osp)
 	 */
 	obd->obd_debugfs_entry = ldebugfs_register(obd->obd_name,
 						   obd->obd_type->typ_debugfs_entry,
-						   obd->obd_vars, obd);
+						   obd->obd_debugfs_vars, obd);
 	if (IS_ERR_OR_NULL(obd->obd_debugfs_entry)) {
 		rc = obd->obd_debugfs_entry ? PTR_ERR(obd->obd_debugfs_entry)
 					    : -ENOMEM;
diff --git a/lustre/ptlrpc/gss/lproc_gss.c b/lustre/ptlrpc/gss/lproc_gss.c
index 468633ed86b2..aa8851e6745a 100644
--- a/lustre/ptlrpc/gss/lproc_gss.c
+++ b/lustre/ptlrpc/gss/lproc_gss.c
@@ -152,9 +152,9 @@ ssize_t sptlrpc_krb5_allow_old_client_csum_seq_write(struct file *file,
 	krb5_allow_old_client_csum = val;
 	return count;
 }
-LPROC_SEQ_FOPS(sptlrpc_krb5_allow_old_client_csum);
+LDEBUFS_SEQ_FOPS(sptlrpc_krb5_allow_old_client_csum);
 
-static struct lprocfs_vars gss_lprocfs_vars[] = {
+static struct ldebugfs_vars gss_lprocfs_vars[] = {
 	{ .name	=	"replays",
 	  .fops	=	&gss_proc_oos_fops	},
 	{ .name	=	"init_channel",
@@ -196,9 +196,9 @@ gss_lk_proc_dl_seq_write(struct file *file, const char __user *buffer,
 
 	return count;
 }
-LPROC_SEQ_FOPS(gss_lk_proc_dl);
+LDEBUGFS_SEQ_FOPS(gss_lk_proc_dl);
 
-static struct lprocfs_vars gss_lk_lprocfs_vars[] = {
+static struct ldebugfs_vars gss_lk_lprocfs_vars[] = {
 	{ .name	=	"debug_level",
 	  .fops	=	&gss_lk_proc_dl_fops	},
 	{ NULL }
diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c
index 8ab01b52efa6..d673128ba16f 100644
--- a/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/lustre/ptlrpc/lproc_ptlrpc.c
@@ -1217,7 +1217,7 @@ int ptlrpc_sysfs_register_service(struct kset *parent,
 void ptlrpc_ldebugfs_register_service(struct dentry *entry,
 				      struct ptlrpc_service *svc)
 {
-	struct lprocfs_vars lproc_vars[] = {
+	struct ldebugfs_vars ldebugfs_vars[] = {
 		{ .name	= "req_buffer_history_len",
 		  .fops	= &ptlrpc_lprocfs_req_history_len_fops,
 		  .data	= svc },
@@ -1250,7 +1250,7 @@ void ptlrpc_ldebugfs_register_service(struct dentry *entry,
 	if (IS_ERR_OR_NULL(svc->srv_debugfs_entry))
 		return;
 
-	ldebugfs_add_vars(svc->srv_debugfs_entry, lproc_vars, NULL);
+	ldebugfs_add_vars(svc->srv_debugfs_entry, ldebugfs_vars, NULL);
 
 	rc = ldebugfs_seq_create(svc->srv_debugfs_entry, "req_history",
 				 0400, &req_history_fops, svc);
@@ -1369,8 +1369,8 @@ EXPORT_SYMBOL(ping_store);
  * "echo connection=192.168.0.1@tcp0::instance > .../import".
  */
 ssize_t
-lprocfs_import_seq_write(struct file *file, const char __user *buffer,
-			 size_t count, loff_t *off)
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+			  size_t count, loff_t *off)
 {
 	struct seq_file	  *m	= file->private_data;
 	struct obd_device *obd	= m->private;
@@ -1430,7 +1430,7 @@ out:
 	OBD_FREE(kbuf, count + 1);
 	return count;
 }
-EXPORT_SYMBOL(lprocfs_import_seq_write);
+EXPORT_SYMBOL(ldebugfs_import_seq_write);
 
 int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *n)
 {
diff --git a/lustre/ptlrpc/nrs_crr.c b/lustre/ptlrpc/nrs_crr.c
index 31a0629e0358..94d21d42f87d 100644
--- a/lustre/ptlrpc/nrs_crr.c
+++ b/lustre/ptlrpc/nrs_crr.c
@@ -822,7 +822,7 @@ LDEBUGFS_SEQ_FOPS(ptlrpc_lprocfs_nrs_crrn_quantum);
  */
 static int nrs_crrn_lprocfs_init(struct ptlrpc_service *svc)
 {
-	struct lprocfs_vars nrs_crrn_lprocfs_vars[] = {
+	struct ldebugfs_vars nrs_crrn_lprocfs_vars[] = {
 		{ .name		= "nrs_crrn_quantum",
 		  .fops		= &ptlrpc_lprocfs_nrs_crrn_quantum_fops,
 		  .data = svc },
diff --git a/lustre/ptlrpc/nrs_delay.c b/lustre/ptlrpc/nrs_delay.c
index fec9c2fe687e..c8a1e6637d26 100644
--- a/lustre/ptlrpc/nrs_delay.c
+++ b/lustre/ptlrpc/nrs_delay.c
@@ -777,7 +777,7 @@ LDEBUGFS_SEQ_FOPS(ptlrpc_lprocfs_nrs_delay_pct);
 
 static int nrs_delay_lprocfs_init(struct ptlrpc_service *svc)
 {
-	struct lprocfs_vars nrs_delay_lprocfs_vars[] = {
+	struct ldebugfs_vars nrs_delay_lprocfs_vars[] = {
 		{ .name		= "nrs_delay_min",
 		  .fops		= &ptlrpc_lprocfs_nrs_delay_min_fops,
 		  .data		= svc },
diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c
index 25dea5c084e5..8b8e092dd820 100644
--- a/lustre/ptlrpc/nrs_orr.c
+++ b/lustre/ptlrpc/nrs_orr.c
@@ -1866,7 +1866,7 @@ static int nrs_orr_lprocfs_init(struct ptlrpc_service *svc)
 {
 	int	i;
 
-	struct lprocfs_vars nrs_orr_lprocfs_vars[] = {
+	struct ldebugfs_vars nrs_orr_lprocfs_vars[] = {
 		{ .name		= "nrs_orr_quantum",
 		  .fops		= &ptlrpc_lprocfs_nrs_orr_quantum_fops	},
 		{ .name		= "nrs_orr_offset_type",
@@ -1918,7 +1918,7 @@ static int nrs_trr_lprocfs_init(struct ptlrpc_service *svc)
 {
 	int	i;
 
-	struct lprocfs_vars nrs_trr_lprocfs_vars[] = {
+	struct ldebugfs_vars nrs_trr_lprocfs_vars[] = {
 		{ .name		= "nrs_trr_quantum",
 		  .fops		= &ptlrpc_lprocfs_nrs_orr_quantum_fops },
 		{ .name		= "nrs_trr_offset_type",
diff --git a/lustre/ptlrpc/nrs_tbf.c b/lustre/ptlrpc/nrs_tbf.c
index 5ab39e1ec009..07710bdb7bfd 100644
--- a/lustre/ptlrpc/nrs_tbf.c
+++ b/lustre/ptlrpc/nrs_tbf.c
@@ -3668,7 +3668,7 @@ LDEBUGFS_SEQ_FOPS(ptlrpc_lprocfs_nrs_tbf_rule);
  */
 static int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc)
 {
-	struct lprocfs_vars nrs_tbf_lprocfs_vars[] = {
+	struct ldebugfs_vars nrs_tbf_lprocfs_vars[] = {
 		{ .name		= "nrs_tbf_rule",
 		  .fops		= &ptlrpc_lprocfs_nrs_tbf_rule_fops,
 		  .data = svc },
diff --git a/lustre/ptlrpc/sec_lproc.c b/lustre/ptlrpc/sec_lproc.c
index 95dbf2062495..5e3c9084b5f2 100644
--- a/lustre/ptlrpc/sec_lproc.c
+++ b/lustre/ptlrpc/sec_lproc.c
@@ -111,7 +111,7 @@ out:
         return 0;
 }
 
-LPROC_SEQ_FOPS_RO(sptlrpc_info_lprocfs);
+LDEBUGFS_SEQ_FOPS_RO(sptlrpc_info_lprocfs);
 
 static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v)
 {
@@ -138,7 +138,7 @@ out:
         return 0;
 }
 
-LPROC_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs);
+LDEBUGFS_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs);
 
 static ssize_t
 lprocfs_sptlrpc_sepol_seq_write(struct file *file, const char __user *buffer,
@@ -207,7 +207,7 @@ out:
 
 	return rc ? rc : count;
 }
-LPROC_SEQ_FOPS_WR_ONLY(srpc, sptlrpc_sepol);
+LDEBUGFS_SEQ_FOPS_WR_ONLY(srpc, sptlrpc_sepol);
 
 int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev)
 {
@@ -251,8 +251,8 @@ 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_vars sptlrpc_lprocfs_vars[] = {
+LDEBUGFS_SEQ_FOPS_RO(sptlrpc_proc_enc_pool);
+static struct ldebugfs_vars sptlrpc_lprocfs_vars[] = {
 	{ .name	=	"encrypt_page_pools",
 	  .fops	=	&sptlrpc_proc_enc_pool_fops	},
 	{ NULL }
-- 
2.41.0

openSUSE Build Service is sponsored by