Commit 77386b3c authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging/lustre/ptlrpc: move sptlrpc procfs entry to debugfs

We might want eventuall split it into a bunch of
single-value sysfs entries, I imagine, but there is no urgent need now.
Signed-off-by: default avatarDmitry Eremin <dmiter4ever@gmail.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 700815d4
...@@ -1061,15 +1061,7 @@ const char *sec2target_str(struct ptlrpc_sec *sec); ...@@ -1061,15 +1061,7 @@ const char *sec2target_str(struct ptlrpc_sec *sec);
/* /*
* lprocfs * lprocfs
*/ */
#if defined (CONFIG_PROC_FS)
struct proc_dir_entry;
extern struct proc_dir_entry *sptlrpc_proc_root;
int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev); int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev);
#else
#define sptlrpc_proc_root NULL
static inline int sptlrpc_lprocfs_cliobd_attach(struct obd_device *dev)
{ return 0; }
#endif
/* /*
* server side * server side
......
...@@ -51,10 +51,6 @@ ...@@ -51,10 +51,6 @@
#include "ptlrpc_internal.h" #include "ptlrpc_internal.h"
struct proc_dir_entry *sptlrpc_proc_root = NULL;
EXPORT_SYMBOL(sptlrpc_proc_root);
static char *sec_flags2str(unsigned long flags, char *buf, int bufsize) static char *sec_flags2str(unsigned long flags, char *buf, int bufsize)
{ {
buf[0] = '\0'; buf[0] = '\0';
...@@ -174,17 +170,20 @@ static struct lprocfs_vars sptlrpc_lprocfs_vars[] = { ...@@ -174,17 +170,20 @@ static struct lprocfs_vars sptlrpc_lprocfs_vars[] = {
{ NULL } { NULL }
}; };
static struct dentry *sptlrpc_debugfs_dir;
int sptlrpc_lproc_init(void) int sptlrpc_lproc_init(void)
{ {
int rc; int rc;
LASSERT(sptlrpc_proc_root == NULL); LASSERT(sptlrpc_debugfs_dir == NULL);
sptlrpc_proc_root = lprocfs_register("sptlrpc", proc_lustre_root, sptlrpc_debugfs_dir = ldebugfs_register("sptlrpc", debugfs_lustre_root,
sptlrpc_lprocfs_vars, NULL); sptlrpc_lprocfs_vars, NULL);
if (IS_ERR(sptlrpc_proc_root)) { if (IS_ERR_OR_NULL(sptlrpc_debugfs_dir)) {
rc = PTR_ERR(sptlrpc_proc_root); rc = sptlrpc_debugfs_dir ? PTR_ERR(sptlrpc_debugfs_dir)
sptlrpc_proc_root = NULL; : -ENOMEM;
sptlrpc_debugfs_dir = NULL;
return rc; return rc;
} }
return 0; return 0;
...@@ -192,8 +191,6 @@ int sptlrpc_lproc_init(void) ...@@ -192,8 +191,6 @@ int sptlrpc_lproc_init(void)
void sptlrpc_lproc_fini(void) void sptlrpc_lproc_fini(void)
{ {
if (sptlrpc_proc_root) { if (!IS_ERR_OR_NULL(sptlrpc_debugfs_dir))
lprocfs_remove(&sptlrpc_proc_root); ldebugfs_remove(&sptlrpc_debugfs_dir);
sptlrpc_proc_root = NULL;
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment